}
}
- if (has_flag(f_ptr->flags, FF_COLD_PUDDLE) && !is_invuln(creature_ptr) && !creature_ptr->immune_cold) {
+ if (has_flag(f_ptr->flags, FF_COLD_PUDDLE) && !is_invuln(creature_ptr) && !has_immune_cold(creature_ptr)) {
int damage = 0;
if (has_flag(f_ptr->flags, FF_DEEP)) {
msg_print(_("痛い!", "It hurts!"));
take_hit(creature_ptr, DAMAGE_NOESCAPE, damage, _("電気のオーラ", "Elec aura"), -1);
}
- if ((r_info[creature_ptr->current_floor_ptr->m_list[creature_ptr->riding].r_idx].flags3 & RF3_AURA_COLD) && !creature_ptr->immune_cold) {
+ if ((r_info[creature_ptr->current_floor_ptr->m_list[creature_ptr->riding].r_idx].flags3 & RF3_AURA_COLD) && !has_immune_cold(creature_ptr)) {
damage = r_info[creature_ptr->current_floor_ptr->m_list[creature_ptr->riding].r_idx].level / 2;
if (creature_ptr->resist_cold)
damage = damage / 3;
}
if ((!(target_ptr->resist_cold || is_oppose_cold(target_ptr))) || one_in_(12)) {
- if (!target_ptr->immune_cold)
+ if (!has_immune_cold(target_ptr))
inventory_damage(target_ptr, set_cold_destroy, 3);
}
}
m_ptr->smart |= (SM_RES_COLD);
if (is_oppose_cold(player_ptr))
m_ptr->smart |= (SM_OPP_COLD);
- if (player_ptr->immune_cold)
+ if (has_immune_cold(player_ptr))
m_ptr->smart |= (SM_IMM_COLD);
break;
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 (r_ptr->flags4 & RF4_BR_COLD) {
- if (!creature_ptr->immune_cold && (creature_ptr->oppose_cold || music_singing(creature_ptr, MUSIC_RESIST)))
+ if (!has_immune_cold(creature_ptr) && (creature_ptr->oppose_cold || music_singing(creature_ptr, MUSIC_RESIST)))
return TRUE;
if (creature_ptr->special_defense & DEFENSE_COLD)
}
case SV_SCROLL_ICE: {
fire_ball(creature_ptr, GF_ICE, 0, 777, 4);
- if (!(is_oppose_cold(creature_ptr) || creature_ptr->resist_cold || creature_ptr->immune_cold))
+ if (!(is_oppose_cold(creature_ptr) || creature_ptr->resist_cold || has_immune_cold(creature_ptr)))
take_hit(creature_ptr, DAMAGE_NOESCAPE, 100 + randint1(100), _("氷の巻物", "a Scroll of Ice"), -1);
ident = TRUE;
case GF_COLD:
case GF_ICE:
- if (target_ptr->immune_cold) {
+ if (has_immune_cold(target_ptr)) {
dam = 0;
ignore_wraith_form = TRUE;
break;
si_ptr->info[si_ptr->line++] = _("\82 \82È\82½\82Í\89Î\82É\8eã\82¢\81B", "You are susceptible to damage from fire.");
}
- if (creature_ptr->immune_cold) {
+ if (has_immune_cold(creature_ptr)) {
si_ptr->info[si_ptr->line++] = _("\82 \82È\82½\82Í\97â\8bC\82É\91Î\82·\82é\8a®\91S\82È\82é\96Æ\89u\82ð\8e\9d\82Á\82Ä\82¢\82é\81B", "You are completely immune to cold.");
} else if (creature_ptr->resist_cold && is_oppose_cold(creature_ptr)) {
si_ptr->info[si_ptr->line++] = _("\82 \82È\82½\82Í\97â\8bC\82Ö\82Ì\8b\97Í\82È\91Ï\90«\82ð\8e\9d\82Á\82Ä\82¢\82é\81B", "You resist cold exceptionally well.");
bool double_resist = is_oppose_cold(creature_ptr);
/* Total immunity */
- if (creature_ptr->immune_cold || (dam <= 0)) {
+ if (has_immune_cold(creature_ptr) || (dam <= 0)) {
learn_spell(creature_ptr, monspell);
return 0;
}
RF2_AURA_FIRE,
fire_dam,
_("突然とても熱くなった!", "You are suddenly very hot!"));
- process_aura_damage(m_ptr, touched_ptr, (bool)touched_ptr->immune_cold, offsetof(monster_race, flags3), offsetof(monster_race, r_flags3), RF3_AURA_COLD,
+ process_aura_damage(m_ptr, touched_ptr, (bool)has_immune_cold(touched_ptr), offsetof(monster_race, flags3), offsetof(monster_race, r_flags3),
+ RF3_AURA_COLD,
cold_dam,
_("突然とても寒くなった!", "You are suddenly very cold!"));
process_aura_damage(m_ptr, touched_ptr, (bool)has_immune_elec(touched_ptr), offsetof(monster_race, flags2), offsetof(monster_race, r_flags2),
has_curses(creature_ptr);
creature_ptr->impact = has_impact(creature_ptr);
has_extra_blow(creature_ptr);
- creature_ptr->immune_cold = has_immune_cold(creature_ptr);
creature_ptr->resist_acid = has_resist_acid(creature_ptr);
creature_ptr->resist_elec = has_resist_elec(creature_ptr);
creature_ptr->resist_fire = has_resist_fire(creature_ptr);
bool is_fired;
bool level_up_message;
- BIT_FLAGS immune_cold; /* Immunity to cold */
-
BIT_FLAGS resist_acid; /* Resist acid */
BIT_FLAGS resist_elec; /* Resist lightning */
BIT_FLAGS resist_fire; /* Resist fire */
if (!(attacker_ptr->resist_fire || is_oppose_fire(attacker_ptr) || has_immune_fire(attacker_ptr)) && (*magnification < 25))
*magnification = 25;
- if (!(attacker_ptr->resist_cold || is_oppose_cold(attacker_ptr) || attacker_ptr->immune_cold) && (*magnification < 25))
+ if (!(attacker_ptr->resist_cold || is_oppose_cold(attacker_ptr) || has_immune_cold(attacker_ptr)) && (*magnification < 25))
*magnification = 25;
if (!(attacker_ptr->resist_pois || is_oppose_pois(attacker_ptr)) && (*magnification < 25))