From: deskull Date: Mon, 11 Jan 2021 05:07:40 +0000 (+0900) Subject: [Refactor] #40514 player_type の sh_fire 変数を廃止. / Abolished sh_fire variable in player... X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=aa7682f8b2e4cc6544a362db45a50379c110cf6e;hp=f48cfd17655f13e316439f4b8bc357544c25d551;p=hengband%2Fhengband.git [Refactor] #40514 player_type の sh_fire 変数を廃止. / Abolished sh_fire variable in player_type. --- diff --git a/src/combat/aura-counterattack.c b/src/combat/aura-counterattack.c index 64416e19d..53c1fc544 100644 --- a/src/combat/aura-counterattack.c +++ b/src/combat/aura-counterattack.c @@ -16,6 +16,7 @@ #include "monster/monster-status.h" #include "object-hook/hook-armor.h" #include "object-hook/hook-checker.h" +#include "player/player-status-flags.h" #include "realm/realm-hex-numbers.h" #include "spell-kind/spells-teleport.h" #include "spell-realm/spells-hex.h" @@ -26,7 +27,7 @@ static void aura_fire_by_monster_attack(player_type *target_ptr, monap_type *monap_ptr) { - if (!target_ptr->sh_fire || !monap_ptr->alive || target_ptr->is_dead) + if (!has_sh_fire(target_ptr) || !monap_ptr->alive || target_ptr->is_dead) return; monster_race *r_ptr = &r_info[monap_ptr->m_ptr->r_idx]; diff --git a/src/player-info/body-improvement-info.c b/src/player-info/body-improvement-info.c index 428dbfb5e..4a5e41ec8 100644 --- a/src/player-info/body-improvement-info.c +++ b/src/player-info/body-improvement-info.c @@ -67,7 +67,7 @@ void set_body_improvement_info_3(player_type *creature_ptr, self_info_type *self if (has_reflect(creature_ptr)) self_ptr->info[self_ptr->line++] = _("あなたは矢の呪文を反射する。", "You reflect bolt spells."); - if (creature_ptr->sh_fire) + if (has_sh_fire(creature_ptr)) self_ptr->info[self_ptr->line++] = _("あなたは炎のオーラに包まれている。", "You are surrounded with a fiery aura."); if (creature_ptr->sh_elec) diff --git a/src/player/player-status.c b/src/player/player-status.c index 1141c6a67..d8b483641 100644 --- a/src/player/player-status.c +++ b/src/player/player-status.c @@ -372,7 +372,6 @@ void calc_bonuses(player_type *creature_ptr) creature_ptr->warning = has_warning(creature_ptr); creature_ptr->anti_magic = has_anti_magic(creature_ptr); creature_ptr->anti_tele = has_anti_tele(creature_ptr); - creature_ptr->sh_fire = has_sh_fire(creature_ptr); creature_ptr->sh_elec = has_sh_elec(creature_ptr); creature_ptr->sh_cold = has_sh_cold(creature_ptr); creature_ptr->easy_spell = has_easy_spell(creature_ptr); diff --git a/src/player/player-status.h b/src/player/player-status.h index dd372fd25..fae591823 100644 --- a/src/player/player-status.h +++ b/src/player/player-status.h @@ -366,7 +366,6 @@ typedef struct player_type { bool is_fired; bool level_up_message; - BIT_FLAGS sh_fire; /* Fiery 'immolation' effect */ BIT_FLAGS sh_elec; /* Electric 'immolation' effect */ BIT_FLAGS sh_cold; /* Cold 'immolation' effect */