}
}
-static bool check_cold_blood(player_type *subject_ptr, um_type *um_ptr)
+static bool check_cold_blood(player_type *subject_ptr, um_type *um_ptr, const POSITION distance)
{
if (distance > subject_ptr->see_infra)
return FALSE;
monster_race *r_ptr = &r_info[um_ptr->m_ptr->r_idx];
- if ((r_ptr->flags2 & (RF2_COLD_BLOOD | RF2_AURA_FIRE)) != RF2_COLD_BLOOD)
- return TRUE;
+ if ((r_ptr->flags2 & (RF2_COLD_BLOOD | RF2_AURA_FIRE)) == RF2_COLD_BLOOD)
+ return FALSE;
um_ptr->easy = TRUE;
um_ptr->flag = TRUE;
um_ptr->flag = TRUE;
}
- bool do_cold_blood = check_cold_blood(subject_ptr, um_ptr);
+ bool do_cold_blood = check_cold_blood(subject_ptr, um_ptr, distance);
bool do_invisible = check_invisible(subject_ptr, um_ptr);
if (!um_ptr->flag || !is_original_ap(um_ptr->m_ptr) || subject_ptr->image)
return;
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))
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))
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))
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))
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))
break;
case DRS_LITE:
- if (player_ptr->resist_lite)
+ if (has_resist_lite(player_ptr))
m_ptr->smart |= SM_RES_LITE;
break;
break;
case DRS_CONF:
- if (player_ptr->resist_conf)
+ if (has_resist_conf(player_ptr))
m_ptr->smart |= SM_RES_CONF;
break;
break;
case DRS_SOUND:
- if (player_ptr->resist_sound)
+ if (has_resist_sound(player_ptr))
m_ptr->smart |= SM_RES_SOUND;
break;