From dee89e9844757d815424ea2f1e84e65262f8e709 Mon Sep 17 00:00:00 2001 From: Deskull Date: Sat, 15 Sep 2018 16:14:09 +0900 Subject: [PATCH] =?utf8?q?#37353=E3=80=80=E5=89=A3=E8=A1=93=E9=A0=98?= =?utf8?q?=E5=9F=9F=E5=87=A6=E7=90=86=E3=82=92=20cmd-spell.c=20=E3=81=8B?= =?utf8?q?=E3=82=89=20realm-hissatsu.c/h=20=E3=81=B8=E5=88=86=E9=9B=A2?= =?utf8?q?=E3=80=82=20Separate=20hissatsu=20realm=20process=20from=20cmd-s?= =?utf8?q?pell.c=20to=20realm-hissatsu.c/h.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- Hengband_vcs2015/Hengband/Hengband.vcxproj | 2 + Hengband_vcs2015/Hengband/Hengband.vcxproj.filters | 6 + src/cmd-spell.c | 945 +-------------------- src/realm-hissatsu.c | 943 ++++++++++++++++++++ src/realm-hissatsu.h | 1 + 5 files changed, 954 insertions(+), 943 deletions(-) create mode 100644 src/realm-hissatsu.c create mode 100644 src/realm-hissatsu.h diff --git a/Hengband_vcs2015/Hengband/Hengband.vcxproj b/Hengband_vcs2015/Hengband/Hengband.vcxproj index d09a7357e..406cdf29e 100644 --- a/Hengband_vcs2015/Hengband/Hengband.vcxproj +++ b/Hengband_vcs2015/Hengband/Hengband.vcxproj @@ -148,6 +148,7 @@ + @@ -265,6 +266,7 @@ + diff --git a/Hengband_vcs2015/Hengband/Hengband.vcxproj.filters b/Hengband_vcs2015/Hengband/Hengband.vcxproj.filters index e79352ac4..bb99cbc49 100644 --- a/Hengband_vcs2015/Hengband/Hengband.vcxproj.filters +++ b/Hengband_vcs2015/Hengband/Hengband.vcxproj.filters @@ -289,6 +289,9 @@ Source + + Source + @@ -451,6 +454,9 @@ Header + + Header + diff --git a/src/cmd-spell.c b/src/cmd-spell.c index 417d29b72..ef2475baa 100644 --- a/src/cmd-spell.c +++ b/src/cmd-spell.c @@ -16,9 +16,10 @@ #include "realm-crusade.h" #include "realm-daemon.h" #include "realm-death.h" +#include "realm-hissatsu.h" #include "realm-life.h" -#include "realm-song.h" #include "realm-nature.h" +#include "realm-song.h" #include "realm-sorcery.h" #include "realm-trump.h" @@ -179,948 +180,6 @@ cptr info_weight(int weight) /*! - * @brief 剣術の各処理を行う - * @param spell 剣術ID - * @param mode 処理内容 (SPELL_NAME / SPELL_DESC / SPELL_CAST) - * @return SPELL_NAME / SPELL_DESC 時には文字列ポインタを返す。SPELL_CAST時はNULL文字列を返す。 - */ -static cptr do_hissatsu_spell(SPELL_IDX spell, BIT_FLAGS mode) -{ - bool name = (mode == SPELL_NAME) ? TRUE : FALSE; - bool desc = (mode == SPELL_DESC) ? TRUE : FALSE; - bool cast = (mode == SPELL_CAST) ? TRUE : FALSE; - - int dir; - int plev = p_ptr->lev; - - switch (spell) - { - case 0: - if (name) return _("飛飯綱", "Tobi-Izuna"); - if (desc) return _("2マス離れたところにいるモンスターを攻撃する。", "Attacks a two squares distant monster."); - - if (cast) - { - project_length = 2; - if (!get_aim_dir(&dir)) return NULL; - - project_hook(GF_ATTACK, dir, HISSATSU_2, PROJECT_STOP | PROJECT_KILL); - } - break; - - case 1: - if (name) return _("五月雨斬り", "3-Way Attack"); - if (desc) return _("3方向に対して攻撃する。", "Attacks in 3 directions in one time."); - - if (cast) - { - int cdir; - int y, x; - - if (!get_rep_dir2(&dir)) return NULL; - if (dir == 5) return NULL; - - for (cdir = 0;cdir < 8; cdir++) - { - if (cdd[cdir] == dir) break; - } - - if (cdir == 8) return NULL; - - y = p_ptr->y + ddy_cdd[cdir]; - x = p_ptr->x + ddx_cdd[cdir]; - if (cave[y][x].m_idx) - py_attack(y, x, 0); - else - msg_print(_("攻撃は空を切った。", "You attack the empty air.")); - - y = p_ptr->y + ddy_cdd[(cdir + 7) % 8]; - x = p_ptr->x + ddx_cdd[(cdir + 7) % 8]; - if (cave[y][x].m_idx) - py_attack(y, x, 0); - else - msg_print(_("攻撃は空を切った。", "You attack the empty air.")); - - y = p_ptr->y + ddy_cdd[(cdir + 1) % 8]; - x = p_ptr->x + ddx_cdd[(cdir + 1) % 8]; - if (cave[y][x].m_idx) - py_attack(y, x, 0); - else - msg_print(_("攻撃は空を切った。", "You attack the empty air.")); - } - break; - - case 2: - if (name) return _("ブーメラン", "Boomerang"); - if (desc) return _("武器を手元に戻ってくるように投げる。戻ってこないこともある。", - "Throws current weapon. And it'll return to your hand unless failed."); - - if (cast) - { - if (!do_cmd_throw(1, TRUE, -1)) return NULL; - } - break; - - case 3: - if (name) return _("焔霊", "Burning Strike"); - if (desc) return _("火炎耐性のないモンスターに大ダメージを与える。", "Attacks a monster with more damage unless it has resistance to fire."); - - if (cast) - { - int y, x; - - if (!get_rep_dir2(&dir)) return NULL; - if (dir == 5) return NULL; - - y = p_ptr->y + ddy[dir]; - x = p_ptr->x + ddx[dir]; - - if (cave[y][x].m_idx) - py_attack(y, x, HISSATSU_FIRE); - else - { - msg_print(_("その方向にはモンスターはいません。", "There is no monster.")); - return NULL; - } - } - break; - - case 4: - if (name) return _("殺気感知", "Detect Ferocity"); - if (desc) return _("近くの思考することができるモンスターを感知する。", "Detects all monsters except mindless in your vicinity."); - - if (cast) - { - detect_monsters_mind(DETECT_RAD_DEFAULT); - } - break; - - case 5: - if (name) return _("みね打ち", "Strike to Stun"); - if (desc) return _("相手にダメージを与えないが、朦朧とさせる。", "Attempts to stun a monster in the adjacent."); - - if (cast) - { - int y, x; - - if (!get_rep_dir2(&dir)) return NULL; - if (dir == 5) return NULL; - - y = p_ptr->y + ddy[dir]; - x = p_ptr->x + ddx[dir]; - - if (cave[y][x].m_idx) - py_attack(y, x, HISSATSU_MINEUCHI); - else - { - msg_print(_("その方向にはモンスターはいません。", "There is no monster.")); - return NULL; - } - } - break; - - case 6: - if (name) return _("カウンター", "Counter"); - if (desc) return _("相手に攻撃されたときに反撃する。反撃するたびにMPを消費。", - "Prepares to counterattack. When attack by a monster, strikes back using SP each time."); - - if (cast) - { - if (p_ptr->riding) - { - msg_print(_("乗馬中には無理だ。", "You cannot do it when riding.")); - return NULL; - } - msg_print(_("相手の攻撃に対して身構えた。", "You prepare to counter blow.")); - p_ptr->counter = TRUE; - } - break; - - case 7: - if (name) return _("払い抜け", "Harainuke"); - if (desc) return _("攻撃した後、反対側に抜ける。", - "Attacks monster with your weapons normally, then move through counter side of the monster."); - - if (cast) - { - POSITION y, x; - - if (p_ptr->riding) - { - msg_print(_("乗馬中には無理だ。", "You cannot do it when riding.")); - return NULL; - } - - if (!get_rep_dir2(&dir)) return NULL; - - if (dir == 5) return NULL; - y = p_ptr->y + ddy[dir]; - x = p_ptr->x + ddx[dir]; - - if (!cave[y][x].m_idx) - { - msg_print(_("その方向にはモンスターはいません。", "There is no monster.")); - return NULL; - } - - py_attack(y, x, 0); - - if (!player_can_enter(cave[y][x].feat, 0) || is_trap(cave[y][x].feat)) - break; - - y += ddy[dir]; - x += ddx[dir]; - - if (player_can_enter(cave[y][x].feat, 0) && !is_trap(cave[y][x].feat) && !cave[y][x].m_idx) - { - msg_print(NULL); - - /* Move the player */ - (void)move_player_effect(y, x, MPE_FORGET_FLOW | MPE_HANDLE_STUFF | MPE_DONT_PICKUP); - } - } - break; - - case 8: - if (name) return _("サーペンツタン", "Serpent's Tongue"); - if (desc) return _("毒耐性のないモンスターに大ダメージを与える。", "Attacks a monster with more damage unless it has resistance to poison."); - - if (cast) - { - int y, x; - - if (!get_rep_dir2(&dir)) return NULL; - if (dir == 5) return NULL; - - y = p_ptr->y + ddy[dir]; - x = p_ptr->x + ddx[dir]; - - if (cave[y][x].m_idx) - py_attack(y, x, HISSATSU_POISON); - else - { - msg_print(_("その方向にはモンスターはいません。", "There is no monster.")); - return NULL; - } - } - break; - - case 9: - if (name) return _("斬魔剣弐の太刀", "Zammaken"); - if (desc) return _("生命のない邪悪なモンスターに大ダメージを与えるが、他のモンスターには全く効果がない。", - "Attacks an evil unliving monster with great damage. No effect to other monsters."); - - if (cast) - { - int y, x; - - if (!get_rep_dir2(&dir)) return NULL; - if (dir == 5) return NULL; - - y = p_ptr->y + ddy[dir]; - x = p_ptr->x + ddx[dir]; - - if (cave[y][x].m_idx) - py_attack(y, x, HISSATSU_ZANMA); - else - { - msg_print(_("その方向にはモンスターはいません。", "There is no monster.")); - return NULL; - } - } - break; - - case 10: - if (name) return _("裂風剣", "Wind Blast"); - if (desc) return _("攻撃した相手を後方へ吹き飛ばす。", "Attacks an adjacent monster, and blow it away."); - - if (cast) - { - int y, x; - - if (!get_rep_dir2(&dir)) return NULL; - if (dir == 5) return NULL; - - y = p_ptr->y + ddy[dir]; - x = p_ptr->x + ddx[dir]; - - if (cave[y][x].m_idx) - py_attack(y, x, 0); - else - { - msg_print(_("その方向にはモンスターはいません。", "There is no monster.")); - return NULL; - } - if (d_info[dungeon_type].flags1 & DF1_NO_MELEE) - { - return ""; - } - if (cave[y][x].m_idx) - { - int i; - POSITION ty = y, tx = x; - POSITION oy = y, ox = x; - MONSTER_IDX m_idx = cave[y][x].m_idx; - monster_type *m_ptr = &m_list[m_idx]; - char m_name[80]; - - monster_desc(m_name, m_ptr, 0); - - for (i = 0; i < 5; i++) - { - y += ddy[dir]; - x += ddx[dir]; - if (cave_empty_bold(y, x)) - { - ty = y; - tx = x; - } - else break; - } - if ((ty != oy) || (tx != ox)) - { - msg_format(_("%sを吹き飛ばした!", "You blow %s away!"), m_name); - cave[oy][ox].m_idx = 0; - cave[ty][tx].m_idx = m_idx; - m_ptr->fy = ty; - m_ptr->fx = tx; - - update_mon(m_idx, TRUE); - lite_spot(oy, ox); - lite_spot(ty, tx); - - if (r_info[m_ptr->r_idx].flags7 & (RF7_LITE_MASK | RF7_DARK_MASK)) - p_ptr->update |= (PU_MON_LITE); - } - } - } - break; - - case 11: - if (name) return _("刀匠の目利き", "Judge"); - if (desc) return _("武器・防具を1つ識別する。レベル45以上で武器・防具の能力を完全に知ることができる。", - "Identifies a weapon or armor. Or *identifies* these at level 45."); - - if (cast) - { - if (plev > 44) - { - if (!identify_fully(TRUE)) return NULL; - } - else - { - if (!ident_spell(TRUE)) return NULL; - } - } - break; - - case 12: - if (name) return _("破岩斬", "Rock Smash"); - if (desc) return _("岩を壊し、岩石系のモンスターに大ダメージを与える。", "Breaks rock. Or greatly damage a monster made by rocks."); - - if (cast) - { - int y, x; - - if (!get_rep_dir2(&dir)) return NULL; - if (dir == 5) return NULL; - - y = p_ptr->y + ddy[dir]; - x = p_ptr->x + ddx[dir]; - - if (cave[y][x].m_idx) - py_attack(y, x, HISSATSU_HAGAN); - - if (!cave_have_flag_bold(y, x, FF_HURT_ROCK)) break; - - /* Destroy the feature */ - cave_alter_feat(y, x, FF_HURT_ROCK); - - /* Update some things */ - p_ptr->update |= (PU_FLOW); - } - break; - - case 13: - if (name) return _("乱れ雪月花", "Midare-Setsugekka"); - if (desc) return _("攻撃回数が増え、冷気耐性のないモンスターに大ダメージを与える。", - "Attacks a monster with increased number of attacks and more damage unless it has resistance to cold."); - - if (cast) - { - int y, x; - - if (!get_rep_dir2(&dir)) return NULL; - if (dir == 5) return NULL; - - y = p_ptr->y + ddy[dir]; - x = p_ptr->x + ddx[dir]; - - if (cave[y][x].m_idx) - py_attack(y, x, HISSATSU_COLD); - else - { - msg_print(_("その方向にはモンスターはいません。", "There is no monster.")); - return NULL; - } - } - break; - - case 14: - if (name) return _("急所突き", "Spot Aiming"); - if (desc) return _("モンスターを一撃で倒す攻撃を繰り出す。失敗すると1点しかダメージを与えられない。", - "Attempts to kill a monster instantly. If failed cause only 1HP of damage."); - - if (cast) - { - int y, x; - - if (!get_rep_dir2(&dir)) return NULL; - if (dir == 5) return NULL; - - y = p_ptr->y + ddy[dir]; - x = p_ptr->x + ddx[dir]; - - if (cave[y][x].m_idx) - py_attack(y, x, HISSATSU_KYUSHO); - else - { - msg_print(_("その方向にはモンスターはいません。", "There is no monster.")); - return NULL; - } - } - break; - - case 15: - if (name) return _("魔神斬り", "Majingiri"); - if (desc) return _("会心の一撃で攻撃する。攻撃がかわされやすい。", - "Attempts to attack with critical hit. But this attack is easy to evade for a monster."); - - if (cast) - { - int y, x; - - if (!get_rep_dir2(&dir)) return NULL; - if (dir == 5) return NULL; - - y = p_ptr->y + ddy[dir]; - x = p_ptr->x + ddx[dir]; - - if (cave[y][x].m_idx) - py_attack(y, x, HISSATSU_MAJIN); - else - { - msg_print(_("その方向にはモンスターはいません。", "There is no monster.")); - return NULL; - } - } - break; - - case 16: - if (name) return _("捨て身", "Desperate Attack"); - if (desc) return _("強力な攻撃を繰り出す。次のターンまでの間、食らうダメージが増える。", - "Attacks with all of your power. But all damages you take will be doubled for one turn."); - - if (cast) - { - int y, x; - - if (!get_rep_dir2(&dir)) return NULL; - if (dir == 5) return NULL; - - y = p_ptr->y + ddy[dir]; - x = p_ptr->x + ddx[dir]; - - if (cave[y][x].m_idx) - py_attack(y, x, HISSATSU_SUTEMI); - else - { - msg_print(_("その方向にはモンスターはいません。", "There is no monster.")); - return NULL; - } - p_ptr->sutemi = TRUE; - } - break; - - case 17: - if (name) return _("雷撃鷲爪斬", "Lightning Eagle"); - if (desc) return _("電撃耐性のないモンスターに非常に大きいダメージを与える。", - "Attacks a monster with more damage unless it has resistance to electricity."); - - if (cast) - { - int y, x; - - if (!get_rep_dir2(&dir)) return NULL; - if (dir == 5) return NULL; - - y = p_ptr->y + ddy[dir]; - x = p_ptr->x + ddx[dir]; - - if (cave[y][x].m_idx) - py_attack(y, x, HISSATSU_ELEC); - else - { - msg_print(_("その方向にはモンスターはいません。", "There is no monster.")); - return NULL; - } - } - break; - - case 18: - if (name) return _("入身", "Rush Attack"); - if (desc) return _("素早く相手に近寄り攻撃する。", "Steps close to a monster and attacks at a time."); - - if (cast) - { - if (!rush_attack(NULL)) return NULL; - } - break; - - case 19: - if (name) return _("赤流渦", "Bloody Maelstrom"); - if (desc) return _("自分自身も傷を作りつつ、その傷が深いほど大きい威力で全方向の敵を攻撃できる。生きていないモンスターには効果がない。", - "Attacks all adjacent monsters with power corresponding to your cut status. Then increases your cut status. No effect to unliving monsters."); - - if (cast) - { - int y = 0, x = 0; - - cave_type *c_ptr; - monster_type *m_ptr; - - if (p_ptr->cut < 300) - set_cut(p_ptr->cut + 300); - else - set_cut(p_ptr->cut * 2); - - for (dir = 0; dir < 8; dir++) - { - y = p_ptr->y + ddy_ddd[dir]; - x = p_ptr->x + ddx_ddd[dir]; - c_ptr = &cave[y][x]; - - /* Get the monster */ - m_ptr = &m_list[c_ptr->m_idx]; - - /* Hack -- attack monsters */ - if (c_ptr->m_idx && (m_ptr->ml || cave_have_flag_bold(y, x, FF_PROJECT))) - { - if (!monster_living(&r_info[m_ptr->r_idx])) - { - char m_name[80]; - - monster_desc(m_name, m_ptr, 0); - msg_format(_("%sには効果がない!", "%s is unharmed!"), m_name); - } - else py_attack(y, x, HISSATSU_SEKIRYUKA); - } - } - } - break; - - case 20: - if (name) return _("激震撃", "Earthquake Blow"); - if (desc) return _("地震を起こす。", "Shakes dungeon structure, and results in random swapping of floors and walls."); - - if (cast) - { - int y,x; - - if (!get_rep_dir2(&dir)) return NULL; - if (dir == 5) return NULL; - - y = p_ptr->y + ddy[dir]; - x = p_ptr->x + ddx[dir]; - - if (cave[y][x].m_idx) - py_attack(y, x, HISSATSU_QUAKE); - else - earthquake(p_ptr->y, p_ptr->x, 10); - } - break; - - case 21: - if (name) return _("地走り", "Crack"); - if (desc) return _("衝撃波のビームを放つ。", "Fires a beam of shock wave."); - - if (cast) - { - int total_damage = 0, basedam, i; - u32b flgs[TR_FLAG_SIZE]; - object_type *o_ptr; - if (!get_aim_dir(&dir)) return NULL; - msg_print(_("武器を大きく振り下ろした。", "You swing your weapon downward.")); - for (i = 0; i < 2; i++) - { - int damage; - - if (!buki_motteruka(INVEN_RARM+i)) break; - o_ptr = &inventory[INVEN_RARM+i]; - basedam = (o_ptr->dd * (o_ptr->ds + 1)) * 50; - damage = o_ptr->to_d * 100; - object_flags(o_ptr, flgs); - if ((o_ptr->name1 == ART_VORPAL_BLADE) || (o_ptr->name1 == ART_CHAINSWORD)) - { - /* vorpal blade */ - basedam *= 5; - basedam /= 3; - } - else if (have_flag(flgs, TR_VORPAL)) - { - /* vorpal flag only */ - basedam *= 11; - basedam /= 9; - } - damage += basedam; - damage *= p_ptr->num_blow[i]; - total_damage += damage / 200; - if (i) total_damage = total_damage*7/10; - } - fire_beam(GF_FORCE, dir, total_damage); - } - break; - - case 22: - if (name) return _("気迫の雄叫び", "War Cry"); - if (desc) return _("視界内の全モンスターに対して轟音の攻撃を行う。さらに、近くにいるモンスターを怒らせる。", - "Damages all monsters in sight with sound. Aggravate nearby monsters."); - - if (cast) - { - msg_print(_("雄叫びをあげた!", "You roar out!")); - project_hack(GF_SOUND, randint1(plev * 3)); - aggravate_monsters(0); - } - break; - - case 23: - if (name) return _("無双三段", "Musou-Sandan"); - if (desc) return _("強力な3段攻撃を繰り出す。", "Attacks with powerful 3 strikes."); - - if (cast) - { - int i; - - if (!get_rep_dir2(&dir)) return NULL; - if (dir == 5) return NULL; - - for (i = 0; i < 3; i++) - { - POSITION y, x; - POSITION ny, nx; - MONSTER_IDX m_idx; - cave_type *c_ptr; - monster_type *m_ptr; - - y = p_ptr->y + ddy[dir]; - x = p_ptr->x + ddx[dir]; - c_ptr = &cave[y][x]; - - if (c_ptr->m_idx) - py_attack(y, x, HISSATSU_3DAN); - else - { - msg_print(_("その方向にはモンスターはいません。", "There is no monster.")); - return NULL; - } - - if (d_info[dungeon_type].flags1 & DF1_NO_MELEE) - { - return ""; - } - - /* Monster is dead? */ - if (!c_ptr->m_idx) break; - - ny = y + ddy[dir]; - nx = x + ddx[dir]; - m_idx = c_ptr->m_idx; - m_ptr = &m_list[m_idx]; - - /* Monster cannot move back? */ - if (!monster_can_enter(ny, nx, &r_info[m_ptr->r_idx], 0)) - { - /* -more- */ - if (i < 2) msg_print(NULL); - continue; - } - - c_ptr->m_idx = 0; - cave[ny][nx].m_idx = m_idx; - m_ptr->fy = ny; - m_ptr->fx = nx; - - update_mon(m_idx, TRUE); - - /* Redraw the old spot */ - lite_spot(y, x); - - /* Redraw the new spot */ - lite_spot(ny, nx); - - /* Player can move forward? */ - if (player_can_enter(c_ptr->feat, 0)) - { - /* Move the player */ - if (!move_player_effect(y, x, MPE_FORGET_FLOW | MPE_HANDLE_STUFF | MPE_DONT_PICKUP)) break; - } - else - { - break; - } - - /* -more- */ - if (i < 2) msg_print(NULL); - } - } - break; - - case 24: - if (name) return _("吸血鬼の牙", "Vampire's Fang"); - if (desc) return _("攻撃した相手の体力を吸いとり、自分の体力を回復させる。生命を持たないモンスターには通じない。", - "Attacks with vampiric strikes which absorbs HP from a monster and gives them to you. No effect to unliving monsters."); - - if (cast) - { - int y, x; - - if (!get_rep_dir2(&dir)) return NULL; - if (dir == 5) return NULL; - - y = p_ptr->y + ddy[dir]; - x = p_ptr->x + ddx[dir]; - - if (cave[y][x].m_idx) - py_attack(y, x, HISSATSU_DRAIN); - else - { - msg_print(_("その方向にはモンスターはいません。", "There is no monster.")); - return NULL; - } - } - break; - - case 25: - if (name) return _("幻惑", "Moon Dazzling"); - if (desc) return _("視界内の起きている全モンスターに朦朧、混乱、眠りを与えようとする。", "Attempts to stun, confuse and sleep all waking monsters."); - - if (cast) - { - msg_print(_("武器を不規則に揺らした...", "You irregularly wave your weapon...")); - project_hack(GF_ENGETSU, plev * 4); - project_hack(GF_ENGETSU, plev * 4); - project_hack(GF_ENGETSU, plev * 4); - } - break; - - case 26: - if (name) return _("百人斬り", "Hundred Slaughter"); - if (desc) return _("連続して入身でモンスターを攻撃する。攻撃するたびにMPを消費。MPがなくなるか、モンスターを倒せなかったら百人斬りは終了する。", - "Performs a series of rush attacks. The series continues while killing each monster in a time and SP remains."); - - if (cast) - { - const int mana_cost_per_monster = 8; - bool is_new = TRUE; - bool mdeath; - - do - { - if (!rush_attack(&mdeath)) break; - if (is_new) - { - /* Reserve needed mana point */ - p_ptr->csp -= technic_info[REALM_HISSATSU - MIN_TECHNIC][26].smana; - is_new = FALSE; - } - else - p_ptr->csp -= mana_cost_per_monster; - - if (!mdeath) break; - command_dir = 0; - - p_ptr->redraw |= PR_MANA; - handle_stuff(); - } - while (p_ptr->csp > mana_cost_per_monster); - - if (is_new) return NULL; - - /* Restore reserved mana */ - p_ptr->csp += technic_info[REALM_HISSATSU - MIN_TECHNIC][26].smana; - } - break; - - case 27: - if (name) return _("天翔龍閃", "Dragonic Flash"); - if (desc) return _("視界内の場所を指定して、その場所と自分の間にいる全モンスターを攻撃し、その場所に移動する。", - "Runs toward given location while attacking all monsters on the path."); - - if (cast) - { - POSITION y, x; - - if (!tgt_pt(&x, &y)) return NULL; - - if (!cave_player_teleportable_bold(y, x, 0L) || - (distance(y, x, p_ptr->y, p_ptr->x) > MAX_SIGHT / 2) || - !projectable(p_ptr->y, p_ptr->x, y, x)) - { - msg_print(_("失敗!", "You cannot move to that place!")); - break; - } - if (p_ptr->anti_tele) - { - msg_print(_("不思議な力がテレポートを防いだ!", "A mysterious force prevents you from teleporting!")); - break; - } - project(0, 0, y, x, HISSATSU_ISSEN, GF_ATTACK, PROJECT_BEAM | PROJECT_KILL, -1); - teleport_player_to(y, x, 0L); - } - break; - - case 28: - if (name) return _("二重の剣撃", "Twin Slash"); - if (desc) return _("1ターンで2度攻撃を行う。", "double attacks at a time."); - - if (cast) - { - int x, y; - - if (!get_rep_dir(&dir, FALSE)) return NULL; - - y = p_ptr->y + ddy[dir]; - x = p_ptr->x + ddx[dir]; - - if (cave[y][x].m_idx) - { - py_attack(y, x, 0); - if (cave[y][x].m_idx) - { - handle_stuff(); - py_attack(y, x, 0); - } - } - else - { - msg_print(_("その方向にはモンスターはいません。", "You don't see any monster in this direction")); - return NULL; - } - } - break; - - case 29: - if (name) return _("虎伏絶刀勢", "Kofuku-Zettousei"); - if (desc) return _("強力な攻撃を行い、近くの場所にも効果が及ぶ。", "Performs a powerful attack which even effect nearby monsters."); - - if (cast) - { - int total_damage = 0, basedam, i; - int y, x; - u32b flgs[TR_FLAG_SIZE]; - object_type *o_ptr; - - if (!get_rep_dir2(&dir)) return NULL; - if (dir == 5) return NULL; - - y = p_ptr->y + ddy[dir]; - x = p_ptr->x + ddx[dir]; - - if (d_info[dungeon_type].flags1 & DF1_NO_MELEE) - { - msg_print(_("なぜか攻撃することができない。", "Something prevent you from attacking.")); - return ""; - } - msg_print(_("武器を大きく振り下ろした。", "You swing your weapon downward.")); - for (i = 0; i < 2; i++) - { - int damage; - if (!buki_motteruka(INVEN_RARM+i)) break; - o_ptr = &inventory[INVEN_RARM+i]; - basedam = (o_ptr->dd * (o_ptr->ds + 1)) * 50; - damage = o_ptr->to_d * 100; - object_flags(o_ptr, flgs); - if ((o_ptr->name1 == ART_VORPAL_BLADE) || (o_ptr->name1 == ART_CHAINSWORD)) - { - /* vorpal blade */ - basedam *= 5; - basedam /= 3; - } - else if (have_flag(flgs, TR_VORPAL)) - { - /* vorpal flag only */ - basedam *= 11; - basedam /= 9; - } - damage += basedam; - damage += p_ptr->to_d[i] * 100; - damage *= p_ptr->num_blow[i]; - total_damage += (damage / 100); - } - 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); - } - break; - - case 30: - if (name) return _("慶雲鬼忍剣", "Keiun-Kininken"); - if (desc) return _("自分もダメージをくらうが、相手に非常に大きなダメージを与える。アンデッドには特に効果がある。", - "Attacks a monster with extremely powerful damage. But you also takes some damages. Hurts a undead monster greatly."); - - if (cast) - { - int y, x; - - if (!get_rep_dir2(&dir)) return NULL; - if (dir == 5) return NULL; - - y = p_ptr->y + ddy[dir]; - x = p_ptr->x + ddx[dir]; - - if (cave[y][x].m_idx) - py_attack(y, x, HISSATSU_UNDEAD); - else - { - msg_print(_("その方向にはモンスターはいません。", "There is no monster.")); - return NULL; - } - take_hit(DAMAGE_NOESCAPE, 100 + randint1(100), _("慶雲鬼忍剣を使った衝撃", "exhaustion on using Keiun-Kininken"), -1); - } - break; - - case 31: - if (name) return _("切腹", "Harakiri"); - if (desc) return _("「武士道とは、死ぬことと見つけたり。」", "'Busido is found in death'"); - - if (cast) - { - int i; - if (!get_check(_("本当に自殺しますか?", "Do you really want to commit suicide? "))) return NULL; - /* Special Verification for suicide */ - prt(_("確認のため '@' を押して下さい。", "Please verify SUICIDE by typing the '@' sign: "), 0, 0); - - flush(); - i = inkey(); - prt("", 0, 0); - if (i != '@') return NULL; - if (p_ptr->total_winner) - { - take_hit(DAMAGE_FORCE, 9999, "Seppuku", -1); - p_ptr->total_winner = TRUE; - } - else - { - msg_print(_("武士道とは、死ぬことと見つけたり。", "Meaning of Bushi-do is found in the death.")); - take_hit(DAMAGE_FORCE, 9999, "Seppuku", -1); - } - } - break; - } - - return ""; -} - -/*! * @brief 呪術領域の武器呪縛の対象にできる武器かどうかを返す。 / An "item_tester_hook" for offer * @param o_ptr オブジェクト構造体の参照ポインタ * @return 呪縛可能な武器ならばTRUEを返す diff --git a/src/realm-hissatsu.c b/src/realm-hissatsu.c new file mode 100644 index 000000000..b4315d3b6 --- /dev/null +++ b/src/realm-hissatsu.c @@ -0,0 +1,943 @@ +#include "angband.h" +#include "cmd-spell.h" + +/*! +* @brief Œ•p‚ÌŠeˆ—‚ðs‚¤ +* @param spell Œ•pID +* @param mode ˆ—“à—e (SPELL_NAME / SPELL_DESC / SPELL_CAST) +* @return SPELL_NAME / SPELL_DESC Žž‚É‚Í•¶Žš—ñƒ|ƒCƒ“ƒ^‚ð•Ô‚·BSPELL_CASTŽž‚ÍNULL•¶Žš—ñ‚ð•Ô‚·B +*/ +cptr do_hissatsu_spell(SPELL_IDX spell, BIT_FLAGS mode) +{ + bool name = (mode == SPELL_NAME) ? TRUE : FALSE; + bool desc = (mode == SPELL_DESC) ? TRUE : FALSE; + bool cast = (mode == SPELL_CAST) ? TRUE : FALSE; + + int dir; + int plev = p_ptr->lev; + + switch (spell) + { + case 0: + if (name) return _("”ò”эj", "Tobi-Izuna"); + if (desc) return _("2ƒ}ƒX—£‚ꂽ‚Æ‚±‚ë‚É‚¢‚郂ƒ“ƒXƒ^[‚ðUŒ‚‚·‚éB", "Attacks a two squares distant monster."); + + if (cast) + { + project_length = 2; + if (!get_aim_dir(&dir)) return NULL; + + project_hook(GF_ATTACK, dir, HISSATSU_2, PROJECT_STOP | PROJECT_KILL); + } + break; + + case 1: + if (name) return _("ŒÜŒŽ‰JŽa‚è", "3-Way Attack"); + if (desc) return _("3•ûŒü‚ɑ΂µ‚čUŒ‚‚·‚éB", "Attacks in 3 directions in one time."); + + if (cast) + { + int cdir; + int y, x; + + if (!get_rep_dir2(&dir)) return NULL; + if (dir == 5) return NULL; + + for (cdir = 0; cdir < 8; cdir++) + { + if (cdd[cdir] == dir) break; + } + + if (cdir == 8) return NULL; + + y = p_ptr->y + ddy_cdd[cdir]; + x = p_ptr->x + ddx_cdd[cdir]; + if (cave[y][x].m_idx) + py_attack(y, x, 0); + else + msg_print(_("UŒ‚‚Í‹ó‚ðØ‚Á‚½B", "You attack the empty air.")); + + y = p_ptr->y + ddy_cdd[(cdir + 7) % 8]; + x = p_ptr->x + ddx_cdd[(cdir + 7) % 8]; + if (cave[y][x].m_idx) + py_attack(y, x, 0); + else + msg_print(_("UŒ‚‚Í‹ó‚ðØ‚Á‚½B", "You attack the empty air.")); + + y = p_ptr->y + ddy_cdd[(cdir + 1) % 8]; + x = p_ptr->x + ddx_cdd[(cdir + 1) % 8]; + if (cave[y][x].m_idx) + py_attack(y, x, 0); + else + msg_print(_("UŒ‚‚Í‹ó‚ðØ‚Á‚½B", "You attack the empty air.")); + } + break; + + case 2: + if (name) return _("ƒu[ƒƒ‰ƒ“", "Boomerang"); + if (desc) return _("•Ší‚ðŽèŒ³‚É–ß‚Á‚Ä‚­‚é‚悤‚É“Š‚°‚éB–ß‚Á‚Ä‚±‚È‚¢‚±‚Æ‚à‚ ‚éB", + "Throws current weapon. And it'll return to your hand unless failed."); + + if (cast) + { + if (!do_cmd_throw(1, TRUE, -1)) return NULL; + } + break; + + case 3: + if (name) return _("‰‹—ì", "Burning Strike"); + if (desc) return _("‰Î‰Š‘ϐ«‚Ì‚È‚¢ƒ‚ƒ“ƒXƒ^[‚É‘åƒ_ƒ[ƒW‚ð—^‚¦‚éB", "Attacks a monster with more damage unless it has resistance to fire."); + + if (cast) + { + int y, x; + + if (!get_rep_dir2(&dir)) return NULL; + if (dir == 5) return NULL; + + y = p_ptr->y + ddy[dir]; + x = p_ptr->x + ddx[dir]; + + if (cave[y][x].m_idx) + py_attack(y, x, HISSATSU_FIRE); + else + { + msg_print(_("‚»‚Ì•ûŒü‚ɂ̓‚ƒ“ƒXƒ^[‚Í‚¢‚Ü‚¹‚ñB", "There is no monster.")); + return NULL; + } + } + break; + + case 4: + if (name) return _("ŽE‹CŠ´’m", "Detect Ferocity"); + if (desc) return _("‹ß‚­‚ÌŽvl‚·‚邱‚Æ‚ª‚Å‚«‚郂ƒ“ƒXƒ^[‚ðŠ´’m‚·‚éB", "Detects all monsters except mindless in your vicinity."); + + if (cast) + { + detect_monsters_mind(DETECT_RAD_DEFAULT); + } + break; + + case 5: + if (name) return _("‚Ý‚Ë‘Å‚¿", "Strike to Stun"); + if (desc) return _("‘ŠŽè‚Ƀ_ƒ[ƒW‚ð—^‚¦‚È‚¢‚ªAžNžO‚Æ‚³‚¹‚éB", "Attempts to stun a monster in the adjacent."); + + if (cast) + { + int y, x; + + if (!get_rep_dir2(&dir)) return NULL; + if (dir == 5) return NULL; + + y = p_ptr->y + ddy[dir]; + x = p_ptr->x + ddx[dir]; + + if (cave[y][x].m_idx) + py_attack(y, x, HISSATSU_MINEUCHI); + else + { + msg_print(_("‚»‚Ì•ûŒü‚ɂ̓‚ƒ“ƒXƒ^[‚Í‚¢‚Ü‚¹‚ñB", "There is no monster.")); + return NULL; + } + } + break; + + case 6: + if (name) return _("ƒJƒEƒ“ƒ^[", "Counter"); + if (desc) return _("‘ŠŽè‚ɍUŒ‚‚³‚ꂽ‚Æ‚«‚É”½Œ‚‚·‚éB”½Œ‚‚·‚邽‚Ñ‚ÉMP‚ðÁ”ïB", + "Prepares to counterattack. When attack by a monster, strikes back using SP each time."); + + if (cast) + { + if (p_ptr->riding) + { + msg_print(_("æ”n’†‚É‚Í–³—‚¾B", "You cannot do it when riding.")); + return NULL; + } + msg_print(_("‘ŠŽè‚̍UŒ‚‚ɑ΂µ‚Đg\‚¦‚½B", "You prepare to counter blow.")); + p_ptr->counter = TRUE; + } + break; + + case 7: + if (name) return _("•¥‚¢”²‚¯", "Harainuke"); + if (desc) return _("UŒ‚‚µ‚½ŒãA”½‘Α¤‚É”²‚¯‚éB", + "Attacks monster with your weapons normally, then move through counter side of the monster."); + + if (cast) + { + POSITION y, x; + + if (p_ptr->riding) + { + msg_print(_("æ”n’†‚É‚Í–³—‚¾B", "You cannot do it when riding.")); + return NULL; + } + + if (!get_rep_dir2(&dir)) return NULL; + + if (dir == 5) return NULL; + y = p_ptr->y + ddy[dir]; + x = p_ptr->x + ddx[dir]; + + if (!cave[y][x].m_idx) + { + msg_print(_("‚»‚Ì•ûŒü‚ɂ̓‚ƒ“ƒXƒ^[‚Í‚¢‚Ü‚¹‚ñB", "There is no monster.")); + return NULL; + } + + py_attack(y, x, 0); + + if (!player_can_enter(cave[y][x].feat, 0) || is_trap(cave[y][x].feat)) + break; + + y += ddy[dir]; + x += ddx[dir]; + + if (player_can_enter(cave[y][x].feat, 0) && !is_trap(cave[y][x].feat) && !cave[y][x].m_idx) + { + msg_print(NULL); + + /* Move the player */ + (void)move_player_effect(y, x, MPE_FORGET_FLOW | MPE_HANDLE_STUFF | MPE_DONT_PICKUP); + } + } + break; + + case 8: + if (name) return _("ƒT[ƒyƒ“ƒcƒ^ƒ“", "Serpent's Tongue"); + if (desc) return _("“őϐ«‚Ì‚È‚¢ƒ‚ƒ“ƒXƒ^[‚É‘åƒ_ƒ[ƒW‚ð—^‚¦‚éB", "Attacks a monster with more damage unless it has resistance to poison."); + + if (cast) + { + int y, x; + + if (!get_rep_dir2(&dir)) return NULL; + if (dir == 5) return NULL; + + y = p_ptr->y + ddy[dir]; + x = p_ptr->x + ddx[dir]; + + if (cave[y][x].m_idx) + py_attack(y, x, HISSATSU_POISON); + else + { + msg_print(_("‚»‚Ì•ûŒü‚ɂ̓‚ƒ“ƒXƒ^[‚Í‚¢‚Ü‚¹‚ñB", "There is no monster.")); + return NULL; + } + } + break; + + case 9: + if (name) return _("Ža–‚Œ•“ó‚Ì‘¾“", "Zammaken"); + if (desc) return _("¶–½‚Ì‚È‚¢Ž×ˆ«‚ȃ‚ƒ“ƒXƒ^[‚É‘åƒ_ƒ[ƒW‚ð—^‚¦‚邪A‘¼‚̃‚ƒ“ƒXƒ^[‚É‚Í‘S‚­Œø‰Ê‚ª‚È‚¢B", + "Attacks an evil unliving monster with great damage. No effect to other monsters."); + + if (cast) + { + int y, x; + + if (!get_rep_dir2(&dir)) return NULL; + if (dir == 5) return NULL; + + y = p_ptr->y + ddy[dir]; + x = p_ptr->x + ddx[dir]; + + if (cave[y][x].m_idx) + py_attack(y, x, HISSATSU_ZANMA); + else + { + msg_print(_("‚»‚Ì•ûŒü‚ɂ̓‚ƒ“ƒXƒ^[‚Í‚¢‚Ü‚¹‚ñB", "There is no monster.")); + return NULL; + } + } + break; + + case 10: + if (name) return _("—ô•—Œ•", "Wind Blast"); + if (desc) return _("UŒ‚‚µ‚½‘ŠŽè‚ðŒã•û‚֐‚«”ò‚΂·B", "Attacks an adjacent monster, and blow it away."); + + if (cast) + { + int y, x; + + if (!get_rep_dir2(&dir)) return NULL; + if (dir == 5) return NULL; + + y = p_ptr->y + ddy[dir]; + x = p_ptr->x + ddx[dir]; + + if (cave[y][x].m_idx) + py_attack(y, x, 0); + else + { + msg_print(_("‚»‚Ì•ûŒü‚ɂ̓‚ƒ“ƒXƒ^[‚Í‚¢‚Ü‚¹‚ñB", "There is no monster.")); + return NULL; + } + if (d_info[dungeon_type].flags1 & DF1_NO_MELEE) + { + return ""; + } + if (cave[y][x].m_idx) + { + int i; + POSITION ty = y, tx = x; + POSITION oy = y, ox = x; + MONSTER_IDX m_idx = cave[y][x].m_idx; + monster_type *m_ptr = &m_list[m_idx]; + char m_name[80]; + + monster_desc(m_name, m_ptr, 0); + + for (i = 0; i < 5; i++) + { + y += ddy[dir]; + x += ddx[dir]; + if (cave_empty_bold(y, x)) + { + ty = y; + tx = x; + } + else break; + } + if ((ty != oy) || (tx != ox)) + { + msg_format(_("%s‚𐁂«”ò‚΂µ‚½I", "You blow %s away!"), m_name); + cave[oy][ox].m_idx = 0; + cave[ty][tx].m_idx = m_idx; + m_ptr->fy = ty; + m_ptr->fx = tx; + + update_mon(m_idx, TRUE); + lite_spot(oy, ox); + lite_spot(ty, tx); + + if (r_info[m_ptr->r_idx].flags7 & (RF7_LITE_MASK | RF7_DARK_MASK)) + p_ptr->update |= (PU_MON_LITE); + } + } + } + break; + + case 11: + if (name) return _("“ ‚Ì–Ú—˜‚«", "Judge"); + if (desc) return _("•ŠíE–h‹ï‚ð1‚ÂŽ¯•Ê‚·‚éBƒŒƒxƒ‹45ˆÈã‚Å•ŠíE–h‹ï‚Ì”\—Í‚ðŠ®‘S‚É’m‚邱‚Æ‚ª‚Å‚«‚éB", + "Identifies a weapon or armor. Or *identifies* these at level 45."); + + if (cast) + { + if (plev > 44) + { + if (!identify_fully(TRUE)) return NULL; + } + else + { + if (!ident_spell(TRUE)) return NULL; + } + } + break; + + case 12: + if (name) return _("”jŠâŽa", "Rock Smash"); + if (desc) return _("Šâ‚ð‰ó‚µAŠâÎŒn‚̃‚ƒ“ƒXƒ^[‚É‘åƒ_ƒ[ƒW‚ð—^‚¦‚éB", "Breaks rock. Or greatly damage a monster made by rocks."); + + if (cast) + { + int y, x; + + if (!get_rep_dir2(&dir)) return NULL; + if (dir == 5) return NULL; + + y = p_ptr->y + ddy[dir]; + x = p_ptr->x + ddx[dir]; + + if (cave[y][x].m_idx) + py_attack(y, x, HISSATSU_HAGAN); + + if (!cave_have_flag_bold(y, x, FF_HURT_ROCK)) break; + + /* Destroy the feature */ + cave_alter_feat(y, x, FF_HURT_ROCK); + + /* Update some things */ + p_ptr->update |= (PU_FLOW); + } + break; + + case 13: + if (name) return _("—‚êáŒŽ‰Ô", "Midare-Setsugekka"); + if (desc) return _("UŒ‚‰ñ”‚ª‘‚¦A—â‹C‘ϐ«‚Ì‚È‚¢ƒ‚ƒ“ƒXƒ^[‚É‘åƒ_ƒ[ƒW‚ð—^‚¦‚éB", + "Attacks a monster with increased number of attacks and more damage unless it has resistance to cold."); + + if (cast) + { + int y, x; + + if (!get_rep_dir2(&dir)) return NULL; + if (dir == 5) return NULL; + + y = p_ptr->y + ddy[dir]; + x = p_ptr->x + ddx[dir]; + + if (cave[y][x].m_idx) + py_attack(y, x, HISSATSU_COLD); + else + { + msg_print(_("‚»‚Ì•ûŒü‚ɂ̓‚ƒ“ƒXƒ^[‚Í‚¢‚Ü‚¹‚ñB", "There is no monster.")); + return NULL; + } + } + break; + + case 14: + if (name) return _("‹}Š“Ë‚«", "Spot Aiming"); + if (desc) return _("ƒ‚ƒ“ƒXƒ^[‚ðˆêŒ‚‚Å“|‚·UŒ‚‚ðŒJ‚èo‚·BŽ¸”s‚·‚é‚Æ1“_‚µ‚©ƒ_ƒ[ƒW‚ð—^‚¦‚ç‚ê‚È‚¢B", + "Attempts to kill a monster instantly. If failed cause only 1HP of damage."); + + if (cast) + { + int y, x; + + if (!get_rep_dir2(&dir)) return NULL; + if (dir == 5) return NULL; + + y = p_ptr->y + ddy[dir]; + x = p_ptr->x + ddx[dir]; + + if (cave[y][x].m_idx) + py_attack(y, x, HISSATSU_KYUSHO); + else + { + msg_print(_("‚»‚Ì•ûŒü‚ɂ̓‚ƒ“ƒXƒ^[‚Í‚¢‚Ü‚¹‚ñB", "There is no monster.")); + return NULL; + } + } + break; + + case 15: + if (name) return _("–‚_Ža‚è", "Majingiri"); + if (desc) return _("‰ïS‚̈ꌂ‚ōUŒ‚‚·‚éBUŒ‚‚ª‚©‚킳‚ê‚â‚·‚¢B", + "Attempts to attack with critical hit. But this attack is easy to evade for a monster."); + + if (cast) + { + int y, x; + + if (!get_rep_dir2(&dir)) return NULL; + if (dir == 5) return NULL; + + y = p_ptr->y + ddy[dir]; + x = p_ptr->x + ddx[dir]; + + if (cave[y][x].m_idx) + py_attack(y, x, HISSATSU_MAJIN); + else + { + msg_print(_("‚»‚Ì•ûŒü‚ɂ̓‚ƒ“ƒXƒ^[‚Í‚¢‚Ü‚¹‚ñB", "There is no monster.")); + return NULL; + } + } + break; + + case 16: + if (name) return _("ŽÌ‚Đg", "Desperate Attack"); + if (desc) return _("‹­—͂ȍUŒ‚‚ðŒJ‚èo‚·BŽŸ‚̃^[ƒ“‚܂ł̊ԁAH‚炤ƒ_ƒ[ƒW‚ª‘‚¦‚éB", + "Attacks with all of your power. But all damages you take will be doubled for one turn."); + + if (cast) + { + int y, x; + + if (!get_rep_dir2(&dir)) return NULL; + if (dir == 5) return NULL; + + y = p_ptr->y + ddy[dir]; + x = p_ptr->x + ddx[dir]; + + if (cave[y][x].m_idx) + py_attack(y, x, HISSATSU_SUTEMI); + else + { + msg_print(_("‚»‚Ì•ûŒü‚ɂ̓‚ƒ“ƒXƒ^[‚Í‚¢‚Ü‚¹‚ñB", "There is no monster.")); + return NULL; + } + p_ptr->sutemi = TRUE; + } + break; + + case 17: + if (name) return _("—‹Œ‚˜h’ÜŽa", "Lightning Eagle"); + if (desc) return _("“dŒ‚‘ϐ«‚Ì‚È‚¢ƒ‚ƒ“ƒXƒ^[‚É”ñí‚É‘å‚«‚¢ƒ_ƒ[ƒW‚ð—^‚¦‚éB", + "Attacks a monster with more damage unless it has resistance to electricity."); + + if (cast) + { + int y, x; + + if (!get_rep_dir2(&dir)) return NULL; + if (dir == 5) return NULL; + + y = p_ptr->y + ddy[dir]; + x = p_ptr->x + ddx[dir]; + + if (cave[y][x].m_idx) + py_attack(y, x, HISSATSU_ELEC); + else + { + msg_print(_("‚»‚Ì•ûŒü‚ɂ̓‚ƒ“ƒXƒ^[‚Í‚¢‚Ü‚¹‚ñB", "There is no monster.")); + return NULL; + } + } + break; + + case 18: + if (name) return _("“üg", "Rush Attack"); + if (desc) return _("‘f‘‚­‘ŠŽè‚ɋߊñ‚èUŒ‚‚·‚éB", "Steps close to a monster and attacks at a time."); + + if (cast) + { + if (!rush_attack(NULL)) return NULL; + } + break; + + case 19: + if (name) return _("Ô—¬‰Q", "Bloody Maelstrom"); + if (desc) return _("Ž©•ªŽ©g‚à‚ðì‚è‚‚A‚»‚̏‚ª[‚¢‚Ù‚Ç‘å‚«‚¢ˆÐ—Í‚Å‘S•ûŒü‚Ì“G‚ðUŒ‚‚Å‚«‚éB¶‚«‚Ä‚¢‚È‚¢ƒ‚ƒ“ƒXƒ^[‚É‚ÍŒø‰Ê‚ª‚È‚¢B", + "Attacks all adjacent monsters with power corresponding to your cut status. Then increases your cut status. No effect to unliving monsters."); + + if (cast) + { + int y = 0, x = 0; + + cave_type *c_ptr; + monster_type *m_ptr; + + if (p_ptr->cut < 300) + set_cut(p_ptr->cut + 300); + else + set_cut(p_ptr->cut * 2); + + for (dir = 0; dir < 8; dir++) + { + y = p_ptr->y + ddy_ddd[dir]; + x = p_ptr->x + ddx_ddd[dir]; + c_ptr = &cave[y][x]; + + /* Get the monster */ + m_ptr = &m_list[c_ptr->m_idx]; + + /* Hack -- attack monsters */ + if (c_ptr->m_idx && (m_ptr->ml || cave_have_flag_bold(y, x, FF_PROJECT))) + { + if (!monster_living(&r_info[m_ptr->r_idx])) + { + char m_name[80]; + + monster_desc(m_name, m_ptr, 0); + msg_format(_("%s‚É‚ÍŒø‰Ê‚ª‚È‚¢I", "%s is unharmed!"), m_name); + } + else py_attack(y, x, HISSATSU_SEKIRYUKA); + } + } + } + break; + + case 20: + if (name) return _("ŒƒkŒ‚", "Earthquake Blow"); + if (desc) return _("’nk‚ð‹N‚±‚·B", "Shakes dungeon structure, and results in random swapping of floors and walls."); + + if (cast) + { + int y, x; + + if (!get_rep_dir2(&dir)) return NULL; + if (dir == 5) return NULL; + + y = p_ptr->y + ddy[dir]; + x = p_ptr->x + ddx[dir]; + + if (cave[y][x].m_idx) + py_attack(y, x, HISSATSU_QUAKE); + else + earthquake(p_ptr->y, p_ptr->x, 10); + } + break; + + case 21: + if (name) return _("’n‘–‚è", "Crack"); + if (desc) return _("ÕŒ‚”g‚̃r[ƒ€‚ð•ú‚B", "Fires a beam of shock wave."); + + if (cast) + { + int total_damage = 0, basedam, i; + u32b flgs[TR_FLAG_SIZE]; + object_type *o_ptr; + if (!get_aim_dir(&dir)) return NULL; + msg_print(_("•Ší‚ð‘å‚«‚­U‚艺‚낵‚½B", "You swing your weapon downward.")); + for (i = 0; i < 2; i++) + { + int damage; + + if (!buki_motteruka(INVEN_RARM + i)) break; + o_ptr = &inventory[INVEN_RARM + i]; + basedam = (o_ptr->dd * (o_ptr->ds + 1)) * 50; + damage = o_ptr->to_d * 100; + object_flags(o_ptr, flgs); + if ((o_ptr->name1 == ART_VORPAL_BLADE) || (o_ptr->name1 == ART_CHAINSWORD)) + { + /* vorpal blade */ + basedam *= 5; + basedam /= 3; + } + else if (have_flag(flgs, TR_VORPAL)) + { + /* vorpal flag only */ + basedam *= 11; + basedam /= 9; + } + damage += basedam; + damage *= p_ptr->num_blow[i]; + total_damage += damage / 200; + if (i) total_damage = total_damage * 7 / 10; + } + fire_beam(GF_FORCE, dir, total_damage); + } + break; + + case 22: + if (name) return _("‹C”—‚Ì—Y‹©‚Ñ", "War Cry"); + if (desc) return _("Ž‹ŠE“à‚Ì‘Sƒ‚ƒ“ƒXƒ^[‚ɑ΂µ‚čŒ‰¹‚̍UŒ‚‚ðs‚¤B‚³‚ç‚ɁA‹ß‚­‚É‚¢‚郂ƒ“ƒXƒ^[‚ð“{‚点‚éB", + "Damages all monsters in sight with sound. Aggravate nearby monsters."); + + if (cast) + { + msg_print(_("—Y‹©‚Ñ‚ð‚ ‚°‚½I", "You roar out!")); + project_hack(GF_SOUND, randint1(plev * 3)); + aggravate_monsters(0); + } + break; + + case 23: + if (name) return _("–³‘oŽO’i", "Musou-Sandan"); + if (desc) return _("‹­—Í‚È3’iUŒ‚‚ðŒJ‚èo‚·B", "Attacks with powerful 3 strikes."); + + if (cast) + { + int i; + + if (!get_rep_dir2(&dir)) return NULL; + if (dir == 5) return NULL; + + for (i = 0; i < 3; i++) + { + POSITION y, x; + POSITION ny, nx; + MONSTER_IDX m_idx; + cave_type *c_ptr; + monster_type *m_ptr; + + y = p_ptr->y + ddy[dir]; + x = p_ptr->x + ddx[dir]; + c_ptr = &cave[y][x]; + + if (c_ptr->m_idx) + py_attack(y, x, HISSATSU_3DAN); + else + { + msg_print(_("‚»‚Ì•ûŒü‚ɂ̓‚ƒ“ƒXƒ^[‚Í‚¢‚Ü‚¹‚ñB", "There is no monster.")); + return NULL; + } + + if (d_info[dungeon_type].flags1 & DF1_NO_MELEE) + { + return ""; + } + + /* Monster is dead? */ + if (!c_ptr->m_idx) break; + + ny = y + ddy[dir]; + nx = x + ddx[dir]; + m_idx = c_ptr->m_idx; + m_ptr = &m_list[m_idx]; + + /* Monster cannot move back? */ + if (!monster_can_enter(ny, nx, &r_info[m_ptr->r_idx], 0)) + { + /* -more- */ + if (i < 2) msg_print(NULL); + continue; + } + + c_ptr->m_idx = 0; + cave[ny][nx].m_idx = m_idx; + m_ptr->fy = ny; + m_ptr->fx = nx; + + update_mon(m_idx, TRUE); + + /* Redraw the old spot */ + lite_spot(y, x); + + /* Redraw the new spot */ + lite_spot(ny, nx); + + /* Player can move forward? */ + if (player_can_enter(c_ptr->feat, 0)) + { + /* Move the player */ + if (!move_player_effect(y, x, MPE_FORGET_FLOW | MPE_HANDLE_STUFF | MPE_DONT_PICKUP)) break; + } + else + { + break; + } + + /* -more- */ + if (i < 2) msg_print(NULL); + } + } + break; + + case 24: + if (name) return _("‹zŒŒ‹S‚̉å", "Vampire's Fang"); + if (desc) return _("UŒ‚‚µ‚½‘ŠŽè‚Ì‘Ì—Í‚ð‹z‚¢‚Æ‚èAŽ©•ª‚Ì‘Ì—Í‚ð‰ñ•œ‚³‚¹‚éB¶–½‚ðŽ‚½‚È‚¢ƒ‚ƒ“ƒXƒ^[‚É‚Í’Ê‚¶‚È‚¢B", + "Attacks with vampiric strikes which absorbs HP from a monster and gives them to you. No effect to unliving monsters."); + + if (cast) + { + int y, x; + + if (!get_rep_dir2(&dir)) return NULL; + if (dir == 5) return NULL; + + y = p_ptr->y + ddy[dir]; + x = p_ptr->x + ddx[dir]; + + if (cave[y][x].m_idx) + py_attack(y, x, HISSATSU_DRAIN); + else + { + msg_print(_("‚»‚Ì•ûŒü‚ɂ̓‚ƒ“ƒXƒ^[‚Í‚¢‚Ü‚¹‚ñB", "There is no monster.")); + return NULL; + } + } + break; + + case 25: + if (name) return _("Œ¶˜f", "Moon Dazzling"); + if (desc) return _("Ž‹ŠE“à‚Ì‹N‚«‚Ä‚¢‚é‘Sƒ‚ƒ“ƒXƒ^[‚ÉžNžOA¬—A–°‚è‚ð—^‚¦‚悤‚Æ‚·‚éB", "Attempts to stun, confuse and sleep all waking monsters."); + + if (cast) + { + msg_print(_("•Ší‚ð•s‹K‘¥‚É—h‚炵‚½DDD", "You irregularly wave your weapon...")); + project_hack(GF_ENGETSU, plev * 4); + project_hack(GF_ENGETSU, plev * 4); + project_hack(GF_ENGETSU, plev * 4); + } + break; + + case 26: + if (name) return _("•SlŽa‚è", "Hundred Slaughter"); + if (desc) return _("˜A‘±‚µ‚Ä“üg‚Ń‚ƒ“ƒXƒ^[‚ðUŒ‚‚·‚éBUŒ‚‚·‚邽‚Ñ‚ÉMP‚ðÁ”ïBMP‚ª‚È‚­‚È‚é‚©Aƒ‚ƒ“ƒXƒ^[‚ð“|‚¹‚È‚©‚Á‚½‚ç•SlŽa‚è‚͏I—¹‚·‚éB", + "Performs a series of rush attacks. The series continues while killing each monster in a time and SP remains."); + + if (cast) + { + const int mana_cost_per_monster = 8; + bool is_new = TRUE; + bool mdeath; + + do + { + if (!rush_attack(&mdeath)) break; + if (is_new) + { + /* Reserve needed mana point */ + p_ptr->csp -= technic_info[REALM_HISSATSU - MIN_TECHNIC][26].smana; + is_new = FALSE; + } + else + p_ptr->csp -= mana_cost_per_monster; + + if (!mdeath) break; + command_dir = 0; + + p_ptr->redraw |= PR_MANA; + handle_stuff(); + } while (p_ptr->csp > mana_cost_per_monster); + + if (is_new) return NULL; + + /* Restore reserved mana */ + p_ptr->csp += technic_info[REALM_HISSATSU - MIN_TECHNIC][26].smana; + } + break; + + case 27: + if (name) return _("“Vãė´‘M", "Dragonic Flash"); + if (desc) return _("Ž‹ŠE“à‚̏ꏊ‚ðŽw’肵‚āA‚»‚̏ꏊ‚ÆŽ©•ª‚ÌŠÔ‚É‚¢‚é‘Sƒ‚ƒ“ƒXƒ^[‚ðUŒ‚‚µA‚»‚̏ꏊ‚Ɉړ®‚·‚éB", + "Runs toward given location while attacking all monsters on the path."); + + if (cast) + { + POSITION y, x; + + if (!tgt_pt(&x, &y)) return NULL; + + if (!cave_player_teleportable_bold(y, x, 0L) || + (distance(y, x, p_ptr->y, p_ptr->x) > MAX_SIGHT / 2) || + !projectable(p_ptr->y, p_ptr->x, y, x)) + { + msg_print(_("Ž¸”sI", "You cannot move to that place!")); + break; + } + if (p_ptr->anti_tele) + { + msg_print(_("•sŽv‹c‚È—Í‚ªƒeƒŒƒ|[ƒg‚ð–h‚¢‚¾I", "A mysterious force prevents you from teleporting!")); + break; + } + project(0, 0, y, x, HISSATSU_ISSEN, GF_ATTACK, PROJECT_BEAM | PROJECT_KILL, -1); + teleport_player_to(y, x, 0L); + } + break; + + case 28: + if (name) return _("“ñd‚ÌŒ•Œ‚", "Twin Slash"); + if (desc) return _("1ƒ^[ƒ“‚Å2“xUŒ‚‚ðs‚¤B", "double attacks at a time."); + + if (cast) + { + int x, y; + + if (!get_rep_dir(&dir, FALSE)) return NULL; + + y = p_ptr->y + ddy[dir]; + x = p_ptr->x + ddx[dir]; + + if (cave[y][x].m_idx) + { + py_attack(y, x, 0); + if (cave[y][x].m_idx) + { + handle_stuff(); + py_attack(y, x, 0); + } + } + else + { + msg_print(_("‚»‚Ì•ûŒü‚ɂ̓‚ƒ“ƒXƒ^[‚Í‚¢‚Ü‚¹‚ñB", "You don't see any monster in this direction")); + return NULL; + } + } + break; + + case 29: + if (name) return _("ŒÕ•šâ“¨", "Kofuku-Zettousei"); + if (desc) return _("‹­—͂ȍUŒ‚‚ðs‚¢A‹ß‚­‚̏ꏊ‚É‚àŒø‰Ê‚ª‹y‚ԁB", "Performs a powerful attack which even effect nearby monsters."); + + if (cast) + { + int total_damage = 0, basedam, i; + int y, x; + u32b flgs[TR_FLAG_SIZE]; + object_type *o_ptr; + + if (!get_rep_dir2(&dir)) return NULL; + if (dir == 5) return NULL; + + y = p_ptr->y + ddy[dir]; + x = p_ptr->x + ddx[dir]; + + if (d_info[dungeon_type].flags1 & DF1_NO_MELEE) + { + msg_print(_("‚È‚º‚©UŒ‚‚·‚邱‚Æ‚ª‚Å‚«‚È‚¢B", "Something prevent you from attacking.")); + return ""; + } + msg_print(_("•Ší‚ð‘å‚«‚­U‚艺‚낵‚½B", "You swing your weapon downward.")); + for (i = 0; i < 2; i++) + { + int damage; + if (!buki_motteruka(INVEN_RARM + i)) break; + o_ptr = &inventory[INVEN_RARM + i]; + basedam = (o_ptr->dd * (o_ptr->ds + 1)) * 50; + damage = o_ptr->to_d * 100; + object_flags(o_ptr, flgs); + if ((o_ptr->name1 == ART_VORPAL_BLADE) || (o_ptr->name1 == ART_CHAINSWORD)) + { + /* vorpal blade */ + basedam *= 5; + basedam /= 3; + } + else if (have_flag(flgs, TR_VORPAL)) + { + /* vorpal flag only */ + basedam *= 11; + basedam /= 9; + } + damage += basedam; + damage += p_ptr->to_d[i] * 100; + damage *= p_ptr->num_blow[i]; + total_damage += (damage / 100); + } + 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); + } + break; + + case 30: + if (name) return _("Œc‰_‹S”EŒ•", "Keiun-Kininken"); + if (desc) return _("Ž©•ª‚àƒ_ƒ[ƒW‚ð‚­‚ç‚¤‚ªA‘ŠŽè‚É”ñí‚É‘å‚«‚ȃ_ƒ[ƒW‚ð—^‚¦‚éBƒAƒ“ƒfƒbƒh‚É‚Í“Á‚ÉŒø‰Ê‚ª‚ ‚éB", + "Attacks a monster with extremely powerful damage. But you also takes some damages. Hurts a undead monster greatly."); + + if (cast) + { + int y, x; + + if (!get_rep_dir2(&dir)) return NULL; + if (dir == 5) return NULL; + + y = p_ptr->y + ddy[dir]; + x = p_ptr->x + ddx[dir]; + + if (cave[y][x].m_idx) + py_attack(y, x, HISSATSU_UNDEAD); + else + { + msg_print(_("‚»‚Ì•ûŒü‚ɂ̓‚ƒ“ƒXƒ^[‚Í‚¢‚Ü‚¹‚ñB", "There is no monster.")); + return NULL; + } + take_hit(DAMAGE_NOESCAPE, 100 + randint1(100), _("Œc‰_‹S”EŒ•‚ðŽg‚Á‚½ÕŒ‚", "exhaustion on using Keiun-Kininken"), -1); + } + break; + + case 31: + if (name) return _("Ø• ", "Harakiri"); + if (desc) return _("u•Žm“¹‚Ƃ́AŽ€‚Ê‚±‚Æ‚ÆŒ©‚‚¯‚½‚èBv", "'Busido is found in death'"); + + if (cast) + { + int i; + if (!get_check(_("–{“–‚ÉŽ©ŽE‚µ‚Ü‚·‚©H", "Do you really want to commit suicide? "))) return NULL; + /* Special Verification for suicide */ + prt(_("Šm”F‚Ì‚½‚ß '@' ‚ð‰Ÿ‚µ‚ĉº‚³‚¢B", "Please verify SUICIDE by typing the '@' sign: "), 0, 0); + + flush(); + i = inkey(); + prt("", 0, 0); + if (i != '@') return NULL; + if (p_ptr->total_winner) + { + take_hit(DAMAGE_FORCE, 9999, "Seppuku", -1); + p_ptr->total_winner = TRUE; + } + else + { + msg_print(_("•Žm“¹‚Ƃ́AŽ€‚Ê‚±‚Æ‚ÆŒ©‚‚¯‚½‚èB", "Meaning of Bushi-do is found in the death.")); + take_hit(DAMAGE_FORCE, 9999, "Seppuku", -1); + } + } + break; + } + + return ""; +} diff --git a/src/realm-hissatsu.h b/src/realm-hissatsu.h new file mode 100644 index 000000000..0682b854d --- /dev/null +++ b/src/realm-hissatsu.h @@ -0,0 +1 @@ +extern cptr do_hissatsu_spell(SPELL_IDX spell, BIT_FLAGS mode); -- 2.11.0