#include "grid/feature.h"
#include "grid/grid.h"
#include "player/player-move.h"
+#include "player/player-status-flags.h"
#include "system/floor-type-definition.h"
#include "target/grid-selector.h"
#include "view/display-messages.h"
}
if (damage) {
- if (creature_ptr->resist_elec)
+ if (has_resist_elec(creature_ptr))
damage = damage / 3;
if (is_oppose_elec(creature_ptr))
damage = damage / 3;
damage = r_info[creature_ptr->current_floor_ptr->m_list[creature_ptr->riding].r_idx].level / 2;
if (is_specific_player_race(creature_ptr, RACE_ANDROID))
damage += damage / 3;
- if (creature_ptr->resist_elec)
+ if (has_resist_elec(creature_ptr))
damage = damage / 3;
if (is_oppose_elec(creature_ptr))
damage = damage / 3;
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))
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))
if (has_immune_elec(creature_ptr)) {
self_ptr->info[self_ptr->line++] = _("あなたは電撃に対する完全なる免疫を持っている。", "You are completely immune to lightning.");
- } else if (creature_ptr->resist_elec && is_oppose_elec(creature_ptr)) {
+ } else if (has_resist_elec(creature_ptr) && is_oppose_elec(creature_ptr)) {
self_ptr->info[self_ptr->line++] = _("あなたは電撃への強力な耐性を持っている。", "You resist lightning exceptionally well.");
- } else if (creature_ptr->resist_elec || is_oppose_elec(creature_ptr)) {
+ } else if (has_resist_elec(creature_ptr) || is_oppose_elec(creature_ptr)) {
self_ptr->info[self_ptr->line++] = _("あなたは電撃への耐性を持っている。", "You are resistant to lightning.");
}
if (is_specific_player_race(creature_ptr, RACE_ANDROID) && !has_immune_elec(creature_ptr)) {
}
if (aura || !check_multishadow(creature_ptr)) {
- if ((!(double_resist || creature_ptr->resist_elec)) && one_in_(HURT_CHANCE))
+ if ((!(double_resist || has_resist_elec(creature_ptr))) && one_in_(HURT_CHANCE))
(void)do_dec_stat(creature_ptr, A_DEX);
}
HIT_POINT get_damage = take_hit(creature_ptr, aura ? DAMAGE_NOESCAPE : DAMAGE_ATTACK, dam, kb_str, monspell);
- if (!aura && !(double_resist && creature_ptr->resist_elec))
+ if (!aura && !(double_resist && has_resist_elec(creature_ptr)))
inventory_damage(creature_ptr, set_elec_destroy, inv);
return get_damage;
}
}
- if (creature_ptr->resist_elec)
+ if (has_resist_elec(creature_ptr))
per = (per + 2) / 3;
if (is_oppose_elec(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_elec = has_resist_elec(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);
bool is_fired;
bool level_up_message;
- BIT_FLAGS resist_elec; /* Resist lightning */
BIT_FLAGS resist_cold; /* Resist cold */
BIT_FLAGS resist_pois; /* Resist poison */
if (!(has_resist_acid(attacker_ptr) || is_oppose_acid(attacker_ptr) || has_immune_acid(attacker_ptr)) && (*magnification < 25))
*magnification = 25;
- if (!(attacker_ptr->resist_elec || is_oppose_elec(attacker_ptr) || has_immune_elec(attacker_ptr)) && (*magnification < 25))
+ if (!(has_resist_elec(attacker_ptr) || is_oppose_elec(attacker_ptr) || has_immune_elec(attacker_ptr)) && (*magnification < 25))
*magnification = 25;
if (!(has_resist_fire(attacker_ptr) || is_oppose_fire(attacker_ptr) || has_immune_fire(attacker_ptr)) && (*magnification < 25))