OSDN Git Service

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