}
if (damage) {
- if (creature_ptr->resist_cold)
+ if (has_resist_cold(creature_ptr))
damage = damage / 3;
if (is_oppose_cold(creature_ptr))
damage = damage / 3;
}
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)
+ if (has_resist_cold(creature_ptr))
damage = damage / 3;
if (is_oppose_cold(creature_ptr))
damage = damage / 3;
(void)set_stun(target_ptr, target_ptr->stun + randint1(15));
}
- if ((!(target_ptr->resist_cold || is_oppose_cold(target_ptr))) || one_in_(12)) {
+ if ((!(has_resist_cold(target_ptr) || is_oppose_cold(target_ptr))) || one_in_(12)) {
if (!has_immune_cold(target_ptr))
inventory_damage(target_ptr, set_cold_destroy, 3);
}
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))
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))
}
case SV_SCROLL_ICE: {
fire_ball(creature_ptr, GF_ICE, 0, 777, 4);
- if (!(is_oppose_cold(creature_ptr) || creature_ptr->resist_cold || has_immune_cold(creature_ptr)))
+ if (!(is_oppose_cold(creature_ptr) || has_resist_cold(creature_ptr) || has_immune_cold(creature_ptr)))
take_hit(creature_ptr, DAMAGE_NOESCAPE, 100 + randint1(100), _("氷の巻物", "a Scroll of Ice"), -1);
ident = TRUE;
if (has_immune_cold(creature_ptr)) {
self_ptr->info[self_ptr->line++] = _("あなたは冷気に対する完全なる免疫を持っている。", "You are completely immune to cold.");
- } else if (creature_ptr->resist_cold && is_oppose_cold(creature_ptr)) {
+ } else if (has_resist_cold(creature_ptr) && is_oppose_cold(creature_ptr)) {
self_ptr->info[self_ptr->line++] = _("あなたは冷気への強力な耐性を持っている。", "You resist cold exceptionally well.");
- } else if (creature_ptr->resist_cold || is_oppose_cold(creature_ptr)) {
+ } else if (has_resist_cold(creature_ptr) || is_oppose_cold(creature_ptr)) {
self_ptr->info[self_ptr->line++] = _("あなたは冷気への耐性を持っている。", "You are resistant to cold.");
}
dam = dam * calc_cold_damage_rate(creature_ptr) / 100;
if (aura || !check_multishadow(creature_ptr)) {
- if ((!(double_resist || creature_ptr->resist_cold)) && one_in_(HURT_CHANCE))
+ if ((!(double_resist || has_resist_cold(creature_ptr))) && one_in_(HURT_CHANCE))
(void)do_dec_stat(creature_ptr, A_STR);
}
HIT_POINT get_damage = take_hit(creature_ptr, aura ? DAMAGE_NOESCAPE : DAMAGE_ATTACK, dam, kb_str, monspell);
- if (!aura && !(double_resist && creature_ptr->resist_cold))
+ if (!aura && !(double_resist && has_resist_cold(creature_ptr)))
inventory_damage(creature_ptr, set_cold_destroy, inv);
return get_damage;
}
}
- if (creature_ptr->resist_cold)
+ if (has_resist_cold(creature_ptr))
per = (per + 2) / 3;
if (is_oppose_cold(creature_ptr))
per = (per + 2) / 3;
has_curses(creature_ptr);
creature_ptr->impact = has_impact(creature_ptr);
has_extra_blow(creature_ptr);
- creature_ptr->resist_cold = has_resist_cold(creature_ptr);
creature_ptr->resist_pois = has_resist_pois(creature_ptr);
creature_ptr->resist_conf = has_resist_conf(creature_ptr);
creature_ptr->resist_sound = has_resist_sound(creature_ptr);
bool is_fired;
bool level_up_message;
- BIT_FLAGS resist_cold; /* Resist cold */
BIT_FLAGS resist_pois; /* Resist poison */
BIT_FLAGS resist_conf; /* Resist confusion */
if (!(has_resist_fire(attacker_ptr) || is_oppose_fire(attacker_ptr) || has_immune_fire(attacker_ptr)) && (*magnification < 25))
*magnification = 25;
- if (!(attacker_ptr->resist_cold || is_oppose_cold(attacker_ptr) || has_immune_cold(attacker_ptr)) && (*magnification < 25))
+ if (!(has_resist_cold(attacker_ptr) || 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))