OSDN Git Service

[Refactor] #37353 item_tester_learn_spell() を object-hook.c へ移動。 / Move item_tester_l...
[hengband/hengband.git] / src / melee1.c
index 13b90f1..70bac3f 100644 (file)
  */
 
 #include "angband.h"
+#include "artifact.h"
 #include "cmd-pet.h"
 #include "player-damage.h"
 #include "monsterrace-hook.h"
 #include "melee.h"
 #include "projection.h"
+#include "monster-status.h"
+#include "avatar.h"
+#include "player-status.h"
 
 
 
@@ -462,7 +466,7 @@ static void py_attack_aux(POSITION y, POSITION x, bool *fear, bool *mdeath, s16b
        {
        case CLASS_ROGUE:
        case CLASS_NINJA:
-               if (buki_motteruka(INVEN_RARM + hand) && !p_ptr->icky_wield[hand])
+               if (has_melee_weapon(INVEN_RARM + hand) && !p_ptr->icky_wield[hand])
                {
                        int tmp = p_ptr->lev * 6 + (p_ptr->skill_stl + 10) * 4;
                        if (p_ptr->monlite && (mode != HISSATSU_NYUSIN)) tmp /= 3;
@@ -933,7 +937,7 @@ static void py_attack_aux(POSITION y, POSITION x, bool *fear, bool *mdeath, s16b
                                }
                                else k = 1;
                        }
-                       else if ((p_ptr->pclass == CLASS_NINJA) && buki_motteruka(INVEN_RARM + hand) && !p_ptr->icky_wield[hand] && ((p_ptr->cur_lite <= 0) || one_in_(7)))
+                       else if ((p_ptr->pclass == CLASS_NINJA) && has_melee_weapon(INVEN_RARM + hand) && !p_ptr->icky_wield[hand] && ((p_ptr->cur_lite <= 0) || one_in_(7)))
                        {
                                int maxhp = maxroll(r_ptr->hdice, r_ptr->hside);
                                if (one_in_(backstab ? 13 : (stab_fleeing || fuiuchi) ? 15 : 27))