OSDN Git Service

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