OSDN Git Service

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