4 #include "monsterrace-hook.h"
9 * @param mode 処理内容 (SPELL_NAME / SPELL_DESC / SPELL_CAST)
10 * @return SPELL_NAME / SPELL_DESC 時には文字列ポインタを返す。SPELL_CAST時はNULL文字列を返す。
12 cptr do_hissatsu_spell(SPELL_IDX spell, BIT_FLAGS mode)
14 bool name = (mode == SPELL_NAME) ? TRUE : FALSE;
15 bool desc = (mode == SPELL_DESC) ? TRUE : FALSE;
16 bool cast = (mode == SPELL_CAST) ? TRUE : FALSE;
19 PLAYER_LEVEL plev = p_ptr->lev;
24 if (name) return _("飛飯綱", "Tobi-Izuna");
25 if (desc) return _("2マス離れたところにいるモンスターを攻撃する。", "Attacks a two squares distant monster.");
30 if (!get_aim_dir(&dir)) return NULL;
32 project_hook(GF_ATTACK, dir, HISSATSU_2, PROJECT_STOP | PROJECT_KILL);
37 if (name) return _("五月雨斬り", "3-Way Attack");
38 if (desc) return _("3方向に対して攻撃する。", "Attacks in 3 directions in one time.");
45 if (!get_direction(&dir, FALSE, FALSE)) return NULL;
46 if (dir == 5) return NULL;
48 for (cdir = 0; cdir < 8; cdir++)
50 if (cdd[cdir] == dir) break;
53 if (cdir == 8) return NULL;
55 y = p_ptr->y + ddy_cdd[cdir];
56 x = p_ptr->x + ddx_cdd[cdir];
60 msg_print(_("攻撃は空を切った。", "You attack the empty air."));
62 y = p_ptr->y + ddy_cdd[(cdir + 7) % 8];
63 x = p_ptr->x + ddx_cdd[(cdir + 7) % 8];
67 msg_print(_("攻撃は空を切った。", "You attack the empty air."));
69 y = p_ptr->y + ddy_cdd[(cdir + 1) % 8];
70 x = p_ptr->x + ddx_cdd[(cdir + 1) % 8];
74 msg_print(_("攻撃は空を切った。", "You attack the empty air."));
79 if (name) return _("ブーメラン", "Boomerang");
80 if (desc) return _("武器を手元に戻ってくるように投げる。戻ってこないこともある。",
81 "Throws current weapon. And it'll return to your hand unless failed.");
85 if (!do_cmd_throw(1, TRUE, -1)) return NULL;
90 if (name) return _("焔霊", "Burning Strike");
91 if (desc) return _("火炎耐性のないモンスターに大ダメージを与える。", "Attacks a monster with more damage unless it has resistance to fire.");
97 if (!get_direction(&dir, FALSE, FALSE)) return NULL;
98 if (dir == 5) return NULL;
100 y = p_ptr->y + ddy[dir];
101 x = p_ptr->x + ddx[dir];
103 if (cave[y][x].m_idx)
104 py_attack(y, x, HISSATSU_FIRE);
107 msg_print(_("その方向にはモンスターはいません。", "There is no monster."));
114 if (name) return _("殺気感知", "Detect Ferocity");
115 if (desc) return _("近くの思考することができるモンスターを感知する。", "Detects all monsters except mindless in your vicinity.");
119 detect_monsters_mind(DETECT_RAD_DEFAULT);
124 if (name) return _("みね打ち", "Strike to Stun");
125 if (desc) return _("相手にダメージを与えないが、朦朧とさせる。", "Attempts to stun a monster in the adjacent.");
131 if (!get_direction(&dir, FALSE, FALSE)) return NULL;
132 if (dir == 5) return NULL;
134 y = p_ptr->y + ddy[dir];
135 x = p_ptr->x + ddx[dir];
137 if (cave[y][x].m_idx)
138 py_attack(y, x, HISSATSU_MINEUCHI);
141 msg_print(_("その方向にはモンスターはいません。", "There is no monster."));
148 if (name) return _("カウンター", "Counter");
149 if (desc) return _("相手に攻撃されたときに反撃する。反撃するたびにMPを消費。",
150 "Prepares to counterattack. When attack by a monster, strikes back using SP each time.");
156 msg_print(_("乗馬中には無理だ。", "You cannot do it when riding."));
159 msg_print(_("相手の攻撃に対して身構えた。", "You prepare to counter blow."));
160 p_ptr->counter = TRUE;
165 if (name) return _("払い抜け", "Harainuke");
166 if (desc) return _("攻撃した後、反対側に抜ける。",
167 "Attacks monster with your weapons normally, then move through counter side of the monster.");
175 msg_print(_("乗馬中には無理だ。", "You cannot do it when riding."));
179 if (!get_direction(&dir, FALSE, FALSE)) return NULL;
181 if (dir == 5) return NULL;
182 y = p_ptr->y + ddy[dir];
183 x = p_ptr->x + ddx[dir];
185 if (!cave[y][x].m_idx)
187 msg_print(_("その方向にはモンスターはいません。", "There is no monster."));
193 if (!player_can_enter(cave[y][x].feat, 0) || is_trap(cave[y][x].feat))
199 if (player_can_enter(cave[y][x].feat, 0) && !is_trap(cave[y][x].feat) && !cave[y][x].m_idx)
203 /* Move the player */
204 (void)move_player_effect(y, x, MPE_FORGET_FLOW | MPE_HANDLE_STUFF | MPE_DONT_PICKUP);
210 if (name) return _("サーペンツタン", "Serpent's Tongue");
211 if (desc) return _("毒耐性のないモンスターに大ダメージを与える。", "Attacks a monster with more damage unless it has resistance to poison.");
217 if (!get_direction(&dir, FALSE, FALSE)) return NULL;
218 if (dir == 5) return NULL;
220 y = p_ptr->y + ddy[dir];
221 x = p_ptr->x + ddx[dir];
223 if (cave[y][x].m_idx)
224 py_attack(y, x, HISSATSU_POISON);
227 msg_print(_("その方向にはモンスターはいません。", "There is no monster."));
234 if (name) return _("斬魔剣弐の太刀", "Zammaken");
235 if (desc) return _("生命のない邪悪なモンスターに大ダメージを与えるが、他のモンスターには全く効果がない。",
236 "Attacks an evil unliving monster with great damage. No effect to other monsters.");
242 if (!get_direction(&dir, FALSE, FALSE)) return NULL;
243 if (dir == 5) return NULL;
245 y = p_ptr->y + ddy[dir];
246 x = p_ptr->x + ddx[dir];
248 if (cave[y][x].m_idx)
249 py_attack(y, x, HISSATSU_ZANMA);
252 msg_print(_("その方向にはモンスターはいません。", "There is no monster."));
259 if (name) return _("裂風剣", "Wind Blast");
260 if (desc) return _("攻撃した相手を後方へ吹き飛ばす。", "Attacks an adjacent monster, and blow it away.");
266 if (!get_direction(&dir, FALSE, FALSE)) return NULL;
267 if (dir == 5) return NULL;
269 y = p_ptr->y + ddy[dir];
270 x = p_ptr->x + ddx[dir];
272 if (cave[y][x].m_idx)
276 msg_print(_("その方向にはモンスターはいません。", "There is no monster."));
279 if (d_info[dungeon_type].flags1 & DF1_NO_MELEE)
283 if (cave[y][x].m_idx)
286 POSITION ty = y, tx = x;
287 POSITION oy = y, ox = x;
288 MONSTER_IDX m_idx = cave[y][x].m_idx;
289 monster_type *m_ptr = &m_list[m_idx];
292 monster_desc(m_name, m_ptr, 0);
294 for (i = 0; i < 5; i++)
298 if (cave_empty_bold(y, x))
305 if ((ty != oy) || (tx != ox))
307 msg_format(_("%sを吹き飛ばした!", "You blow %s away!"), m_name);
308 cave[oy][ox].m_idx = 0;
309 cave[ty][tx].m_idx = m_idx;
313 update_monster(m_idx, TRUE);
317 if (r_info[m_ptr->r_idx].flags7 & (RF7_LITE_MASK | RF7_DARK_MASK))
318 p_ptr->update |= (PU_MON_LITE);
325 if (name) return _("刀匠の目利き", "Judge");
326 if (desc) return _("武器・防具を1つ識別する。レベル45以上で武器・防具の能力を完全に知ることができる。",
327 "Identifies a weapon or armor. Or *identifies* these at level 45.");
333 if (!identify_fully(TRUE)) return NULL;
337 if (!ident_spell(TRUE)) return NULL;
343 if (name) return _("破岩斬", "Rock Smash");
344 if (desc) return _("岩を壊し、岩石系のモンスターに大ダメージを与える。", "Breaks rock. Or greatly damage a monster made by rocks.");
350 if (!get_direction(&dir, FALSE, FALSE)) return NULL;
351 if (dir == 5) return NULL;
353 y = p_ptr->y + ddy[dir];
354 x = p_ptr->x + ddx[dir];
356 if (cave[y][x].m_idx)
357 py_attack(y, x, HISSATSU_HAGAN);
359 if (!cave_have_flag_bold(y, x, FF_HURT_ROCK)) break;
361 /* Destroy the feature */
362 cave_alter_feat(y, x, FF_HURT_ROCK);
364 /* Update some things */
365 p_ptr->update |= (PU_FLOW);
370 if (name) return _("乱れ雪月花", "Midare-Setsugekka");
371 if (desc) return _("攻撃回数が増え、冷気耐性のないモンスターに大ダメージを与える。",
372 "Attacks a monster with increased number of attacks and more damage unless it has resistance to cold.");
378 if (!get_direction(&dir, FALSE, FALSE)) return NULL;
379 if (dir == 5) return NULL;
381 y = p_ptr->y + ddy[dir];
382 x = p_ptr->x + ddx[dir];
384 if (cave[y][x].m_idx)
385 py_attack(y, x, HISSATSU_COLD);
388 msg_print(_("その方向にはモンスターはいません。", "There is no monster."));
395 if (name) return _("急所突き", "Spot Aiming");
396 if (desc) return _("モンスターを一撃で倒す攻撃を繰り出す。失敗すると1点しかダメージを与えられない。",
397 "Attempts to kill a monster instantly. If failed cause only 1HP of damage.");
403 if (!get_direction(&dir, FALSE, FALSE)) return NULL;
404 if (dir == 5) return NULL;
406 y = p_ptr->y + ddy[dir];
407 x = p_ptr->x + ddx[dir];
409 if (cave[y][x].m_idx)
410 py_attack(y, x, HISSATSU_KYUSHO);
413 msg_print(_("その方向にはモンスターはいません。", "There is no monster."));
420 if (name) return _("魔神斬り", "Majingiri");
421 if (desc) return _("会心の一撃で攻撃する。攻撃がかわされやすい。",
422 "Attempts to attack with critical hit. But this attack is easy to evade for a monster.");
428 if (!get_direction(&dir, FALSE, FALSE)) return NULL;
429 if (dir == 5) return NULL;
431 y = p_ptr->y + ddy[dir];
432 x = p_ptr->x + ddx[dir];
434 if (cave[y][x].m_idx)
435 py_attack(y, x, HISSATSU_MAJIN);
438 msg_print(_("その方向にはモンスターはいません。", "There is no monster."));
445 if (name) return _("捨て身", "Desperate Attack");
446 if (desc) return _("強力な攻撃を繰り出す。次のターンまでの間、食らうダメージが増える。",
447 "Attacks with all of your power. But all damages you take will be doubled for one turn.");
453 if (!get_direction(&dir, FALSE, FALSE)) return NULL;
454 if (dir == 5) return NULL;
456 y = p_ptr->y + ddy[dir];
457 x = p_ptr->x + ddx[dir];
459 if (cave[y][x].m_idx)
460 py_attack(y, x, HISSATSU_SUTEMI);
463 msg_print(_("その方向にはモンスターはいません。", "There is no monster."));
466 p_ptr->sutemi = TRUE;
471 if (name) return _("雷撃鷲爪斬", "Lightning Eagle");
472 if (desc) return _("電撃耐性のないモンスターに非常に大きいダメージを与える。",
473 "Attacks a monster with more damage unless it has resistance to electricity.");
479 if (!get_direction(&dir, FALSE, FALSE)) return NULL;
480 if (dir == 5) return NULL;
482 y = p_ptr->y + ddy[dir];
483 x = p_ptr->x + ddx[dir];
485 if (cave[y][x].m_idx)
486 py_attack(y, x, HISSATSU_ELEC);
489 msg_print(_("その方向にはモンスターはいません。", "There is no monster."));
496 if (name) return _("入身", "Rush Attack");
497 if (desc) return _("素早く相手に近寄り攻撃する。", "Steps close to a monster and attacks at a time.");
501 if (!rush_attack(NULL)) return NULL;
506 if (name) return _("赤流渦", "Bloody Maelstrom");
507 if (desc) return _("自分自身も傷を作りつつ、その傷が深いほど大きい威力で全方向の敵を攻撃できる。生きていないモンスターには効果がない。",
508 "Attacks all adjacent monsters with power corresponding to your cut status. Then increases your cut status. No effect to unliving monsters.");
512 POSITION y = 0, x = 0;
517 if (p_ptr->cut < 300)
518 set_cut(p_ptr->cut + 300);
520 set_cut(p_ptr->cut * 2);
522 for (dir = 0; dir < 8; dir++)
524 y = p_ptr->y + ddy_ddd[dir];
525 x = p_ptr->x + ddx_ddd[dir];
528 /* Get the monster */
529 m_ptr = &m_list[c_ptr->m_idx];
531 /* Hack -- attack monsters */
532 if (c_ptr->m_idx && (m_ptr->ml || cave_have_flag_bold(y, x, FF_PROJECT)))
534 if (!monster_living(m_ptr->r_idx))
538 monster_desc(m_name, m_ptr, 0);
539 msg_format(_("%sには効果がない!", "%s is unharmed!"), m_name);
541 else py_attack(y, x, HISSATSU_SEKIRYUKA);
548 if (name) return _("激震撃", "Earthquake Blow");
549 if (desc) return _("地震を起こす。", "Shakes dungeon structure, and results in random swapping of floors and walls.");
555 if (!get_direction(&dir, FALSE, FALSE)) return NULL;
556 if (dir == 5) return NULL;
558 y = p_ptr->y + ddy[dir];
559 x = p_ptr->x + ddx[dir];
561 if (cave[y][x].m_idx)
562 py_attack(y, x, HISSATSU_QUAKE);
564 earthquake(p_ptr->y, p_ptr->x, 10);
569 if (name) return _("地走り", "Crack");
570 if (desc) return _("衝撃波のビームを放つ。", "Fires a beam of shock wave.");
574 int total_damage = 0, basedam, i;
575 BIT_FLAGS flgs[TR_FLAG_SIZE];
577 if (!get_aim_dir(&dir)) return NULL;
578 msg_print(_("武器を大きく振り下ろした。", "You swing your weapon downward."));
579 for (i = 0; i < 2; i++)
583 if (!buki_motteruka(INVEN_RARM + i)) break;
584 o_ptr = &inventory[INVEN_RARM + i];
585 basedam = (o_ptr->dd * (o_ptr->ds + 1)) * 50;
586 damage = o_ptr->to_d * 100;
587 object_flags(o_ptr, flgs);
588 if ((o_ptr->name1 == ART_VORPAL_BLADE) || (o_ptr->name1 == ART_CHAINSWORD))
594 else if (have_flag(flgs, TR_VORPAL))
596 /* vorpal flag only */
601 damage *= p_ptr->num_blow[i];
602 total_damage += damage / 200;
603 if (i) total_damage = total_damage * 7 / 10;
605 fire_beam(GF_FORCE, dir, total_damage);
610 if (name) return _("気迫の雄叫び", "War Cry");
611 if (desc) return _("視界内の全モンスターに対して轟音の攻撃を行う。さらに、近くにいるモンスターを怒らせる。",
612 "Damages all monsters in sight with sound. Aggravate nearby monsters.");
616 msg_print(_("雄叫びをあげた!", "You roar out!"));
617 project_all_los(GF_SOUND, randint1(plev * 3));
618 aggravate_monsters(0);
623 if (name) return _("無双三段", "Musou-Sandan");
624 if (desc) return _("強力な3段攻撃を繰り出す。", "Attacks with powerful 3 strikes.");
630 if (!get_direction(&dir, FALSE, FALSE)) return NULL;
631 if (dir == 5) return NULL;
633 for (i = 0; i < 3; i++)
641 y = p_ptr->y + ddy[dir];
642 x = p_ptr->x + ddx[dir];
646 py_attack(y, x, HISSATSU_3DAN);
649 msg_print(_("その方向にはモンスターはいません。", "There is no monster."));
653 if (d_info[dungeon_type].flags1 & DF1_NO_MELEE)
658 /* Monster is dead? */
659 if (!c_ptr->m_idx) break;
663 m_idx = c_ptr->m_idx;
664 m_ptr = &m_list[m_idx];
666 /* Monster cannot move back? */
667 if (!monster_can_enter(ny, nx, &r_info[m_ptr->r_idx], 0))
670 if (i < 2) msg_print(NULL);
675 cave[ny][nx].m_idx = m_idx;
679 update_monster(m_idx, TRUE);
681 /* Redraw the old spot */
684 /* Redraw the new spot */
687 /* Player can move forward? */
688 if (player_can_enter(c_ptr->feat, 0))
690 /* Move the player */
691 if (!move_player_effect(y, x, MPE_FORGET_FLOW | MPE_HANDLE_STUFF | MPE_DONT_PICKUP)) break;
699 if (i < 2) msg_print(NULL);
705 if (name) return _("吸血鬼の牙", "Vampire's Fang");
706 if (desc) return _("攻撃した相手の体力を吸いとり、自分の体力を回復させる。生命を持たないモンスターには通じない。",
707 "Attacks with vampiric strikes which absorbs HP from a monster and gives them to you. No effect to unliving monsters.");
713 if (!get_direction(&dir, FALSE, FALSE)) return NULL;
714 if (dir == 5) return NULL;
716 y = p_ptr->y + ddy[dir];
717 x = p_ptr->x + ddx[dir];
719 if (cave[y][x].m_idx)
720 py_attack(y, x, HISSATSU_DRAIN);
723 msg_print(_("その方向にはモンスターはいません。", "There is no monster."));
730 if (name) return _("幻惑", "Moon Dazzling");
731 if (desc) return _("視界内の起きている全モンスターに朦朧、混乱、眠りを与えようとする。", "Attempts to stun, confuse and sleep all waking monsters.");
735 msg_print(_("武器を不規則に揺らした...", "You irregularly wave your weapon..."));
736 project_all_los(GF_ENGETSU, plev * 4);
737 project_all_los(GF_ENGETSU, plev * 4);
738 project_all_los(GF_ENGETSU, plev * 4);
743 if (name) return _("百人斬り", "Hundred Slaughter");
744 if (desc) return _("連続して入身でモンスターを攻撃する。攻撃するたびにMPを消費。MPがなくなるか、モンスターを倒せなかったら百人斬りは終了する。",
745 "Performs a series of rush attacks. The series continues while killing each monster in a time and SP remains.");
749 const int mana_cost_per_monster = 8;
755 if (!rush_attack(&mdeath)) break;
758 /* Reserve needed mana point */
759 p_ptr->csp -= technic_info[REALM_HISSATSU - MIN_TECHNIC][26].smana;
763 p_ptr->csp -= mana_cost_per_monster;
768 p_ptr->redraw |= PR_MANA;
770 } while (p_ptr->csp > mana_cost_per_monster);
772 if (is_new) return NULL;
774 /* Restore reserved mana */
775 p_ptr->csp += technic_info[REALM_HISSATSU - MIN_TECHNIC][26].smana;
780 if (name) return _("天翔龍閃", "Dragonic Flash");
781 if (desc) return _("視界内の場所を指定して、その場所と自分の間にいる全モンスターを攻撃し、その場所に移動する。",
782 "Runs toward given location while attacking all monsters on the path.");
788 if (!tgt_pt(&x, &y)) return NULL;
790 if (!cave_player_teleportable_bold(y, x, 0L) ||
791 (distance(y, x, p_ptr->y, p_ptr->x) > MAX_SIGHT / 2) ||
792 !projectable(p_ptr->y, p_ptr->x, y, x))
794 msg_print(_("失敗!", "You cannot move to that place!"));
797 if (p_ptr->anti_tele)
799 msg_print(_("不思議な力がテレポートを防いだ!", "A mysterious force prevents you from teleporting!"));
802 project(0, 0, y, x, HISSATSU_ISSEN, GF_ATTACK, PROJECT_BEAM | PROJECT_KILL, -1);
803 teleport_player_to(y, x, 0L);
808 if (name) return _("二重の剣撃", "Twin Slash");
809 if (desc) return _("1ターンで2度攻撃を行う。", "double attacks at a time.");
815 if (!get_rep_dir(&dir, FALSE)) return NULL;
817 y = p_ptr->y + ddy[dir];
818 x = p_ptr->x + ddx[dir];
820 if (cave[y][x].m_idx)
823 if (cave[y][x].m_idx)
831 msg_print(_("その方向にはモンスターはいません。", "You don't see any monster in this direction"));
838 if (name) return _("虎伏絶刀勢", "Kofuku-Zettousei");
839 if (desc) return _("強力な攻撃を行い、近くの場所にも効果が及ぶ。", "Performs a powerful attack which even effect nearby monsters.");
843 int total_damage = 0, basedam, i;
845 BIT_FLAGS flgs[TR_FLAG_SIZE];
848 if (!get_direction(&dir, FALSE, FALSE)) return NULL;
849 if (dir == 5) return NULL;
851 y = p_ptr->y + ddy[dir];
852 x = p_ptr->x + ddx[dir];
854 if (d_info[dungeon_type].flags1 & DF1_NO_MELEE)
856 msg_print(_("なぜか攻撃することができない。", "Something prevent you from attacking."));
859 msg_print(_("武器を大きく振り下ろした。", "You swing your weapon downward."));
860 for (i = 0; i < 2; i++)
863 if (!buki_motteruka(INVEN_RARM + i)) break;
864 o_ptr = &inventory[INVEN_RARM + i];
865 basedam = (o_ptr->dd * (o_ptr->ds + 1)) * 50;
866 damage = o_ptr->to_d * 100;
867 object_flags(o_ptr, flgs);
868 if ((o_ptr->name1 == ART_VORPAL_BLADE) || (o_ptr->name1 == ART_CHAINSWORD))
874 else if (have_flag(flgs, TR_VORPAL))
876 /* vorpal flag only */
881 damage += p_ptr->to_d[i] * 100;
882 damage *= p_ptr->num_blow[i];
883 total_damage += (damage / 100);
885 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);
890 if (name) return _("慶雲鬼忍剣", "Keiun-Kininken");
891 if (desc) return _("自分もダメージをくらうが、相手に非常に大きなダメージを与える。アンデッドには特に効果がある。",
892 "Attacks a monster with extremely powerful damage. But you also takes some damages. Hurts a undead monster greatly.");
898 if (!get_direction(&dir, FALSE, FALSE)) return NULL;
899 if (dir == 5) return NULL;
901 y = p_ptr->y + ddy[dir];
902 x = p_ptr->x + ddx[dir];
904 if (cave[y][x].m_idx)
905 py_attack(y, x, HISSATSU_UNDEAD);
908 msg_print(_("その方向にはモンスターはいません。", "There is no monster."));
911 take_hit(DAMAGE_NOESCAPE, 100 + randint1(100), _("慶雲鬼忍剣を使った衝撃", "exhaustion on using Keiun-Kininken"), -1);
916 if (name) return _("切腹", "Harakiri");
917 if (desc) return _("「武士道とは、死ぬことと見つけたり。」", "'Busido is found in death'");
922 if (!get_check(_("本当に自殺しますか?", "Do you really want to commit suicide? "))) return NULL;
923 /* Special Verification for suicide */
924 prt(_("確認のため '@' を押して下さい。", "Please verify SUICIDE by typing the '@' sign: "), 0, 0);
929 if (i != '@') return NULL;
930 if (p_ptr->total_winner)
932 take_hit(DAMAGE_FORCE, 9999, "Seppuku", -1);
933 p_ptr->total_winner = TRUE;
937 msg_print(_("武士道とは、死ぬことと見つけたり。", "Meaning of Bushi-do is found in the death."));
938 take_hit(DAMAGE_FORCE, 9999, "Seppuku", -1);