#include "monster/smart-learn-types.h"
#include "mspell/smart-mspell-util.h"
#include "status/element-resistance.h"
+#include "player/player-status-flags.h"
void add_cheat_remove_flags_element(player_type *target_ptr, msr_type *msr_ptr)
{
- if (target_ptr->resist_acid)
+ if (has_resist_acid(target_ptr))
msr_ptr->smart |= SM_RES_ACID;
if (is_oppose_acid(target_ptr))
msr_ptr->smart |= SM_OPP_ACID;
- if (target_ptr->immune_acid)
+ if (has_immune_acid(target_ptr))
msr_ptr->smart |= SM_IMM_ACID;
- if (target_ptr->resist_elec)
+ if (has_resist_elec(target_ptr))
msr_ptr->smart |= SM_RES_ELEC;
if (is_oppose_elec(target_ptr))
msr_ptr->smart |= SM_OPP_ELEC;
- if (target_ptr->immune_elec)
+ if (has_immune_elec(target_ptr))
msr_ptr->smart |= SM_IMM_ELEC;
- if (target_ptr->resist_fire)
+ if (has_resist_fire(target_ptr))
msr_ptr->smart |= SM_RES_FIRE;
if (is_oppose_fire(target_ptr))
msr_ptr->smart |= SM_OPP_FIRE;
- if (target_ptr->immune_fire)
+ if (has_immune_fire(target_ptr))
msr_ptr->smart |= SM_IMM_FIRE;
- if (target_ptr->resist_cold)
+ if (has_resist_cold(target_ptr))
msr_ptr->smart |= SM_RES_COLD;
if (is_oppose_cold(target_ptr))
msr_ptr->smart |= SM_OPP_COLD;
- if (target_ptr->immune_cold)
+ if (has_immune_cold(target_ptr))
msr_ptr->smart |= SM_IMM_COLD;
- if (target_ptr->resist_pois)
+ if (has_resist_pois(target_ptr))
msr_ptr->smart |= SM_RES_POIS;
if (is_oppose_pois(target_ptr))