OSDN Git Service

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

index 64416e1..53c1fc5 100644 (file)
@@ -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];
index 428dbfb..4a5e41e 100644 (file)
@@ -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)
index 1141c6a..d8b4836 100644 (file)
@@ -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);
index dd372fd..fae5918 100644 (file)
@@ -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 */