}
case SV_FOOD_BLINDNESS: {
- if (!creature_ptr->resist_blind) {
+ if (!has_resist_blind(creature_ptr)) {
if (set_blind(creature_ptr, creature_ptr->blind + randint0(200) + 200)) {
ident = TRUE;
}
/* Analyze the staff */
switch (sval) {
case SV_STAFF_DARKNESS: {
- if (!(creature_ptr->resist_blind) && !has_resist_dark(creature_ptr)) {
+ if (!has_resist_blind(creature_ptr) && !has_resist_dark(creature_ptr)) {
if (set_blind(creature_ptr, creature_ptr->blind + 3 + randint1(5)))
ident = TRUE;
}
{
if (target_ptr->blind)
msg_print(_("何かで攻撃された!", "You are hit by something!"));
- if (!target_ptr->blind && !has_resist_lite(target_ptr) && !target_ptr->resist_blind && !check_multishadow(target_ptr)) {
+ if (!target_ptr->blind && !has_resist_lite(target_ptr) && !has_resist_blind(target_ptr) && !check_multishadow(target_ptr)) {
(void)set_blind(target_ptr, target_ptr->blind + randint1(5) + 2);
}
ep_ptr->dam = ep_ptr->dam * calc_dark_damage_rate(target_ptr, CALC_RAND) / 100;
- if (!target_ptr->blind && !has_resist_dark(target_ptr) && !target_ptr->resist_blind && !check_multishadow(target_ptr)) {
+ if (!target_ptr->blind && !has_resist_dark(target_ptr) && !has_resist_blind(target_ptr) && !check_multishadow(target_ptr)) {
(void)set_blind(target_ptr, target_ptr->blind + randint1(5) + 2);
}
if (check_multishadow(target_ptr))
return;
- if (!target_ptr->resist_blind) {
+ if (!has_resist_blind(target_ptr)) {
(void)set_blind(target_ptr, target_ptr->blind + 8 + randint0(8));
}
}
case TRAP_BLIND: {
- hit_trap_set_abnormal_status_p(trapped_ptr, _("黒いガスに包み込まれた!", "A black gas surrounds you!"), (bool)trapped_ptr->resist_blind, set_blind,
+ hit_trap_set_abnormal_status_p(trapped_ptr, _("黒いガスに包み込まれた!", "A black gas surrounds you!"), (bool)has_resist_blind(trapped_ptr), set_blind,
trapped_ptr->blind + (TIME_EFFECT)randint0(50) + 25);
break;
}
void process_blind_attack(player_type *target_ptr, monap_type *monap_ptr)
{
- if (target_ptr->resist_blind || check_multishadow(target_ptr))
+ if (has_resist_blind(target_ptr) || check_multishadow(target_ptr))
return;
if (!set_blind(target_ptr, target_ptr->blind + 10 + randint1(monap_ptr->rlev)))
break;
case DRS_BLIND:
- if (player_ptr->resist_blind)
+ if (has_resist_blind(player_ptr))
m_ptr->smart |= SM_RES_BLIND;
break;
if (has_resist_disen(target_ptr))
msr_ptr->smart |= SM_RES_DISEN;
- if (target_ptr->resist_blind)
+ if (has_resist_blind(target_ptr))
msr_ptr->smart |= SM_RES_BLIND;
if (has_resist_nexus(target_ptr))
#include "mspell/mspell-type.h"
#include "mspell/mspell-util.h"
#include "player/player-personalities-types.h"
+#include "player/player-status-flags.h"
#include "spell-kind/spells-lite.h"
#include "spell-kind/spells-neighbor.h"
#include "spell-kind/spells-sight.h"
bool resist, saving_throw;
if (TARGET_TYPE == MONSTER_TO_PLAYER) {
- resist = (target_ptr->resist_blind != 0);
+ resist = (has_resist_blind(target_ptr) != 0);
saving_throw = (randint0(100 + rlev / 2) < target_ptr->skill_sav);
spell_badstatus_message(target_ptr, m_idx, t_idx, _("%^sが何かをつぶやいた。", "%^s mumbles."),
_("%^sが呪文を唱えてあなたの目をくらました!", "%^s casts a spell, burning your eyes!"), _("しかし効果がなかった!", "You are unaffected!"),
break;
case SV_POTION_BLINDNESS:
- if (!creature_ptr->resist_blind) {
+ if (!has_resist_blind(creature_ptr)) {
if (set_blind(creature_ptr, creature_ptr->blind + randint0(100) + 100)) {
ident = TRUE;
}
if (o_ptr->tval == TV_SCROLL) {
switch (o_ptr->sval) {
case SV_SCROLL_DARKNESS: {
- if (!(creature_ptr->resist_blind) && !has_resist_dark(creature_ptr))
+ if (!has_resist_blind(creature_ptr) && !has_resist_dark(creature_ptr))
(void)set_blind(creature_ptr, creature_ptr->blind + 3 + randint1(5));
if (unlite_area(creature_ptr, 10, 3))
#include "player-info/body-improvement-info.h"
#include "player-info/self-info-util.h"
+#include "player/player-status-flags.h"
/* todo 並び順の都合で連番を付ける。まとめても良いならまとめてしまう予定 */
void set_body_improvement_info_1(player_type *creature_ptr, self_info_type *self_ptr)
if (creature_ptr->resist_fear)
self_ptr->info[self_ptr->line++] = _("あなたは全く恐怖を感じない。", "You are completely fearless.");
- if (creature_ptr->resist_blind)
+ if (has_resist_blind(creature_ptr))
self_ptr->info[self_ptr->line++] = _("あなたの目は盲目への耐性を持っている。", "Your eyes are resistant to blindness.");
if (creature_ptr->resist_time)
return TRUE;
break;
case TRAP_BLIND:
- if (creature_ptr->resist_blind)
+ if (has_resist_blind(creature_ptr))
return TRUE;
break;
case TRAP_CONFUSE:
has_curses(creature_ptr);
creature_ptr->impact = has_impact(creature_ptr);
has_extra_blow(creature_ptr);
- creature_ptr->resist_blind = has_resist_blind(creature_ptr);
creature_ptr->resist_neth = has_resist_neth(creature_ptr);
creature_ptr->resist_time = has_resist_time(creature_ptr);
creature_ptr->resist_fear = has_resist_fear(creature_ptr);
bool is_fired;
bool level_up_message;
- BIT_FLAGS resist_blind; /* Resist blindness */
BIT_FLAGS resist_neth; /* Resist nether */
BIT_FLAGS resist_fear; /* Resist fear */
BIT_FLAGS resist_time; /* Resist time */
msg_print(_("燃えるような閃光が発生した!", "There is a searing blast of light!"));
/* Blind the player */
- if (!caster_ptr->resist_blind && !has_resist_lite(caster_ptr)) {
+ if (!has_resist_blind(caster_ptr) && !has_resist_lite(caster_ptr)) {
/* Become blind */
(void)set_blind(caster_ptr, caster_ptr->blind + 10 + randint1(10));
}