OSDN Git Service

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