4 #include "monsterrace-hook.h"
5 #include "projection.h"
11 * @param mode 処理内容 (SPELL_NAME / SPELL_DESC / SPELL_CAST)
12 * @return SPELL_NAME / SPELL_DESC 時には文字列ポインタを返す。SPELL_CAST時はNULL文字列を返す。
14 concptr do_hissatsu_spell(SPELL_IDX spell, BIT_FLAGS mode)
16 bool name = (mode == SPELL_NAME) ? TRUE : FALSE;
17 bool desc = (mode == SPELL_DESC) ? TRUE : FALSE;
18 bool cast = (mode == SPELL_CAST) ? TRUE : FALSE;
21 PLAYER_LEVEL plev = p_ptr->lev;
26 if (name) return _("飛飯綱", "Tobi-Izuna");
27 if (desc) return _("2マス離れたところにいるモンスターを攻撃する。", "Attacks a two squares distant monster.");
32 if (!get_aim_dir(&dir)) return NULL;
34 project_hook(GF_ATTACK, dir, HISSATSU_2, PROJECT_STOP | PROJECT_KILL);
39 if (name) return _("五月雨斬り", "3-Way Attack");
40 if (desc) return _("3方向に対して攻撃する。", "Attacks in 3 directions in one time.");
47 if (!get_direction(&dir, FALSE, FALSE)) return NULL;
48 if (dir == 5) return NULL;
50 for (cdir = 0; cdir < 8; cdir++)
52 if (cdd[cdir] == dir) break;
55 if (cdir == 8) return NULL;
57 y = p_ptr->y + ddy_cdd[cdir];
58 x = p_ptr->x + ddx_cdd[cdir];
62 msg_print(_("攻撃は空を切った。", "You attack the empty air."));
64 y = p_ptr->y + ddy_cdd[(cdir + 7) % 8];
65 x = p_ptr->x + ddx_cdd[(cdir + 7) % 8];
69 msg_print(_("攻撃は空を切った。", "You attack the empty air."));
71 y = p_ptr->y + ddy_cdd[(cdir + 1) % 8];
72 x = p_ptr->x + ddx_cdd[(cdir + 1) % 8];
76 msg_print(_("攻撃は空を切った。", "You attack the empty air."));
81 if (name) return _("ブーメラン", "Boomerang");
82 if (desc) return _("武器を手元に戻ってくるように投げる。戻ってこないこともある。",
83 "Throws current weapon. And it'll return to your hand unless failed.");
87 if (!do_cmd_throw(1, TRUE, -1)) return NULL;
92 if (name) return _("焔霊", "Burning Strike");
93 if (desc) return _("火炎耐性のないモンスターに大ダメージを与える。", "Attacks a monster with more damage unless it has resistance to fire.");
99 if (!get_direction(&dir, FALSE, FALSE)) return NULL;
100 if (dir == 5) return NULL;
102 y = p_ptr->y + ddy[dir];
103 x = p_ptr->x + ddx[dir];
105 if (cave[y][x].m_idx)
106 py_attack(y, x, HISSATSU_FIRE);
109 msg_print(_("その方向にはモンスターはいません。", "There is no monster."));
116 if (name) return _("殺気感知", "Detect Ferocity");
117 if (desc) return _("近くの思考することができるモンスターを感知する。", "Detects all monsters except mindless in your vicinity.");
121 detect_monsters_mind(DETECT_RAD_DEFAULT);
126 if (name) return _("みね打ち", "Strike to Stun");
127 if (desc) return _("相手にダメージを与えないが、朦朧とさせる。", "Attempts to stun a monster in the adjacent.");
133 if (!get_direction(&dir, FALSE, FALSE)) return NULL;
134 if (dir == 5) return NULL;
136 y = p_ptr->y + ddy[dir];
137 x = p_ptr->x + ddx[dir];
139 if (cave[y][x].m_idx)
140 py_attack(y, x, HISSATSU_MINEUCHI);
143 msg_print(_("その方向にはモンスターはいません。", "There is no monster."));
150 if (name) return _("カウンター", "Counter");
151 if (desc) return _("相手に攻撃されたときに反撃する。反撃するたびにMPを消費。",
152 "Prepares to counterattack. When attack by a monster, strikes back using SP each time.");
158 msg_print(_("乗馬中には無理だ。", "You cannot do it when riding."));
161 msg_print(_("相手の攻撃に対して身構えた。", "You prepare to counter blow."));
162 p_ptr->counter = TRUE;
167 if (name) return _("払い抜け", "Harainuke");
168 if (desc) return _("攻撃した後、反対側に抜ける。",
169 "Attacks monster with your weapons normally, then move through counter side of the monster.");
177 msg_print(_("乗馬中には無理だ。", "You cannot do it when riding."));
181 if (!get_direction(&dir, FALSE, FALSE)) return NULL;
183 if (dir == 5) return NULL;
184 y = p_ptr->y + ddy[dir];
185 x = p_ptr->x + ddx[dir];
187 if (!cave[y][x].m_idx)
189 msg_print(_("その方向にはモンスターはいません。", "There is no monster."));
195 if (!player_can_enter(cave[y][x].feat, 0) || is_trap(cave[y][x].feat))
201 if (player_can_enter(cave[y][x].feat, 0) && !is_trap(cave[y][x].feat) && !cave[y][x].m_idx)
205 /* Move the player */
206 (void)move_player_effect(y, x, MPE_FORGET_FLOW | MPE_HANDLE_STUFF | MPE_DONT_PICKUP);
212 if (name) return _("サーペンツタン", "Serpent's Tongue");
213 if (desc) return _("毒耐性のないモンスターに大ダメージを与える。", "Attacks a monster with more damage unless it has resistance to poison.");
219 if (!get_direction(&dir, FALSE, FALSE)) return NULL;
220 if (dir == 5) return NULL;
222 y = p_ptr->y + ddy[dir];
223 x = p_ptr->x + ddx[dir];
225 if (cave[y][x].m_idx)
226 py_attack(y, x, HISSATSU_POISON);
229 msg_print(_("その方向にはモンスターはいません。", "There is no monster."));
236 if (name) return _("斬魔剣弐の太刀", "Zammaken");
237 if (desc) return _("生命のない邪悪なモンスターに大ダメージを与えるが、他のモンスターには全く効果がない。",
238 "Attacks an evil unliving monster with great damage. No effect to other monsters.");
244 if (!get_direction(&dir, FALSE, FALSE)) return NULL;
245 if (dir == 5) return NULL;
247 y = p_ptr->y + ddy[dir];
248 x = p_ptr->x + ddx[dir];
250 if (cave[y][x].m_idx)
251 py_attack(y, x, HISSATSU_ZANMA);
254 msg_print(_("その方向にはモンスターはいません。", "There is no monster."));
261 if (name) return _("裂風剣", "Wind Blast");
262 if (desc) return _("攻撃した相手を後方へ吹き飛ばす。", "Attacks an adjacent monster, and blow it away.");
268 if (!get_direction(&dir, FALSE, FALSE)) return NULL;
269 if (dir == 5) return NULL;
271 y = p_ptr->y + ddy[dir];
272 x = p_ptr->x + ddx[dir];
274 if (cave[y][x].m_idx)
278 msg_print(_("その方向にはモンスターはいません。", "There is no monster."));
281 if (d_info[dungeon_type].flags1 & DF1_NO_MELEE)
285 if (cave[y][x].m_idx)
288 POSITION ty = y, tx = x;
289 POSITION oy = y, ox = x;
290 MONSTER_IDX m_idx = cave[y][x].m_idx;
291 monster_type *m_ptr = &m_list[m_idx];
292 GAME_TEXT m_name[MAX_NLEN];
294 monster_desc(m_name, m_ptr, 0);
296 for (i = 0; i < 5; i++)
300 if (cave_empty_bold(y, x))
307 if ((ty != oy) || (tx != ox))
309 msg_format(_("%sを吹き飛ばした!", "You blow %s away!"), m_name);
310 cave[oy][ox].m_idx = 0;
311 cave[ty][tx].m_idx = m_idx;
315 update_monster(m_idx, TRUE);
319 if (r_info[m_ptr->r_idx].flags7 & (RF7_LITE_MASK | RF7_DARK_MASK))
320 p_ptr->update |= (PU_MON_LITE);
327 if (name) return _("刀匠の目利き", "Judge");
328 if (desc) return _("武器・防具を1つ識別する。レベル45以上で武器・防具の能力を完全に知ることができる。",
329 "Identifies a weapon or armor. Or *identifies* these at level 45.");
335 if (!identify_fully(TRUE)) return NULL;
339 if (!ident_spell(TRUE)) return NULL;
345 if (name) return _("破岩斬", "Rock Smash");
346 if (desc) return _("岩を壊し、岩石系のモンスターに大ダメージを与える。", "Breaks rock. Or greatly damage a monster made by rocks.");
352 if (!get_direction(&dir, FALSE, FALSE)) return NULL;
353 if (dir == 5) return NULL;
355 y = p_ptr->y + ddy[dir];
356 x = p_ptr->x + ddx[dir];
358 if (cave[y][x].m_idx)
359 py_attack(y, x, HISSATSU_HAGAN);
361 if (!cave_have_flag_bold(y, x, FF_HURT_ROCK)) break;
363 /* Destroy the feature */
364 cave_alter_feat(y, x, FF_HURT_ROCK);
366 /* Update some things */
367 p_ptr->update |= (PU_FLOW);
372 if (name) return _("乱れ雪月花", "Midare-Setsugekka");
373 if (desc) return _("攻撃回数が増え、冷気耐性のないモンスターに大ダメージを与える。",
374 "Attacks a monster with increased number of attacks and more damage unless it has resistance to cold.");
380 if (!get_direction(&dir, FALSE, FALSE)) return NULL;
381 if (dir == 5) return NULL;
383 y = p_ptr->y + ddy[dir];
384 x = p_ptr->x + ddx[dir];
386 if (cave[y][x].m_idx)
387 py_attack(y, x, HISSATSU_COLD);
390 msg_print(_("その方向にはモンスターはいません。", "There is no monster."));
397 if (name) return _("急所突き", "Spot Aiming");
398 if (desc) return _("モンスターを一撃で倒す攻撃を繰り出す。失敗すると1点しかダメージを与えられない。",
399 "Attempts to kill a monster instantly. If failed cause only 1HP of damage.");
405 if (!get_direction(&dir, FALSE, FALSE)) return NULL;
406 if (dir == 5) return NULL;
408 y = p_ptr->y + ddy[dir];
409 x = p_ptr->x + ddx[dir];
411 if (cave[y][x].m_idx)
412 py_attack(y, x, HISSATSU_KYUSHO);
415 msg_print(_("その方向にはモンスターはいません。", "There is no monster."));
422 if (name) return _("魔神斬り", "Majingiri");
423 if (desc) return _("会心の一撃で攻撃する。攻撃がかわされやすい。",
424 "Attempts to attack with critical hit. But this attack is easy to evade for a monster.");
430 if (!get_direction(&dir, FALSE, FALSE)) return NULL;
431 if (dir == 5) return NULL;
433 y = p_ptr->y + ddy[dir];
434 x = p_ptr->x + ddx[dir];
436 if (cave[y][x].m_idx)
437 py_attack(y, x, HISSATSU_MAJIN);
440 msg_print(_("その方向にはモンスターはいません。", "There is no monster."));
447 if (name) return _("捨て身", "Desperate Attack");
448 if (desc) return _("強力な攻撃を繰り出す。次のターンまでの間、食らうダメージが増える。",
449 "Attacks with all of your power. But all damages you take will be doubled for one turn.");
455 if (!get_direction(&dir, FALSE, FALSE)) return NULL;
456 if (dir == 5) return NULL;
458 y = p_ptr->y + ddy[dir];
459 x = p_ptr->x + ddx[dir];
461 if (cave[y][x].m_idx)
462 py_attack(y, x, HISSATSU_SUTEMI);
465 msg_print(_("その方向にはモンスターはいません。", "There is no monster."));
468 p_ptr->sutemi = TRUE;
473 if (name) return _("雷撃鷲爪斬", "Lightning Eagle");
474 if (desc) return _("電撃耐性のないモンスターに非常に大きいダメージを与える。",
475 "Attacks a monster with more damage unless it has resistance to electricity.");
481 if (!get_direction(&dir, FALSE, FALSE)) return NULL;
482 if (dir == 5) return NULL;
484 y = p_ptr->y + ddy[dir];
485 x = p_ptr->x + ddx[dir];
487 if (cave[y][x].m_idx)
488 py_attack(y, x, HISSATSU_ELEC);
491 msg_print(_("その方向にはモンスターはいません。", "There is no monster."));
498 if (name) return _("入身", "Rush Attack");
499 if (desc) return _("素早く相手に近寄り攻撃する。", "Steps close to a monster and attacks at a time.");
503 if (!rush_attack(NULL)) return NULL;
508 if (name) return _("赤流渦", "Bloody Maelstrom");
509 if (desc) return _("自分自身も傷を作りつつ、その傷が深いほど大きい威力で全方向の敵を攻撃できる。生きていないモンスターには効果がない。",
510 "Attacks all adjacent monsters with power corresponding to your cut status. Then increases your cut status. No effect to unliving monsters.");
514 POSITION y = 0, x = 0;
519 if (p_ptr->cut < 300)
520 set_cut(p_ptr->cut + 300);
522 set_cut(p_ptr->cut * 2);
524 for (dir = 0; dir < 8; dir++)
526 y = p_ptr->y + ddy_ddd[dir];
527 x = p_ptr->x + ddx_ddd[dir];
530 /* Get the monster */
531 m_ptr = &m_list[c_ptr->m_idx];
533 /* Hack -- attack monsters */
534 if (c_ptr->m_idx && (m_ptr->ml || cave_have_flag_bold(y, x, FF_PROJECT)))
536 if (!monster_living(m_ptr->r_idx))
538 GAME_TEXT m_name[MAX_NLEN];
540 monster_desc(m_name, m_ptr, 0);
541 msg_format(_("%sには効果がない!", "%s is unharmed!"), m_name);
543 else py_attack(y, x, HISSATSU_SEKIRYUKA);
550 if (name) return _("激震撃", "Earthquake Blow");
551 if (desc) return _("地震を起こす。", "Shakes dungeon structure, and results in random swapping of floors and walls.");
557 if (!get_direction(&dir, FALSE, FALSE)) return NULL;
558 if (dir == 5) return NULL;
560 y = p_ptr->y + ddy[dir];
561 x = p_ptr->x + ddx[dir];
563 if (cave[y][x].m_idx)
564 py_attack(y, x, HISSATSU_QUAKE);
566 earthquake(p_ptr->y, p_ptr->x, 10);
571 if (name) return _("地走り", "Crack");
572 if (desc) return _("衝撃波のビームを放つ。", "Fires a beam of shock wave.");
576 int total_damage = 0, basedam, i;
577 BIT_FLAGS flgs[TR_FLAG_SIZE];
579 if (!get_aim_dir(&dir)) return NULL;
580 msg_print(_("武器を大きく振り下ろした。", "You swing your weapon downward."));
581 for (i = 0; i < 2; i++)
585 if (!buki_motteruka(INVEN_RARM + i)) break;
586 o_ptr = &inventory[INVEN_RARM + i];
587 basedam = (o_ptr->dd * (o_ptr->ds + 1)) * 50;
588 damage = o_ptr->to_d * 100;
589 object_flags(o_ptr, flgs);
590 if ((o_ptr->name1 == ART_VORPAL_BLADE) || (o_ptr->name1 == ART_CHAINSWORD))
596 else if (have_flag(flgs, TR_VORPAL))
598 /* vorpal flag only */
603 damage *= p_ptr->num_blow[i];
604 total_damage += damage / 200;
605 if (i) total_damage = total_damage * 7 / 10;
607 fire_beam(GF_FORCE, dir, total_damage);
612 if (name) return _("気迫の雄叫び", "War Cry");
613 if (desc) return _("視界内の全モンスターに対して轟音の攻撃を行う。さらに、近くにいるモンスターを怒らせる。",
614 "Damages all monsters in sight with sound. Aggravate nearby monsters.");
618 msg_print(_("雄叫びをあげた!", "You roar out!"));
619 project_all_los(GF_SOUND, randint1(plev * 3));
620 aggravate_monsters(0);
625 if (name) return _("無双三段", "Musou-Sandan");
626 if (desc) return _("強力な3段攻撃を繰り出す。", "Attacks with powerful 3 strikes.");
632 if (!get_direction(&dir, FALSE, FALSE)) return NULL;
633 if (dir == 5) return NULL;
635 for (i = 0; i < 3; i++)
643 y = p_ptr->y + ddy[dir];
644 x = p_ptr->x + ddx[dir];
648 py_attack(y, x, HISSATSU_3DAN);
651 msg_print(_("その方向にはモンスターはいません。", "There is no monster."));
655 if (d_info[dungeon_type].flags1 & DF1_NO_MELEE)
660 /* Monster is dead? */
661 if (!c_ptr->m_idx) break;
665 m_idx = c_ptr->m_idx;
666 m_ptr = &m_list[m_idx];
668 /* Monster cannot move back? */
669 if (!monster_can_enter(ny, nx, &r_info[m_ptr->r_idx], 0))
672 if (i < 2) msg_print(NULL);
677 cave[ny][nx].m_idx = m_idx;
681 update_monster(m_idx, TRUE);
683 /* Redraw the old spot */
686 /* Redraw the new spot */
689 /* Player can move forward? */
690 if (player_can_enter(c_ptr->feat, 0))
692 /* Move the player */
693 if (!move_player_effect(y, x, MPE_FORGET_FLOW | MPE_HANDLE_STUFF | MPE_DONT_PICKUP)) break;
701 if (i < 2) msg_print(NULL);
707 if (name) return _("吸血鬼の牙", "Vampire's Fang");
708 if (desc) return _("攻撃した相手の体力を吸いとり、自分の体力を回復させる。生命を持たないモンスターには通じない。",
709 "Attacks with vampiric strikes which absorbs HP from a monster and gives them to you. No effect to unliving monsters.");
715 if (!get_direction(&dir, FALSE, FALSE)) return NULL;
716 if (dir == 5) return NULL;
718 y = p_ptr->y + ddy[dir];
719 x = p_ptr->x + ddx[dir];
721 if (cave[y][x].m_idx)
722 py_attack(y, x, HISSATSU_DRAIN);
725 msg_print(_("その方向にはモンスターはいません。", "There is no monster."));
732 if (name) return _("幻惑", "Moon Dazzling");
733 if (desc) return _("視界内の起きている全モンスターに朦朧、混乱、眠りを与えようとする。", "Attempts to stun, confuse and sleep all waking monsters.");
737 msg_print(_("武器を不規則に揺らした...", "You irregularly wave your weapon..."));
738 project_all_los(GF_ENGETSU, plev * 4);
739 project_all_los(GF_ENGETSU, plev * 4);
740 project_all_los(GF_ENGETSU, plev * 4);
745 if (name) return _("百人斬り", "Hundred Slaughter");
746 if (desc) return _("連続して入身でモンスターを攻撃する。攻撃するたびにMPを消費。MPがなくなるか、モンスターを倒せなかったら百人斬りは終了する。",
747 "Performs a series of rush attacks. The series continues while killing each monster in a time and SP remains.");
751 const int mana_cost_per_monster = 8;
757 if (!rush_attack(&mdeath)) break;
760 /* Reserve needed mana point */
761 p_ptr->csp -= technic_info[REALM_HISSATSU - MIN_TECHNIC][26].smana;
765 p_ptr->csp -= mana_cost_per_monster;
770 p_ptr->redraw |= PR_MANA;
772 } while (p_ptr->csp > mana_cost_per_monster);
774 if (is_new) return NULL;
776 /* Restore reserved mana */
777 p_ptr->csp += technic_info[REALM_HISSATSU - MIN_TECHNIC][26].smana;
782 if (name) return _("天翔龍閃", "Dragonic Flash");
783 if (desc) return _("視界内の場所を指定して、その場所と自分の間にいる全モンスターを攻撃し、その場所に移動する。",
784 "Runs toward given location while attacking all monsters on the path.");
790 if (!tgt_pt(&x, &y)) return NULL;
792 if (!cave_player_teleportable_bold(y, x, 0L) ||
793 (distance(y, x, p_ptr->y, p_ptr->x) > MAX_SIGHT / 2) ||
794 !projectable(p_ptr->y, p_ptr->x, y, x))
796 msg_print(_("失敗!", "You cannot move to that place!"));
799 if (p_ptr->anti_tele)
801 msg_print(_("不思議な力がテレポートを防いだ!", "A mysterious force prevents you from teleporting!"));
804 project(0, 0, y, x, HISSATSU_ISSEN, GF_ATTACK, PROJECT_BEAM | PROJECT_KILL, -1);
805 teleport_player_to(y, x, 0L);
810 if (name) return _("二重の剣撃", "Twin Slash");
811 if (desc) return _("1ターンで2度攻撃を行う。", "double attacks at a time.");
817 if (!get_rep_dir(&dir, FALSE)) return NULL;
819 y = p_ptr->y + ddy[dir];
820 x = p_ptr->x + ddx[dir];
822 if (cave[y][x].m_idx)
825 if (cave[y][x].m_idx)
833 msg_print(_("その方向にはモンスターはいません。", "You don't see any monster in this direction"));
840 if (name) return _("虎伏絶刀勢", "Kofuku-Zettousei");
841 if (desc) return _("強力な攻撃を行い、近くの場所にも効果が及ぶ。", "Performs a powerful attack which even effect nearby monsters.");
845 int total_damage = 0, basedam, i;
847 BIT_FLAGS flgs[TR_FLAG_SIZE];
850 if (!get_direction(&dir, FALSE, FALSE)) return NULL;
851 if (dir == 5) return NULL;
853 y = p_ptr->y + ddy[dir];
854 x = p_ptr->x + ddx[dir];
856 if (d_info[dungeon_type].flags1 & DF1_NO_MELEE)
858 msg_print(_("なぜか攻撃することができない。", "Something prevent you from attacking."));
861 msg_print(_("武器を大きく振り下ろした。", "You swing your weapon downward."));
862 for (i = 0; i < 2; i++)
865 if (!buki_motteruka(INVEN_RARM + i)) break;
866 o_ptr = &inventory[INVEN_RARM + i];
867 basedam = (o_ptr->dd * (o_ptr->ds + 1)) * 50;
868 damage = o_ptr->to_d * 100;
869 object_flags(o_ptr, flgs);
870 if ((o_ptr->name1 == ART_VORPAL_BLADE) || (o_ptr->name1 == ART_CHAINSWORD))
876 else if (have_flag(flgs, TR_VORPAL))
878 /* vorpal flag only */
883 damage += p_ptr->to_d[i] * 100;
884 damage *= p_ptr->num_blow[i];
885 total_damage += (damage / 100);
887 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);
892 if (name) return _("慶雲鬼忍剣", "Keiun-Kininken");
893 if (desc) return _("自分もダメージをくらうが、相手に非常に大きなダメージを与える。アンデッドには特に効果がある。",
894 "Attacks a monster with extremely powerful damage. But you also takes some damages. Hurts a undead monster greatly.");
900 if (!get_direction(&dir, FALSE, FALSE)) return NULL;
901 if (dir == 5) return NULL;
903 y = p_ptr->y + ddy[dir];
904 x = p_ptr->x + ddx[dir];
906 if (cave[y][x].m_idx)
907 py_attack(y, x, HISSATSU_UNDEAD);
910 msg_print(_("その方向にはモンスターはいません。", "There is no monster."));
913 take_hit(DAMAGE_NOESCAPE, 100 + randint1(100), _("慶雲鬼忍剣を使った衝撃", "exhaustion on using Keiun-Kininken"), -1);
918 if (name) return _("切腹", "Harakiri");
919 if (desc) return _("「武士道とは、死ぬことと見つけたり。」", "'Busido is found in death'");
924 if (!get_check(_("本当に自殺しますか?", "Do you really want to commit suicide? "))) return NULL;
925 /* Special Verification for suicide */
926 prt(_("確認のため '@' を押して下さい。", "Please verify SUICIDE by typing the '@' sign: "), 0, 0);
931 if (i != '@') return NULL;
932 if (p_ptr->total_winner)
934 take_hit(DAMAGE_FORCE, 9999, "Seppuku", -1);
935 p_ptr->total_winner = TRUE;
939 msg_print(_("武士道とは、死ぬことと見つけたり。", "Meaning of Bushi-do is found in the death."));
940 take_hit(DAMAGE_FORCE, 9999, "Seppuku", -1);