OSDN Git Service

[Refactor] #37353 effects.c を player-effects.c に改名しつつ、宣言を player-effects.h を分離。
[hengband/hengband.git] / src / realm-hissatsu.c
1 #include "angband.h"
2 #include "cmd-spell.h"
3 #include "cmd-basic.h"
4 #include "floor.h"
5 #include "melee.h"
6 #include "monsterrace-hook.h"
7 #include "artifact.h"
8 #include "monster.h"
9 #include "player-move.h"
10 #include "player-status.h"
11 #include "player-effects.h"
12 #include "feature.h"
13 #include "spells.h"
14 #include "grid.h"
15
16 /*!
17 * @brief 剣術の各処理を行う
18 * @param spell 剣術ID
19 * @param mode 処理内容 (SPELL_NAME / SPELL_DESC / SPELL_CAST)
20 * @return SPELL_NAME / SPELL_DESC 時には文字列ポインタを返す。SPELL_CAST時はNULL文字列を返す。
21 */
22 concptr do_hissatsu_spell(SPELL_IDX spell, BIT_FLAGS mode)
23 {
24         bool name = (mode == SPELL_NAME) ? TRUE : FALSE;
25         bool desc = (mode == SPELL_DESC) ? TRUE : FALSE;
26         bool cast = (mode == SPELL_CAST) ? TRUE : FALSE;
27
28         DIRECTION dir;
29         PLAYER_LEVEL plev = p_ptr->lev;
30
31         switch (spell)
32         {
33         case 0:
34                 if (name) return _("飛飯綱", "Tobi-Izuna");
35                 if (desc) return _("2マス離れたところにいるモンスターを攻撃する。", "Attacks a two squares distant monster.");
36
37                 if (cast)
38                 {
39                         project_length = 2;
40                         if (!get_aim_dir(&dir)) return NULL;
41
42                         project_hook(GF_ATTACK, dir, HISSATSU_2, PROJECT_STOP | PROJECT_KILL);
43                 }
44                 break;
45
46         case 1:
47                 if (name) return _("五月雨斬り", "3-Way Attack");
48                 if (desc) return _("3方向に対して攻撃する。", "Attacks in 3 directions in one time.");
49
50                 if (cast)
51                 {
52                         DIRECTION cdir;
53                         POSITION y, x;
54
55                         if (!get_direction(&dir, FALSE, FALSE)) return NULL;
56                         if (dir == 5) return NULL;
57
58                         for (cdir = 0; cdir < 8; cdir++)
59                         {
60                                 if (cdd[cdir] == dir) break;
61                         }
62
63                         if (cdir == 8) return NULL;
64
65                         y = p_ptr->y + ddy_cdd[cdir];
66                         x = p_ptr->x + ddx_cdd[cdir];
67                         if (current_floor_ptr->grid_array[y][x].m_idx)
68                                 py_attack(y, x, 0);
69                         else
70                                 msg_print(_("攻撃は空を切った。", "You attack the empty air."));
71
72                         y = p_ptr->y + ddy_cdd[(cdir + 7) % 8];
73                         x = p_ptr->x + ddx_cdd[(cdir + 7) % 8];
74                         if (current_floor_ptr->grid_array[y][x].m_idx)
75                                 py_attack(y, x, 0);
76                         else
77                                 msg_print(_("攻撃は空を切った。", "You attack the empty air."));
78
79                         y = p_ptr->y + ddy_cdd[(cdir + 1) % 8];
80                         x = p_ptr->x + ddx_cdd[(cdir + 1) % 8];
81                         if (current_floor_ptr->grid_array[y][x].m_idx)
82                                 py_attack(y, x, 0);
83                         else
84                                 msg_print(_("攻撃は空を切った。", "You attack the empty air."));
85                 }
86                 break;
87
88         case 2:
89                 if (name) return _("ブーメラン", "Boomerang");
90                 if (desc) return _("武器を手元に戻ってくるように投げる。戻ってこないこともある。",
91                         "Throws current weapon. And it'll return to your hand unless failed.");
92
93                 if (cast)
94                 {
95                         if (!do_cmd_throw(1, TRUE, -1)) return NULL;
96                 }
97                 break;
98
99         case 3:
100                 if (name) return _("焔霊", "Burning Strike");
101                 if (desc) return _("火炎耐性のないモンスターに大ダメージを与える。", "Attacks a monster with more damage unless it has resistance to fire.");
102
103                 if (cast)
104                 {
105                         POSITION y, x;
106
107                         if (!get_direction(&dir, FALSE, FALSE)) return NULL;
108                         if (dir == 5) return NULL;
109
110                         y = p_ptr->y + ddy[dir];
111                         x = p_ptr->x + ddx[dir];
112
113                         if (current_floor_ptr->grid_array[y][x].m_idx)
114                                 py_attack(y, x, HISSATSU_FIRE);
115                         else
116                         {
117                                 msg_print(_("その方向にはモンスターはいません。", "There is no monster."));
118                                 return NULL;
119                         }
120                 }
121                 break;
122
123         case 4:
124                 if (name) return _("殺気感知", "Detect Ferocity");
125                 if (desc) return _("近くの思考することができるモンスターを感知する。", "Detects all monsters except mindless in your vicinity.");
126
127                 if (cast)
128                 {
129                         detect_monsters_mind(DETECT_RAD_DEFAULT);
130                 }
131                 break;
132
133         case 5:
134                 if (name) return _("みね打ち", "Strike to Stun");
135                 if (desc) return _("相手にダメージを与えないが、朦朧とさせる。", "Attempts to stun a monster in the adjacent.");
136
137                 if (cast)
138                 {
139                         POSITION y, x;
140
141                         if (!get_direction(&dir, FALSE, FALSE)) return NULL;
142                         if (dir == 5) return NULL;
143
144                         y = p_ptr->y + ddy[dir];
145                         x = p_ptr->x + ddx[dir];
146
147                         if (current_floor_ptr->grid_array[y][x].m_idx)
148                                 py_attack(y, x, HISSATSU_MINEUCHI);
149                         else
150                         {
151                                 msg_print(_("その方向にはモンスターはいません。", "There is no monster."));
152                                 return NULL;
153                         }
154                 }
155                 break;
156
157         case 6:
158                 if (name) return _("カウンター", "Counter");
159                 if (desc) return _("相手に攻撃されたときに反撃する。反撃するたびにMPを消費。",
160                         "Prepares to counterattack. When attack by a monster, strikes back using SP each time.");
161
162                 if (cast)
163                 {
164                         if (p_ptr->riding)
165                         {
166                                 msg_print(_("乗馬中には無理だ。", "You cannot do it when riding."));
167                                 return NULL;
168                         }
169                         msg_print(_("相手の攻撃に対して身構えた。", "You prepare to counter blow."));
170                         p_ptr->counter = TRUE;
171                 }
172                 break;
173
174         case 7:
175                 if (name) return _("払い抜け", "Harainuke");
176                 if (desc) return _("攻撃した後、反対側に抜ける。",
177                         "Attacks monster with your weapons normally, then move through counter side of the monster.");
178
179                 if (cast)
180                 {
181                         POSITION y, x;
182
183                         if (p_ptr->riding)
184                         {
185                                 msg_print(_("乗馬中には無理だ。", "You cannot do it when riding."));
186                                 return NULL;
187                         }
188
189                         if (!get_direction(&dir, FALSE, FALSE)) return NULL;
190
191                         if (dir == 5) return NULL;
192                         y = p_ptr->y + ddy[dir];
193                         x = p_ptr->x + ddx[dir];
194
195                         if (!current_floor_ptr->grid_array[y][x].m_idx)
196                         {
197                                 msg_print(_("その方向にはモンスターはいません。", "There is no monster."));
198                                 return NULL;
199                         }
200
201                         py_attack(y, x, 0);
202
203                         if (!player_can_enter(current_floor_ptr->grid_array[y][x].feat, 0) || is_trap(current_floor_ptr->grid_array[y][x].feat))
204                                 break;
205
206                         y += ddy[dir];
207                         x += ddx[dir];
208
209                         if (player_can_enter(current_floor_ptr->grid_array[y][x].feat, 0) && !is_trap(current_floor_ptr->grid_array[y][x].feat) && !current_floor_ptr->grid_array[y][x].m_idx)
210                         {
211                                 msg_print(NULL);
212                                 (void)move_player_effect(y, x, MPE_FORGET_FLOW | MPE_HANDLE_STUFF | MPE_DONT_PICKUP);
213                         }
214                 }
215                 break;
216
217         case 8:
218                 if (name) return _("サーペンツタン", "Serpent's Tongue");
219                 if (desc) return _("毒耐性のないモンスターに大ダメージを与える。", "Attacks a monster with more damage unless it has resistance to poison.");
220
221                 if (cast)
222                 {
223                         POSITION y, x;
224
225                         if (!get_direction(&dir, FALSE, FALSE)) return NULL;
226                         if (dir == 5) return NULL;
227
228                         y = p_ptr->y + ddy[dir];
229                         x = p_ptr->x + ddx[dir];
230
231                         if (current_floor_ptr->grid_array[y][x].m_idx)
232                                 py_attack(y, x, HISSATSU_POISON);
233                         else
234                         {
235                                 msg_print(_("その方向にはモンスターはいません。", "There is no monster."));
236                                 return NULL;
237                         }
238                 }
239                 break;
240
241         case 9:
242                 if (name) return _("斬魔剣弐の太刀", "Zammaken");
243                 if (desc) return _("生命のない邪悪なモンスターに大ダメージを与えるが、他のモンスターには全く効果がない。",
244                         "Attacks an evil unliving monster with great damage. No effect to other  monsters.");
245
246                 if (cast)
247                 {
248                         POSITION y, x;
249
250                         if (!get_direction(&dir, FALSE, FALSE)) return NULL;
251                         if (dir == 5) return NULL;
252
253                         y = p_ptr->y + ddy[dir];
254                         x = p_ptr->x + ddx[dir];
255
256                         if (current_floor_ptr->grid_array[y][x].m_idx)
257                                 py_attack(y, x, HISSATSU_ZANMA);
258                         else
259                         {
260                                 msg_print(_("その方向にはモンスターはいません。", "There is no monster."));
261                                 return NULL;
262                         }
263                 }
264                 break;
265
266         case 10:
267                 if (name) return _("裂風剣", "Wind Blast");
268                 if (desc) return _("攻撃した相手を後方へ吹き飛ばす。", "Attacks an adjacent monster, and blow it away.");
269
270                 if (cast)
271                 {
272                         POSITION y, x;
273
274                         if (!get_direction(&dir, FALSE, FALSE)) return NULL;
275                         if (dir == 5) return NULL;
276
277                         y = p_ptr->y + ddy[dir];
278                         x = p_ptr->x + ddx[dir];
279
280                         if (current_floor_ptr->grid_array[y][x].m_idx)
281                                 py_attack(y, x, 0);
282                         else
283                         {
284                                 msg_print(_("その方向にはモンスターはいません。", "There is no monster."));
285                                 return NULL;
286                         }
287                         if (d_info[p_ptr->dungeon_idx].flags1 & DF1_NO_MELEE)
288                         {
289                                 return "";
290                         }
291                         if (current_floor_ptr->grid_array[y][x].m_idx)
292                         {
293                                 int i;
294                                 POSITION ty = y, tx = x;
295                                 POSITION oy = y, ox = x;
296                                 MONSTER_IDX m_idx = current_floor_ptr->grid_array[y][x].m_idx;
297                                 monster_type *m_ptr = &current_floor_ptr->m_list[m_idx];
298                                 GAME_TEXT m_name[MAX_NLEN];
299
300                                 monster_desc(m_name, m_ptr, 0);
301
302                                 for (i = 0; i < 5; i++)
303                                 {
304                                         y += ddy[dir];
305                                         x += ddx[dir];
306                                         if (cave_empty_bold(y, x))
307                                         {
308                                                 ty = y;
309                                                 tx = x;
310                                         }
311                                         else break;
312                                 }
313                                 if ((ty != oy) || (tx != ox))
314                                 {
315                                         msg_format(_("%sを吹き飛ばした!", "You blow %s away!"), m_name);
316                                         current_floor_ptr->grid_array[oy][ox].m_idx = 0;
317                                         current_floor_ptr->grid_array[ty][tx].m_idx = m_idx;
318                                         m_ptr->fy = ty;
319                                         m_ptr->fx = tx;
320
321                                         update_monster(m_idx, TRUE);
322                                         lite_spot(oy, ox);
323                                         lite_spot(ty, tx);
324
325                                         if (r_info[m_ptr->r_idx].flags7 & (RF7_LITE_MASK | RF7_DARK_MASK))
326                                                 p_ptr->update |= (PU_MON_LITE);
327                                 }
328                         }
329                 }
330                 break;
331
332         case 11:
333                 if (name) return _("刀匠の目利き", "Judge");
334                 if (desc) return _("武器・防具を1つ識別する。レベル45以上で武器・防具の能力を完全に知ることができる。",
335                         "Identifies a weapon or armor. Or *identifies* these at level 45.");
336
337                 if (cast)
338                 {
339                         if (plev > 44)
340                         {
341                                 if (!identify_fully(TRUE)) return NULL;
342                         }
343                         else
344                         {
345                                 if (!ident_spell(TRUE)) return NULL;
346                         }
347                 }
348                 break;
349
350         case 12:
351                 if (name) return _("破岩斬", "Rock Smash");
352                 if (desc) return _("岩を壊し、岩石系のモンスターに大ダメージを与える。", "Breaks rock. Or greatly damage a monster made by rocks.");
353
354                 if (cast)
355                 {
356                         POSITION y, x;
357
358                         if (!get_direction(&dir, FALSE, FALSE)) return NULL;
359                         if (dir == 5) return NULL;
360
361                         y = p_ptr->y + ddy[dir];
362                         x = p_ptr->x + ddx[dir];
363
364                         if (current_floor_ptr->grid_array[y][x].m_idx)
365                                 py_attack(y, x, HISSATSU_HAGAN);
366
367                         if (!cave_have_flag_bold(y, x, FF_HURT_ROCK)) break;
368
369                         /* Destroy the feature */
370                         cave_alter_feat(y, x, FF_HURT_ROCK);
371                         p_ptr->update |= (PU_FLOW);
372                 }
373                 break;
374
375         case 13:
376                 if (name) return _("乱れ雪月花", "Midare-Setsugekka");
377                 if (desc) return _("攻撃回数が増え、冷気耐性のないモンスターに大ダメージを与える。",
378                         "Attacks a monster with increased number of attacks and more damage unless it has resistance to cold.");
379
380                 if (cast)
381                 {
382                         POSITION y, x;
383
384                         if (!get_direction(&dir, FALSE, FALSE)) return NULL;
385                         if (dir == 5) return NULL;
386
387                         y = p_ptr->y + ddy[dir];
388                         x = p_ptr->x + ddx[dir];
389
390                         if (current_floor_ptr->grid_array[y][x].m_idx)
391                                 py_attack(y, x, HISSATSU_COLD);
392                         else
393                         {
394                                 msg_print(_("その方向にはモンスターはいません。", "There is no monster."));
395                                 return NULL;
396                         }
397                 }
398                 break;
399
400         case 14:
401                 if (name) return _("急所突き", "Spot Aiming");
402                 if (desc) return _("モンスターを一撃で倒す攻撃を繰り出す。失敗すると1点しかダメージを与えられない。",
403                         "Attempts to kill a monster instantly. If failed cause only 1HP of damage.");
404
405                 if (cast)
406                 {
407                         POSITION y, x;
408
409                         if (!get_direction(&dir, FALSE, FALSE)) return NULL;
410                         if (dir == 5) return NULL;
411
412                         y = p_ptr->y + ddy[dir];
413                         x = p_ptr->x + ddx[dir];
414
415                         if (current_floor_ptr->grid_array[y][x].m_idx)
416                                 py_attack(y, x, HISSATSU_KYUSHO);
417                         else
418                         {
419                                 msg_print(_("その方向にはモンスターはいません。", "There is no monster."));
420                                 return NULL;
421                         }
422                 }
423                 break;
424
425         case 15:
426                 if (name) return _("魔神斬り", "Majingiri");
427                 if (desc) return _("会心の一撃で攻撃する。攻撃がかわされやすい。",
428                         "Attempts to attack with critical hit. But this attack is easy to evade for a monster.");
429
430                 if (cast)
431                 {
432                         POSITION y, x;
433
434                         if (!get_direction(&dir, FALSE, FALSE)) return NULL;
435                         if (dir == 5) return NULL;
436
437                         y = p_ptr->y + ddy[dir];
438                         x = p_ptr->x + ddx[dir];
439
440                         if (current_floor_ptr->grid_array[y][x].m_idx)
441                                 py_attack(y, x, HISSATSU_MAJIN);
442                         else
443                         {
444                                 msg_print(_("その方向にはモンスターはいません。", "There is no monster."));
445                                 return NULL;
446                         }
447                 }
448                 break;
449
450         case 16:
451                 if (name) return _("捨て身", "Desperate Attack");
452                 if (desc) return _("強力な攻撃を繰り出す。次のターンまでの間、食らうダメージが増える。",
453                         "Attacks with all of your power. But all damages you take will be doubled for one current_world_ptr->game_turn.");
454
455                 if (cast)
456                 {
457                         POSITION y, x;
458
459                         if (!get_direction(&dir, FALSE, FALSE)) return NULL;
460                         if (dir == 5) return NULL;
461
462                         y = p_ptr->y + ddy[dir];
463                         x = p_ptr->x + ddx[dir];
464
465                         if (current_floor_ptr->grid_array[y][x].m_idx)
466                                 py_attack(y, x, HISSATSU_SUTEMI);
467                         else
468                         {
469                                 msg_print(_("その方向にはモンスターはいません。", "There is no monster."));
470                                 return NULL;
471                         }
472                         p_ptr->sutemi = TRUE;
473                 }
474                 break;
475
476         case 17:
477                 if (name) return _("雷撃鷲爪斬", "Lightning Eagle");
478                 if (desc) return _("電撃耐性のないモンスターに非常に大きいダメージを与える。",
479                         "Attacks a monster with more damage unless it has resistance to electricity.");
480
481                 if (cast)
482                 {
483                         POSITION y, x;
484
485                         if (!get_direction(&dir, FALSE, FALSE)) return NULL;
486                         if (dir == 5) return NULL;
487
488                         y = p_ptr->y + ddy[dir];
489                         x = p_ptr->x + ddx[dir];
490
491                         if (current_floor_ptr->grid_array[y][x].m_idx)
492                                 py_attack(y, x, HISSATSU_ELEC);
493                         else
494                         {
495                                 msg_print(_("その方向にはモンスターはいません。", "There is no monster."));
496                                 return NULL;
497                         }
498                 }
499                 break;
500
501         case 18:
502                 if (name) return _("入身", "Rush Attack");
503                 if (desc) return _("素早く相手に近寄り攻撃する。", "Steps close to a monster and attacks at a time.");
504
505                 if (cast)
506                 {
507                         if (!rush_attack(NULL)) return NULL;
508                 }
509                 break;
510
511         case 19:
512                 if (name) return _("赤流渦", "Bloody Maelstrom");
513                 if (desc) return _("自分自身も傷を作りつつ、その傷が深いほど大きい威力で全方向の敵を攻撃できる。生きていないモンスターには効果がない。",
514                         "Attacks all adjacent monsters with power corresponding to your cut status. Then increases your cut status. No effect to unliving monsters.");
515
516                 if (cast)
517                 {
518                         POSITION y = 0, x = 0;
519
520                         grid_type       *g_ptr;
521                         monster_type    *m_ptr;
522
523                         if (p_ptr->cut < 300)
524                                 set_cut(p_ptr->cut + 300);
525                         else
526                                 set_cut(p_ptr->cut * 2);
527
528                         for (dir = 0; dir < 8; dir++)
529                         {
530                                 y = p_ptr->y + ddy_ddd[dir];
531                                 x = p_ptr->x + ddx_ddd[dir];
532                                 g_ptr = &current_floor_ptr->grid_array[y][x];
533                                 m_ptr = &current_floor_ptr->m_list[g_ptr->m_idx];
534
535                                 /* Hack -- attack monsters */
536                                 if (g_ptr->m_idx && (m_ptr->ml || cave_have_flag_bold(y, x, FF_PROJECT)))
537                                 {
538                                         if (!monster_living(m_ptr->r_idx))
539                                         {
540                                                 GAME_TEXT m_name[MAX_NLEN];
541
542                                                 monster_desc(m_name, m_ptr, 0);
543                                                 msg_format(_("%sには効果がない!", "%s is unharmed!"), m_name);
544                                         }
545                                         else py_attack(y, x, HISSATSU_SEKIRYUKA);
546                                 }
547                         }
548                 }
549                 break;
550
551         case 20:
552                 if (name) return _("激震撃", "Earthquake Blow");
553                 if (desc) return _("地震を起こす。", "Shakes dungeon structure, and results in random swapping of floors and walls.");
554
555                 if (cast)
556                 {
557                         POSITION y, x;
558
559                         if (!get_direction(&dir, FALSE, FALSE)) return NULL;
560                         if (dir == 5) return NULL;
561
562                         y = p_ptr->y + ddy[dir];
563                         x = p_ptr->x + ddx[dir];
564
565                         if (current_floor_ptr->grid_array[y][x].m_idx)
566                                 py_attack(y, x, HISSATSU_QUAKE);
567                         else
568                                 earthquake(p_ptr->y, p_ptr->x, 10);
569                 }
570                 break;
571
572         case 21:
573                 if (name) return _("地走り", "Crack");
574                 if (desc) return _("衝撃波のビームを放つ。", "Fires a beam of shock wave.");
575
576                 if (cast)
577                 {
578                         int total_damage = 0, basedam, i;
579                         BIT_FLAGS flgs[TR_FLAG_SIZE];
580                         object_type *o_ptr;
581                         if (!get_aim_dir(&dir)) return NULL;
582                         msg_print(_("武器を大きく振り下ろした。", "You swing your weapon downward."));
583                         for (i = 0; i < 2; i++)
584                         {
585                                 int damage;
586
587                                 if (!has_melee_weapon(INVEN_RARM + i)) break;
588                                 o_ptr = &inventory[INVEN_RARM + i];
589                                 basedam = (o_ptr->dd * (o_ptr->ds + 1)) * 50;
590                                 damage = o_ptr->to_d * 100;
591                                 object_flags(o_ptr, flgs);
592                                 if ((o_ptr->name1 == ART_VORPAL_BLADE) || (o_ptr->name1 == ART_CHAINSWORD))
593                                 {
594                                         /* vorpal blade */
595                                         basedam *= 5;
596                                         basedam /= 3;
597                                 }
598                                 else if (have_flag(flgs, TR_VORPAL))
599                                 {
600                                         /* vorpal flag only */
601                                         basedam *= 11;
602                                         basedam /= 9;
603                                 }
604                                 damage += basedam;
605                                 damage *= p_ptr->num_blow[i];
606                                 total_damage += damage / 200;
607                                 if (i) total_damage = total_damage * 7 / 10;
608                         }
609                         fire_beam(GF_FORCE, dir, total_damage);
610                 }
611                 break;
612
613         case 22:
614                 if (name) return _("気迫の雄叫び", "War Cry");
615                 if (desc) return _("視界内の全モンスターに対して轟音の攻撃を行う。さらに、近くにいるモンスターを怒らせる。",
616                         "Damages all monsters in sight with sound. Aggravate nearby monsters.");
617
618                 if (cast)
619                 {
620                         msg_print(_("雄叫びをあげた!", "You roar out!"));
621                         project_all_los(GF_SOUND, randint1(plev * 3));
622                         aggravate_monsters(0);
623                 }
624                 break;
625
626         case 23:
627                 if (name) return _("無双三段", "Musou-Sandan");
628                 if (desc) return _("強力な3段攻撃を繰り出す。", "Attacks with powerful 3 strikes.");
629
630                 if (cast)
631                 {
632                         int i;
633
634                         if (!get_direction(&dir, FALSE, FALSE)) return NULL;
635                         if (dir == 5) return NULL;
636
637                         for (i = 0; i < 3; i++)
638                         {
639                                 POSITION y, x;
640                                 POSITION ny, nx;
641                                 MONSTER_IDX m_idx;
642                                 grid_type *g_ptr;
643                                 monster_type *m_ptr;
644
645                                 y = p_ptr->y + ddy[dir];
646                                 x = p_ptr->x + ddx[dir];
647                                 g_ptr = &current_floor_ptr->grid_array[y][x];
648
649                                 if (g_ptr->m_idx)
650                                         py_attack(y, x, HISSATSU_3DAN);
651                                 else
652                                 {
653                                         msg_print(_("その方向にはモンスターはいません。", "There is no monster."));
654                                         return NULL;
655                                 }
656
657                                 if (d_info[p_ptr->dungeon_idx].flags1 & DF1_NO_MELEE)
658                                 {
659                                         return "";
660                                 }
661
662                                 /* Monster is dead? */
663                                 if (!g_ptr->m_idx) break;
664
665                                 ny = y + ddy[dir];
666                                 nx = x + ddx[dir];
667                                 m_idx = g_ptr->m_idx;
668                                 m_ptr = &current_floor_ptr->m_list[m_idx];
669
670                                 /* Monster cannot move back? */
671                                 if (!monster_can_enter(ny, nx, &r_info[m_ptr->r_idx], 0))
672                                 {
673                                         /* -more- */
674                                         if (i < 2) msg_print(NULL);
675                                         continue;
676                                 }
677
678                                 g_ptr->m_idx = 0;
679                                 current_floor_ptr->grid_array[ny][nx].m_idx = m_idx;
680                                 m_ptr->fy = ny;
681                                 m_ptr->fx = nx;
682
683                                 update_monster(m_idx, TRUE);
684
685                                 /* Redraw the old spot */
686                                 lite_spot(y, x);
687
688                                 /* Redraw the new spot */
689                                 lite_spot(ny, nx);
690
691                                 /* Player can move forward? */
692                                 if (player_can_enter(g_ptr->feat, 0))
693                                 {
694                                         if (!move_player_effect(y, x, MPE_FORGET_FLOW | MPE_HANDLE_STUFF | MPE_DONT_PICKUP)) break;
695                                 }
696                                 else
697                                 {
698                                         break;
699                                 }
700
701                                 /* -more- */
702                                 if (i < 2) msg_print(NULL);
703                         }
704                 }
705                 break;
706
707         case 24:
708                 if (name) return _("吸血鬼の牙", "Vampire's Fang");
709                 if (desc) return _("攻撃した相手の体力を吸いとり、自分の体力を回復させる。生命を持たないモンスターには通じない。",
710                         "Attacks with vampiric strikes which absorbs HP from a monster and gives them to you. No effect to unliving monsters.");
711
712                 if (cast)
713                 {
714                         POSITION y, x;
715
716                         if (!get_direction(&dir, FALSE, FALSE)) return NULL;
717                         if (dir == 5) return NULL;
718
719                         y = p_ptr->y + ddy[dir];
720                         x = p_ptr->x + ddx[dir];
721
722                         if (current_floor_ptr->grid_array[y][x].m_idx)
723                                 py_attack(y, x, HISSATSU_DRAIN);
724                         else
725                         {
726                                 msg_print(_("その方向にはモンスターはいません。", "There is no monster."));
727                                 return NULL;
728                         }
729                 }
730                 break;
731
732         case 25:
733                 if (name) return _("幻惑", "Moon Dazzling");
734                 if (desc) return _("視界内の起きている全モンスターに朦朧、混乱、眠りを与えようとする。", "Attempts to stun, confuse and sleep all waking monsters.");
735
736                 if (cast)
737                 {
738                         msg_print(_("武器を不規則に揺らした...", "You irregularly wave your weapon..."));
739                         project_all_los(GF_ENGETSU, plev * 4);
740                         project_all_los(GF_ENGETSU, plev * 4);
741                         project_all_los(GF_ENGETSU, plev * 4);
742                 }
743                 break;
744
745         case 26:
746                 if (name) return _("百人斬り", "Hundred Slaughter");
747                 if (desc) return _("連続して入身でモンスターを攻撃する。攻撃するたびにMPを消費。MPがなくなるか、モンスターを倒せなかったら百人斬りは終了する。",
748                         "Performs a series of rush attacks. The series continues while killing each monster in a time and SP remains.");
749
750                 if (cast)
751                 {
752                         const int mana_cost_per_monster = 8;
753                         bool is_new = TRUE;
754                         bool mdeath;
755
756                         do
757                         {
758                                 if (!rush_attack(&mdeath)) break;
759                                 if (is_new)
760                                 {
761                                         /* Reserve needed mana point */
762                                         p_ptr->csp -= technic_info[REALM_HISSATSU - MIN_TECHNIC][26].smana;
763                                         is_new = FALSE;
764                                 }
765                                 else
766                                         p_ptr->csp -= mana_cost_per_monster;
767
768                                 if (!mdeath) break;
769                                 command_dir = 0;
770
771                                 p_ptr->redraw |= PR_MANA;
772                                 handle_stuff();
773                         } while (p_ptr->csp > mana_cost_per_monster);
774
775                         if (is_new) return NULL;
776
777                         /* Restore reserved mana */
778                         p_ptr->csp += technic_info[REALM_HISSATSU - MIN_TECHNIC][26].smana;
779                 }
780                 break;
781
782         case 27:
783                 if (name) return _("天翔龍閃", "Dragonic Flash");
784                 if (desc) return _("視界内の場所を指定して、その場所と自分の間にいる全モンスターを攻撃し、その場所に移動する。",
785                         "Runs toward given location while attacking all monsters on the path.");
786
787                 if (cast)
788                 {
789                         POSITION y, x;
790
791                         if (!tgt_pt(&x, &y)) return NULL;
792
793                         if (!cave_player_teleportable_bold(y, x, 0L) ||
794                                 (distance(y, x, p_ptr->y, p_ptr->x) > MAX_SIGHT / 2) ||
795                                 !projectable(p_ptr->y, p_ptr->x, y, x))
796                         {
797                                 msg_print(_("失敗!", "You cannot move to that place!"));
798                                 break;
799                         }
800                         if (p_ptr->anti_tele)
801                         {
802                                 msg_print(_("不思議な力がテレポートを防いだ!", "A mysterious force prevents you from teleporting!"));
803                                 break;
804                         }
805                         project(0, 0, y, x, HISSATSU_ISSEN, GF_ATTACK, PROJECT_BEAM | PROJECT_KILL, -1);
806                         teleport_player_to(y, x, 0L);
807                 }
808                 break;
809
810         case 28:
811                 if (name) return _("二重の剣撃", "Twin Slash");
812                 if (desc) return _("1ターンで2度攻撃を行う。", "double attacks at a time.");
813
814                 if (cast)
815                 {
816                         POSITION x, y;
817
818                         if (!get_rep_dir(&dir, FALSE)) return NULL;
819
820                         y = p_ptr->y + ddy[dir];
821                         x = p_ptr->x + ddx[dir];
822
823                         if (current_floor_ptr->grid_array[y][x].m_idx)
824                         {
825                                 py_attack(y, x, 0);
826                                 if (current_floor_ptr->grid_array[y][x].m_idx)
827                                 {
828                                         handle_stuff();
829                                         py_attack(y, x, 0);
830                                 }
831                         }
832                         else
833                         {
834                                 msg_print(_("その方向にはモンスターはいません。", "You don't see any monster in this direction"));
835                                 return NULL;
836                         }
837                 }
838                 break;
839
840         case 29:
841                 if (name) return _("虎伏絶刀勢", "Kofuku-Zettousei");
842                 if (desc) return _("強力な攻撃を行い、近くの場所にも効果が及ぶ。", "Performs a powerful attack which even effect nearby monsters.");
843
844                 if (cast)
845                 {
846                         int total_damage = 0, basedam, i;
847                         POSITION y, x;
848                         BIT_FLAGS flgs[TR_FLAG_SIZE];
849                         object_type *o_ptr;
850
851                         if (!get_direction(&dir, FALSE, FALSE)) return NULL;
852                         if (dir == 5) return NULL;
853
854                         y = p_ptr->y + ddy[dir];
855                         x = p_ptr->x + ddx[dir];
856
857                         if (d_info[p_ptr->dungeon_idx].flags1 & DF1_NO_MELEE)
858                         {
859                                 msg_print(_("なぜか攻撃することができない。", "Something prevent you from attacking."));
860                                 return "";
861                         }
862                         msg_print(_("武器を大きく振り下ろした。", "You swing your weapon downward."));
863                         for (i = 0; i < 2; i++)
864                         {
865                                 int damage;
866                                 if (!has_melee_weapon(INVEN_RARM + i)) break;
867                                 o_ptr = &inventory[INVEN_RARM + i];
868                                 basedam = (o_ptr->dd * (o_ptr->ds + 1)) * 50;
869                                 damage = o_ptr->to_d * 100;
870                                 object_flags(o_ptr, flgs);
871                                 if ((o_ptr->name1 == ART_VORPAL_BLADE) || (o_ptr->name1 == ART_CHAINSWORD))
872                                 {
873                                         /* vorpal blade */
874                                         basedam *= 5;
875                                         basedam /= 3;
876                                 }
877                                 else if (have_flag(flgs, TR_VORPAL))
878                                 {
879                                         /* vorpal flag only */
880                                         basedam *= 11;
881                                         basedam /= 9;
882                                 }
883                                 damage += basedam;
884                                 damage += p_ptr->to_d[i] * 100;
885                                 damage *= p_ptr->num_blow[i];
886                                 total_damage += (damage / 100);
887                         }
888                         project(0, (cave_have_flag_bold(y, x, FF_PROJECT) ? 5 : 0), y, x, total_damage * 3 / 2, GF_METEOR, PROJECT_KILL | PROJECT_JUMP | PROJECT_ITEM, -1);
889                 }
890                 break;
891
892         case 30:
893                 if (name) return _("慶雲鬼忍剣", "Keiun-Kininken");
894                 if (desc) return _("自分もダメージをくらうが、相手に非常に大きなダメージを与える。アンデッドには特に効果がある。",
895                         "Attacks a monster with extremely powerful damage. But you also takes some damages. Hurts a undead monster greatly.");
896
897                 if (cast)
898                 {
899                         POSITION y, x;
900
901                         if (!get_direction(&dir, FALSE, FALSE)) return NULL;
902                         if (dir == 5) return NULL;
903
904                         y = p_ptr->y + ddy[dir];
905                         x = p_ptr->x + ddx[dir];
906
907                         if (current_floor_ptr->grid_array[y][x].m_idx)
908                                 py_attack(y, x, HISSATSU_UNDEAD);
909                         else
910                         {
911                                 msg_print(_("その方向にはモンスターはいません。", "There is no monster."));
912                                 return NULL;
913                         }
914                         take_hit(DAMAGE_NOESCAPE, 100 + randint1(100), _("慶雲鬼忍剣を使った衝撃", "exhaustion on using Keiun-Kininken"), -1);
915                 }
916                 break;
917
918         case 31:
919                 if (name) return _("切腹", "Harakiri");
920                 if (desc) return _("「武士道とは、死ぬことと見つけたり。」", "'Busido is found in death'");
921
922                 if (cast)
923                 {
924                         int i;
925                         if (!get_check(_("本当に自殺しますか?", "Do you really want to commit suicide? "))) return NULL;
926                         /* Special Verification for suicide */
927                         prt(_("確認のため '@' を押して下さい。", "Please verify SUICIDE by typing the '@' sign: "), 0, 0);
928
929                         flush();
930                         i = inkey();
931                         prt("", 0, 0);
932                         if (i != '@') return NULL;
933                         if (p_ptr->total_winner)
934                         {
935                                 take_hit(DAMAGE_FORCE, 9999, "Seppuku", -1);
936                                 p_ptr->total_winner = TRUE;
937                         }
938                         else
939                         {
940                                 msg_print(_("武士道とは、死ぬことと見つけたり。", "Meaning of Bushi-do is found in the death."));
941                                 take_hit(DAMAGE_FORCE, 9999, "Seppuku", -1);
942                         }
943                 }
944                 break;
945         }
946
947         return "";
948 }