From 2cabaffaab085e0f10158510144d3f5f8a587692 Mon Sep 17 00:00:00 2001 From: deskull Date: Mon, 11 Jan 2021 14:09:28 +0900 Subject: [PATCH 1/1] =?utf8?q?[Refactor]=20#40514=20player=5Ftype=20?= =?utf8?q?=E3=81=AE=20sh=5Fcold=20=E5=A4=89=E6=95=B0=E3=82=92=E5=BB=83?= =?utf8?q?=E6=AD=A2.=20/=20Abolished=20sh=5Fcold=20variable=20in=20player?= =?utf8?q?=5Ftype.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/combat/aura-counterattack.c | 2 +- src/player-info/body-improvement-info.c | 2 +- src/player/player-status.c | 1 - src/player/player-status.h | 1 - 4 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/combat/aura-counterattack.c b/src/combat/aura-counterattack.c index 53c1fc544..d2772d863 100644 --- a/src/combat/aura-counterattack.c +++ b/src/combat/aura-counterattack.c @@ -71,7 +71,7 @@ static void aura_elec_by_monster_attack(player_type *target_ptr, monap_type *mon static void aura_cold_by_monster_attack(player_type *target_ptr, monap_type *monap_ptr) { - if (!target_ptr->sh_cold || !monap_ptr->alive || target_ptr->is_dead) + if (!has_sh_cold(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 4a5e41ec8..31f8c00e5 100644 --- a/src/player-info/body-improvement-info.c +++ b/src/player-info/body-improvement-info.c @@ -73,7 +73,7 @@ void set_body_improvement_info_3(player_type *creature_ptr, self_info_type *self if (creature_ptr->sh_elec) self_ptr->info[self_ptr->line++] = _("あなたは電気に包まれている。", "You are surrounded with electricity."); - if (creature_ptr->sh_cold) + if (has_sh_cold(creature_ptr)) self_ptr->info[self_ptr->line++] = _("あなたは冷気のオーラに包まれている。", "You are surrounded with an aura of coldness."); if (creature_ptr->tim_sh_holy) diff --git a/src/player/player-status.c b/src/player/player-status.c index d8b483641..8f73bcbf0 100644 --- a/src/player/player-status.c +++ b/src/player/player-status.c @@ -373,7 +373,6 @@ void calc_bonuses(player_type *creature_ptr) creature_ptr->anti_magic = has_anti_magic(creature_ptr); creature_ptr->anti_tele = has_anti_tele(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); creature_ptr->heavy_spell = has_heavy_spell(creature_ptr); creature_ptr->hold_exp = has_hold_exp(creature_ptr); diff --git a/src/player/player-status.h b/src/player/player-status.h index fae591823..84af4cc75 100644 --- a/src/player/player-status.h +++ b/src/player/player-status.h @@ -367,7 +367,6 @@ typedef struct player_type { bool level_up_message; BIT_FLAGS sh_elec; /* Electric 'immolation' effect */ - BIT_FLAGS sh_cold; /* Cold 'immolation' effect */ BIT_FLAGS anti_magic; /* Anti-magic */ BIT_FLAGS anti_tele; /* Prevent teleportation */ -- 2.11.0