OSDN Git Service

[Refactor] #37353 型の置換。 / Type replacement. (BASE_STATUS / A_MAX)
[hengband/hengband.git] / src / hissatsu.c
index 30d7828..8d76b1a 100644 (file)
@@ -12,6 +12,7 @@
 
 #include "angband.h"
 #include "monsterrace-hook.h"
+#include "player-status.h"
 
 #define TECHNIC_HISSATSU (REALM_HISSATSU - MIN_TECHNIC)
 
@@ -312,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!"));
@@ -394,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))
        {