OSDN Git Service

[Refactor] #37353 コメント整理。 / Refactor comments.
[hengband/hengband.git] / src / hissatsu.c
index 8559eb1..641cc5c 100644 (file)
@@ -313,13 +313,8 @@ void do_cmd_hissatsu(void)
        SPELL_IDX       n = 0;
        magic_type      spell;
 
-       /* not if confused */
-       if (p_ptr->confused)
-       {
-               msg_print(_("混乱していて集中できない!", "You are too confused!"));
-               return;
-       }
-       if (!buki_motteruka(INVEN_RARM) && !buki_motteruka(INVEN_LARM))
+       if (cmd_limit_confused(p_ptr)) return;
+       if (!has_melee_weapon(INVEN_RARM) && !has_melee_weapon(INVEN_LARM))
        {
                if (flush_failure) flush();
                msg_print(_("武器を持たないと必殺技は使えない!", "You need to wield a weapon!"));
@@ -356,7 +351,7 @@ void do_cmd_hissatsu(void)
        /* Cast the spell */
        if (!do_spell(REALM_HISSATSU, n, SPELL_CAST)) return;
 
-       p_ptr->energy_use = 100;
+       take_turn(p_ptr, 100);;
 
        /* Use some mana */
        p_ptr->csp -= spell.smana;
@@ -395,11 +390,7 @@ void do_cmd_gain_hissatsu(void)
                return;
        }
 
-       if (p_ptr->confused)
-       {
-               msg_print(_("混乱していて読めない!", "You are too confused!"));
-               return;
-       }
+       if (cmd_limit_confused(p_ptr)) return;
 
        if (!(p_ptr->new_spells))
        {
@@ -448,7 +439,7 @@ void do_cmd_gain_hissatsu(void)
                msg_print(_("何も覚えられなかった。", "You were not able to learn any special attacks."));
 
        else
-               p_ptr->energy_use = 100;
+               take_turn(p_ptr, 100);;
 
        p_ptr->update |= (PU_SPELLS);
 }