OSDN Git Service

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