OSDN Git Service

[Refactor] #40514 player_type の sh_cold 変数を廃止. / Abolished sh_cold variable in player...
authordeskull <deskull@users.sourceforge.jp>
Mon, 11 Jan 2021 05:09:28 +0000 (14:09 +0900)
committerdeskull <deskull@users.sourceforge.jp>
Mon, 11 Jan 2021 05:09:28 +0000 (14:09 +0900)
src/combat/aura-counterattack.c
src/player-info/body-improvement-info.c
src/player/player-status.c
src/player/player-status.h

index 53c1fc5..d2772d8 100644 (file)
@@ -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];
index 4a5e41e..31f8c00 100644 (file)
@@ -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)
index d8b4836..8f73bcb 100644 (file)
@@ -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);
index fae5918..84af4cc 100644 (file)
@@ -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 */