OSDN Git Service

[Refactor] #40514 player_type の resist_lite 変数を廃止. / Abolished the resist_lite variab...
[hengband/hengband.git] / src / monster / monster-update.c
index 4da0716..fb31030 100644 (file)
@@ -539,7 +539,7 @@ void update_smart_learn(player_type *player_ptr, MONSTER_IDX m_idx, int what)
 
     switch (what) {
     case DRS_ACID:
-        if (player_ptr->resist_acid)
+        if (has_resist_acid(player_ptr))
             m_ptr->smart |= SM_RES_ACID;
 
         if (is_oppose_acid(player_ptr))
@@ -550,7 +550,7 @@ void update_smart_learn(player_type *player_ptr, MONSTER_IDX m_idx, int what)
 
         break;
     case DRS_ELEC:
-        if (player_ptr->resist_elec)
+        if (has_resist_elec(player_ptr))
             m_ptr->smart |= SM_RES_ELEC;
 
         if (is_oppose_elec(player_ptr))
@@ -561,7 +561,7 @@ void update_smart_learn(player_type *player_ptr, MONSTER_IDX m_idx, int what)
 
         break;
     case DRS_FIRE:
-        if (player_ptr->resist_fire)
+        if (has_resist_fire(player_ptr))
             m_ptr->smart |= SM_RES_FIRE;
 
         if (is_oppose_fire(player_ptr))
@@ -572,7 +572,7 @@ void update_smart_learn(player_type *player_ptr, MONSTER_IDX m_idx, int what)
 
         break;
     case DRS_COLD:
-        if (player_ptr->resist_cold)
+        if (has_resist_cold(player_ptr))
             m_ptr->smart |= SM_RES_COLD;
 
         if (is_oppose_cold(player_ptr))
@@ -583,7 +583,7 @@ void update_smart_learn(player_type *player_ptr, MONSTER_IDX m_idx, int what)
 
         break;
     case DRS_POIS:
-        if (player_ptr->resist_pois)
+        if (has_resist_pois(player_ptr))
             m_ptr->smart |= SM_RES_POIS;
 
         if (is_oppose_pois(player_ptr))
@@ -596,7 +596,7 @@ void update_smart_learn(player_type *player_ptr, MONSTER_IDX m_idx, int what)
 
         break;
     case DRS_LITE:
-        if (player_ptr->resist_lite)
+        if (has_resist_lite(player_ptr))
             m_ptr->smart |= SM_RES_LITE;
 
         break;
@@ -611,7 +611,7 @@ void update_smart_learn(player_type *player_ptr, MONSTER_IDX m_idx, int what)
 
         break;
     case DRS_CONF:
-        if (player_ptr->resist_conf)
+        if (has_resist_conf(player_ptr))
             m_ptr->smart |= SM_RES_CONF;
 
         break;
@@ -636,7 +636,7 @@ void update_smart_learn(player_type *player_ptr, MONSTER_IDX m_idx, int what)
 
         break;
     case DRS_SOUND:
-        if (player_ptr->resist_sound)
+        if (has_resist_sound(player_ptr))
             m_ptr->smart |= SM_RES_SOUND;
 
         break;