OSDN Git Service

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