OSDN Git Service

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