OSDN Git Service

[Refactor] #40514 player_type の resist_chaos, resist_dark 変数を廃止. / Abolished the...
[hengband/hengband.git] / src / mspell / high-resistance-checker.c
index 666b18e..1ea9696 100644 (file)
@@ -5,25 +5,26 @@
 #include "monster/smart-learn-types.h"
 #include "mspell/smart-mspell-util.h"
 #include "player/player-race.h"
+#include "player/player-status-flags.h"
 
 void add_cheat_remove_flags_others(player_type *target_ptr, msr_type *msr_ptr)
 {
     if (target_ptr->resist_neth)
         msr_ptr->smart |= SM_RES_NETH;
 
-    if (target_ptr->resist_lite)
+    if (has_resist_lite(target_ptr))
         msr_ptr->smart |= SM_RES_LITE;
 
-    if (target_ptr->resist_dark)
+    if (has_resist_dark(target_ptr))
         msr_ptr->smart |= SM_RES_DARK;
 
     if (target_ptr->resist_fear)
         msr_ptr->smart |= SM_RES_FEAR;
 
-    if (target_ptr->resist_conf)
+    if (has_resist_conf(target_ptr))
         msr_ptr->smart |= SM_RES_CONF;
 
-    if (target_ptr->resist_chaos)
+    if (has_resist_chaos(target_ptr))
         msr_ptr->smart |= SM_RES_CHAOS;
 
     if (target_ptr->resist_disen)
@@ -35,7 +36,7 @@ void add_cheat_remove_flags_others(player_type *target_ptr, msr_type *msr_ptr)
     if (target_ptr->resist_nexus)
         msr_ptr->smart |= SM_RES_NEXUS;
 
-    if (target_ptr->resist_sound)
+    if (has_resist_sound(target_ptr))
         msr_ptr->smart |= SM_RES_SOUND;
 
     if (target_ptr->resist_shard)