4 #include "monsterrace-hook.h"
5 #include "projection.h"
7 #include "player-status.h"
12 * @param mode 処理内容 (SPELL_NAME / SPELL_DESC / SPELL_CAST)
13 * @return SPELL_NAME / SPELL_DESC 時には文字列ポインタを返す。SPELL_CAST時はNULL文字列を返す。
15 concptr do_hissatsu_spell(SPELL_IDX spell, BIT_FLAGS mode)
17 bool name = (mode == SPELL_NAME) ? TRUE : FALSE;
18 bool desc = (mode == SPELL_DESC) ? TRUE : FALSE;
19 bool cast = (mode == SPELL_CAST) ? TRUE : FALSE;
22 PLAYER_LEVEL plev = p_ptr->lev;
27 if (name) return _("飛飯綱", "Tobi-Izuna");
28 if (desc) return _("2マス離れたところにいるモンスターを攻撃する。", "Attacks a two squares distant monster.");
33 if (!get_aim_dir(&dir)) return NULL;
35 project_hook(GF_ATTACK, dir, HISSATSU_2, PROJECT_STOP | PROJECT_KILL);
40 if (name) return _("五月雨斬り", "3-Way Attack");
41 if (desc) return _("3方向に対して攻撃する。", "Attacks in 3 directions in one time.");
48 if (!get_direction(&dir, FALSE, FALSE)) return NULL;
49 if (dir == 5) return NULL;
51 for (cdir = 0; cdir < 8; cdir++)
53 if (cdd[cdir] == dir) break;
56 if (cdir == 8) return NULL;
58 y = p_ptr->y + ddy_cdd[cdir];
59 x = p_ptr->x + ddx_cdd[cdir];
63 msg_print(_("攻撃は空を切った。", "You attack the empty air."));
65 y = p_ptr->y + ddy_cdd[(cdir + 7) % 8];
66 x = p_ptr->x + ddx_cdd[(cdir + 7) % 8];
70 msg_print(_("攻撃は空を切った。", "You attack the empty air."));
72 y = p_ptr->y + ddy_cdd[(cdir + 1) % 8];
73 x = p_ptr->x + ddx_cdd[(cdir + 1) % 8];
77 msg_print(_("攻撃は空を切った。", "You attack the empty air."));
82 if (name) return _("ブーメラン", "Boomerang");
83 if (desc) return _("武器を手元に戻ってくるように投げる。戻ってこないこともある。",
84 "Throws current weapon. And it'll return to your hand unless failed.");
88 if (!do_cmd_throw(1, TRUE, -1)) return NULL;
93 if (name) return _("焔霊", "Burning Strike");
94 if (desc) return _("火炎耐性のないモンスターに大ダメージを与える。", "Attacks a monster with more damage unless it has resistance to fire.");
100 if (!get_direction(&dir, FALSE, FALSE)) return NULL;
101 if (dir == 5) return NULL;
103 y = p_ptr->y + ddy[dir];
104 x = p_ptr->x + ddx[dir];
106 if (cave[y][x].m_idx)
107 py_attack(y, x, HISSATSU_FIRE);
110 msg_print(_("その方向にはモンスターはいません。", "There is no monster."));
117 if (name) return _("殺気感知", "Detect Ferocity");
118 if (desc) return _("近くの思考することができるモンスターを感知する。", "Detects all monsters except mindless in your vicinity.");
122 detect_monsters_mind(DETECT_RAD_DEFAULT);
127 if (name) return _("みね打ち", "Strike to Stun");
128 if (desc) return _("相手にダメージを与えないが、朦朧とさせる。", "Attempts to stun a monster in the adjacent.");
134 if (!get_direction(&dir, FALSE, FALSE)) return NULL;
135 if (dir == 5) return NULL;
137 y = p_ptr->y + ddy[dir];
138 x = p_ptr->x + ddx[dir];
140 if (cave[y][x].m_idx)
141 py_attack(y, x, HISSATSU_MINEUCHI);
144 msg_print(_("その方向にはモンスターはいません。", "There is no monster."));
151 if (name) return _("カウンター", "Counter");
152 if (desc) return _("相手に攻撃されたときに反撃する。反撃するたびにMPを消費。",
153 "Prepares to counterattack. When attack by a monster, strikes back using SP each time.");
159 msg_print(_("乗馬中には無理だ。", "You cannot do it when riding."));
162 msg_print(_("相手の攻撃に対して身構えた。", "You prepare to counter blow."));
163 p_ptr->counter = TRUE;
168 if (name) return _("払い抜け", "Harainuke");
169 if (desc) return _("攻撃した後、反対側に抜ける。",
170 "Attacks monster with your weapons normally, then move through counter side of the monster.");
178 msg_print(_("乗馬中には無理だ。", "You cannot do it when riding."));
182 if (!get_direction(&dir, FALSE, FALSE)) return NULL;
184 if (dir == 5) return NULL;
185 y = p_ptr->y + ddy[dir];
186 x = p_ptr->x + ddx[dir];
188 if (!cave[y][x].m_idx)
190 msg_print(_("その方向にはモンスターはいません。", "There is no monster."));
196 if (!player_can_enter(cave[y][x].feat, 0) || is_trap(cave[y][x].feat))
202 if (player_can_enter(cave[y][x].feat, 0) && !is_trap(cave[y][x].feat) && !cave[y][x].m_idx)
206 /* Move the player */
207 (void)move_player_effect(y, x, MPE_FORGET_FLOW | MPE_HANDLE_STUFF | MPE_DONT_PICKUP);
213 if (name) return _("サーペンツタン", "Serpent's Tongue");
214 if (desc) return _("毒耐性のないモンスターに大ダメージを与える。", "Attacks a monster with more damage unless it has resistance to poison.");
220 if (!get_direction(&dir, FALSE, FALSE)) return NULL;
221 if (dir == 5) return NULL;
223 y = p_ptr->y + ddy[dir];
224 x = p_ptr->x + ddx[dir];
226 if (cave[y][x].m_idx)
227 py_attack(y, x, HISSATSU_POISON);
230 msg_print(_("その方向にはモンスターはいません。", "There is no monster."));
237 if (name) return _("斬魔剣弐の太刀", "Zammaken");
238 if (desc) return _("生命のない邪悪なモンスターに大ダメージを与えるが、他のモンスターには全く効果がない。",
239 "Attacks an evil unliving monster with great damage. No effect to other monsters.");
245 if (!get_direction(&dir, FALSE, FALSE)) return NULL;
246 if (dir == 5) return NULL;
248 y = p_ptr->y + ddy[dir];
249 x = p_ptr->x + ddx[dir];
251 if (cave[y][x].m_idx)
252 py_attack(y, x, HISSATSU_ZANMA);
255 msg_print(_("その方向にはモンスターはいません。", "There is no monster."));
262 if (name) return _("裂風剣", "Wind Blast");
263 if (desc) return _("攻撃した相手を後方へ吹き飛ばす。", "Attacks an adjacent monster, and blow it away.");
269 if (!get_direction(&dir, FALSE, FALSE)) return NULL;
270 if (dir == 5) return NULL;
272 y = p_ptr->y + ddy[dir];
273 x = p_ptr->x + ddx[dir];
275 if (cave[y][x].m_idx)
279 msg_print(_("その方向にはモンスターはいません。", "There is no monster."));
282 if (d_info[dungeon_type].flags1 & DF1_NO_MELEE)
286 if (cave[y][x].m_idx)
289 POSITION ty = y, tx = x;
290 POSITION oy = y, ox = x;
291 MONSTER_IDX m_idx = cave[y][x].m_idx;
292 monster_type *m_ptr = &m_list[m_idx];
293 GAME_TEXT m_name[MAX_NLEN];
295 monster_desc(m_name, m_ptr, 0);
297 for (i = 0; i < 5; i++)
301 if (cave_empty_bold(y, x))
308 if ((ty != oy) || (tx != ox))
310 msg_format(_("%sを吹き飛ばした!", "You blow %s away!"), m_name);
311 cave[oy][ox].m_idx = 0;
312 cave[ty][tx].m_idx = m_idx;
316 update_monster(m_idx, TRUE);
320 if (r_info[m_ptr->r_idx].flags7 & (RF7_LITE_MASK | RF7_DARK_MASK))
321 p_ptr->update |= (PU_MON_LITE);
328 if (name) return _("刀匠の目利き", "Judge");
329 if (desc) return _("武器・防具を1つ識別する。レベル45以上で武器・防具の能力を完全に知ることができる。",
330 "Identifies a weapon or armor. Or *identifies* these at level 45.");
336 if (!identify_fully(TRUE)) return NULL;
340 if (!ident_spell(TRUE)) return NULL;
346 if (name) return _("破岩斬", "Rock Smash");
347 if (desc) return _("岩を壊し、岩石系のモンスターに大ダメージを与える。", "Breaks rock. Or greatly damage a monster made by rocks.");
353 if (!get_direction(&dir, FALSE, FALSE)) return NULL;
354 if (dir == 5) return NULL;
356 y = p_ptr->y + ddy[dir];
357 x = p_ptr->x + ddx[dir];
359 if (cave[y][x].m_idx)
360 py_attack(y, x, HISSATSU_HAGAN);
362 if (!cave_have_flag_bold(y, x, FF_HURT_ROCK)) break;
364 /* Destroy the feature */
365 cave_alter_feat(y, x, FF_HURT_ROCK);
367 /* Update some things */
368 p_ptr->update |= (PU_FLOW);
373 if (name) return _("乱れ雪月花", "Midare-Setsugekka");
374 if (desc) return _("攻撃回数が増え、冷気耐性のないモンスターに大ダメージを与える。",
375 "Attacks a monster with increased number of attacks and more damage unless it has resistance to cold.");
381 if (!get_direction(&dir, FALSE, FALSE)) return NULL;
382 if (dir == 5) return NULL;
384 y = p_ptr->y + ddy[dir];
385 x = p_ptr->x + ddx[dir];
387 if (cave[y][x].m_idx)
388 py_attack(y, x, HISSATSU_COLD);
391 msg_print(_("その方向にはモンスターはいません。", "There is no monster."));
398 if (name) return _("急所突き", "Spot Aiming");
399 if (desc) return _("モンスターを一撃で倒す攻撃を繰り出す。失敗すると1点しかダメージを与えられない。",
400 "Attempts to kill a monster instantly. If failed cause only 1HP of damage.");
406 if (!get_direction(&dir, FALSE, FALSE)) return NULL;
407 if (dir == 5) return NULL;
409 y = p_ptr->y + ddy[dir];
410 x = p_ptr->x + ddx[dir];
412 if (cave[y][x].m_idx)
413 py_attack(y, x, HISSATSU_KYUSHO);
416 msg_print(_("その方向にはモンスターはいません。", "There is no monster."));
423 if (name) return _("魔神斬り", "Majingiri");
424 if (desc) return _("会心の一撃で攻撃する。攻撃がかわされやすい。",
425 "Attempts to attack with critical hit. But this attack is easy to evade for a monster.");
431 if (!get_direction(&dir, FALSE, FALSE)) return NULL;
432 if (dir == 5) return NULL;
434 y = p_ptr->y + ddy[dir];
435 x = p_ptr->x + ddx[dir];
437 if (cave[y][x].m_idx)
438 py_attack(y, x, HISSATSU_MAJIN);
441 msg_print(_("その方向にはモンスターはいません。", "There is no monster."));
448 if (name) return _("捨て身", "Desperate Attack");
449 if (desc) return _("強力な攻撃を繰り出す。次のターンまでの間、食らうダメージが増える。",
450 "Attacks with all of your power. But all damages you take will be doubled for one turn.");
456 if (!get_direction(&dir, FALSE, FALSE)) return NULL;
457 if (dir == 5) return NULL;
459 y = p_ptr->y + ddy[dir];
460 x = p_ptr->x + ddx[dir];
462 if (cave[y][x].m_idx)
463 py_attack(y, x, HISSATSU_SUTEMI);
466 msg_print(_("その方向にはモンスターはいません。", "There is no monster."));
469 p_ptr->sutemi = TRUE;
474 if (name) return _("雷撃鷲爪斬", "Lightning Eagle");
475 if (desc) return _("電撃耐性のないモンスターに非常に大きいダメージを与える。",
476 "Attacks a monster with more damage unless it has resistance to electricity.");
482 if (!get_direction(&dir, FALSE, FALSE)) return NULL;
483 if (dir == 5) return NULL;
485 y = p_ptr->y + ddy[dir];
486 x = p_ptr->x + ddx[dir];
488 if (cave[y][x].m_idx)
489 py_attack(y, x, HISSATSU_ELEC);
492 msg_print(_("その方向にはモンスターはいません。", "There is no monster."));
499 if (name) return _("入身", "Rush Attack");
500 if (desc) return _("素早く相手に近寄り攻撃する。", "Steps close to a monster and attacks at a time.");
504 if (!rush_attack(NULL)) return NULL;
509 if (name) return _("赤流渦", "Bloody Maelstrom");
510 if (desc) return _("自分自身も傷を作りつつ、その傷が深いほど大きい威力で全方向の敵を攻撃できる。生きていないモンスターには効果がない。",
511 "Attacks all adjacent monsters with power corresponding to your cut status. Then increases your cut status. No effect to unliving monsters.");
515 POSITION y = 0, x = 0;
520 if (p_ptr->cut < 300)
521 set_cut(p_ptr->cut + 300);
523 set_cut(p_ptr->cut * 2);
525 for (dir = 0; dir < 8; dir++)
527 y = p_ptr->y + ddy_ddd[dir];
528 x = p_ptr->x + ddx_ddd[dir];
531 /* Get the monster */
532 m_ptr = &m_list[c_ptr->m_idx];
534 /* Hack -- attack monsters */
535 if (c_ptr->m_idx && (m_ptr->ml || cave_have_flag_bold(y, x, FF_PROJECT)))
537 if (!monster_living(m_ptr->r_idx))
539 GAME_TEXT m_name[MAX_NLEN];
541 monster_desc(m_name, m_ptr, 0);
542 msg_format(_("%sには効果がない!", "%s is unharmed!"), m_name);
544 else py_attack(y, x, HISSATSU_SEKIRYUKA);
551 if (name) return _("激震撃", "Earthquake Blow");
552 if (desc) return _("地震を起こす。", "Shakes dungeon structure, and results in random swapping of floors and walls.");
558 if (!get_direction(&dir, FALSE, FALSE)) return NULL;
559 if (dir == 5) return NULL;
561 y = p_ptr->y + ddy[dir];
562 x = p_ptr->x + ddx[dir];
564 if (cave[y][x].m_idx)
565 py_attack(y, x, HISSATSU_QUAKE);
567 earthquake(p_ptr->y, p_ptr->x, 10);
572 if (name) return _("地走り", "Crack");
573 if (desc) return _("衝撃波のビームを放つ。", "Fires a beam of shock wave.");
577 int total_damage = 0, basedam, i;
578 BIT_FLAGS flgs[TR_FLAG_SIZE];
580 if (!get_aim_dir(&dir)) return NULL;
581 msg_print(_("武器を大きく振り下ろした。", "You swing your weapon downward."));
582 for (i = 0; i < 2; i++)
586 if (!has_melee_weapon(INVEN_RARM + i)) break;
587 o_ptr = &inventory[INVEN_RARM + i];
588 basedam = (o_ptr->dd * (o_ptr->ds + 1)) * 50;
589 damage = o_ptr->to_d * 100;
590 object_flags(o_ptr, flgs);
591 if ((o_ptr->name1 == ART_VORPAL_BLADE) || (o_ptr->name1 == ART_CHAINSWORD))
597 else if (have_flag(flgs, TR_VORPAL))
599 /* vorpal flag only */
604 damage *= p_ptr->num_blow[i];
605 total_damage += damage / 200;
606 if (i) total_damage = total_damage * 7 / 10;
608 fire_beam(GF_FORCE, dir, total_damage);
613 if (name) return _("気迫の雄叫び", "War Cry");
614 if (desc) return _("視界内の全モンスターに対して轟音の攻撃を行う。さらに、近くにいるモンスターを怒らせる。",
615 "Damages all monsters in sight with sound. Aggravate nearby monsters.");
619 msg_print(_("雄叫びをあげた!", "You roar out!"));
620 project_all_los(GF_SOUND, randint1(plev * 3));
621 aggravate_monsters(0);
626 if (name) return _("無双三段", "Musou-Sandan");
627 if (desc) return _("強力な3段攻撃を繰り出す。", "Attacks with powerful 3 strikes.");
633 if (!get_direction(&dir, FALSE, FALSE)) return NULL;
634 if (dir == 5) return NULL;
636 for (i = 0; i < 3; i++)
644 y = p_ptr->y + ddy[dir];
645 x = p_ptr->x + ddx[dir];
649 py_attack(y, x, HISSATSU_3DAN);
652 msg_print(_("その方向にはモンスターはいません。", "There is no monster."));
656 if (d_info[dungeon_type].flags1 & DF1_NO_MELEE)
661 /* Monster is dead? */
662 if (!c_ptr->m_idx) break;
666 m_idx = c_ptr->m_idx;
667 m_ptr = &m_list[m_idx];
669 /* Monster cannot move back? */
670 if (!monster_can_enter(ny, nx, &r_info[m_ptr->r_idx], 0))
673 if (i < 2) msg_print(NULL);
678 cave[ny][nx].m_idx = m_idx;
682 update_monster(m_idx, TRUE);
684 /* Redraw the old spot */
687 /* Redraw the new spot */
690 /* Player can move forward? */
691 if (player_can_enter(c_ptr->feat, 0))
693 /* Move the player */
694 if (!move_player_effect(y, x, MPE_FORGET_FLOW | MPE_HANDLE_STUFF | MPE_DONT_PICKUP)) break;
702 if (i < 2) msg_print(NULL);
708 if (name) return _("吸血鬼の牙", "Vampire's Fang");
709 if (desc) return _("攻撃した相手の体力を吸いとり、自分の体力を回復させる。生命を持たないモンスターには通じない。",
710 "Attacks with vampiric strikes which absorbs HP from a monster and gives them to you. No effect to unliving monsters.");
716 if (!get_direction(&dir, FALSE, FALSE)) return NULL;
717 if (dir == 5) return NULL;
719 y = p_ptr->y + ddy[dir];
720 x = p_ptr->x + ddx[dir];
722 if (cave[y][x].m_idx)
723 py_attack(y, x, HISSATSU_DRAIN);
726 msg_print(_("その方向にはモンスターはいません。", "There is no monster."));
733 if (name) return _("幻惑", "Moon Dazzling");
734 if (desc) return _("視界内の起きている全モンスターに朦朧、混乱、眠りを与えようとする。", "Attempts to stun, confuse and sleep all waking monsters.");
738 msg_print(_("武器を不規則に揺らした...", "You irregularly wave your weapon..."));
739 project_all_los(GF_ENGETSU, plev * 4);
740 project_all_los(GF_ENGETSU, plev * 4);
741 project_all_los(GF_ENGETSU, plev * 4);
746 if (name) return _("百人斬り", "Hundred Slaughter");
747 if (desc) return _("連続して入身でモンスターを攻撃する。攻撃するたびにMPを消費。MPがなくなるか、モンスターを倒せなかったら百人斬りは終了する。",
748 "Performs a series of rush attacks. The series continues while killing each monster in a time and SP remains.");
752 const int mana_cost_per_monster = 8;
758 if (!rush_attack(&mdeath)) break;
761 /* Reserve needed mana point */
762 p_ptr->csp -= technic_info[REALM_HISSATSU - MIN_TECHNIC][26].smana;
766 p_ptr->csp -= mana_cost_per_monster;
771 p_ptr->redraw |= PR_MANA;
773 } while (p_ptr->csp > mana_cost_per_monster);
775 if (is_new) return NULL;
777 /* Restore reserved mana */
778 p_ptr->csp += technic_info[REALM_HISSATSU - MIN_TECHNIC][26].smana;
783 if (name) return _("天翔龍閃", "Dragonic Flash");
784 if (desc) return _("視界内の場所を指定して、その場所と自分の間にいる全モンスターを攻撃し、その場所に移動する。",
785 "Runs toward given location while attacking all monsters on the path.");
791 if (!tgt_pt(&x, &y)) return NULL;
793 if (!cave_player_teleportable_bold(y, x, 0L) ||
794 (distance(y, x, p_ptr->y, p_ptr->x) > MAX_SIGHT / 2) ||
795 !projectable(p_ptr->y, p_ptr->x, y, x))
797 msg_print(_("失敗!", "You cannot move to that place!"));
800 if (p_ptr->anti_tele)
802 msg_print(_("不思議な力がテレポートを防いだ!", "A mysterious force prevents you from teleporting!"));
805 project(0, 0, y, x, HISSATSU_ISSEN, GF_ATTACK, PROJECT_BEAM | PROJECT_KILL, -1);
806 teleport_player_to(y, x, 0L);
811 if (name) return _("二重の剣撃", "Twin Slash");
812 if (desc) return _("1ターンで2度攻撃を行う。", "double attacks at a time.");
818 if (!get_rep_dir(&dir, FALSE)) return NULL;
820 y = p_ptr->y + ddy[dir];
821 x = p_ptr->x + ddx[dir];
823 if (cave[y][x].m_idx)
826 if (cave[y][x].m_idx)
834 msg_print(_("その方向にはモンスターはいません。", "You don't see any monster in this direction"));
841 if (name) return _("虎伏絶刀勢", "Kofuku-Zettousei");
842 if (desc) return _("強力な攻撃を行い、近くの場所にも効果が及ぶ。", "Performs a powerful attack which even effect nearby monsters.");
846 int total_damage = 0, basedam, i;
848 BIT_FLAGS flgs[TR_FLAG_SIZE];
851 if (!get_direction(&dir, FALSE, FALSE)) return NULL;
852 if (dir == 5) return NULL;
854 y = p_ptr->y + ddy[dir];
855 x = p_ptr->x + ddx[dir];
857 if (d_info[dungeon_type].flags1 & DF1_NO_MELEE)
859 msg_print(_("なぜか攻撃することができない。", "Something prevent you from attacking."));
862 msg_print(_("武器を大きく振り下ろした。", "You swing your weapon downward."));
863 for (i = 0; i < 2; i++)
866 if (!has_melee_weapon(INVEN_RARM + i)) break;
867 o_ptr = &inventory[INVEN_RARM + i];
868 basedam = (o_ptr->dd * (o_ptr->ds + 1)) * 50;
869 damage = o_ptr->to_d * 100;
870 object_flags(o_ptr, flgs);
871 if ((o_ptr->name1 == ART_VORPAL_BLADE) || (o_ptr->name1 == ART_CHAINSWORD))
877 else if (have_flag(flgs, TR_VORPAL))
879 /* vorpal flag only */
884 damage += p_ptr->to_d[i] * 100;
885 damage *= p_ptr->num_blow[i];
886 total_damage += (damage / 100);
888 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);
893 if (name) return _("慶雲鬼忍剣", "Keiun-Kininken");
894 if (desc) return _("自分もダメージをくらうが、相手に非常に大きなダメージを与える。アンデッドには特に効果がある。",
895 "Attacks a monster with extremely powerful damage. But you also takes some damages. Hurts a undead monster greatly.");
901 if (!get_direction(&dir, FALSE, FALSE)) return NULL;
902 if (dir == 5) return NULL;
904 y = p_ptr->y + ddy[dir];
905 x = p_ptr->x + ddx[dir];
907 if (cave[y][x].m_idx)
908 py_attack(y, x, HISSATSU_UNDEAD);
911 msg_print(_("その方向にはモンスターはいません。", "There is no monster."));
914 take_hit(DAMAGE_NOESCAPE, 100 + randint1(100), _("慶雲鬼忍剣を使った衝撃", "exhaustion on using Keiun-Kininken"), -1);
919 if (name) return _("切腹", "Harakiri");
920 if (desc) return _("「武士道とは、死ぬことと見つけたり。」", "'Busido is found in death'");
925 if (!get_check(_("本当に自殺しますか?", "Do you really want to commit suicide? "))) return NULL;
926 /* Special Verification for suicide */
927 prt(_("確認のため '@' を押して下さい。", "Please verify SUICIDE by typing the '@' sign: "), 0, 0);
932 if (i != '@') return NULL;
933 if (p_ptr->total_winner)
935 take_hit(DAMAGE_FORCE, 9999, "Seppuku", -1);
936 p_ptr->total_winner = TRUE;
940 msg_print(_("武士道とは、死ぬことと見つけたり。", "Meaning of Bushi-do is found in the death."));
941 take_hit(DAMAGE_FORCE, 9999, "Seppuku", -1);