OSDN Git Service

[Refactor] #40514 player_type の resist_nexus 変数を廃止. / Abolished resist_nexus variable...
authordeskull <deskull@users.sourceforge.jp>
Mon, 11 Jan 2021 04:37:54 +0000 (13:37 +0900)
committerdeskull <deskull@users.sourceforge.jp>
Mon, 11 Jan 2021 04:37:54 +0000 (13:37 +0900)
src/effect/effect-player-resist-hurt.c
src/monster/monster-update.c
src/mspell/high-resistance-checker.c
src/mspell/mspell-floor.c
src/mutation/mutation-processor.c
src/player-info/resistance-info.c
src/player/player-status.c
src/player/player-status.h

index 9b2315a..d65a0f9 100644 (file)
@@ -293,7 +293,7 @@ void effect_player_nexus(player_type *target_ptr, effect_player_type *ep_ptr)
 
     ep_ptr->dam = ep_ptr->dam * calc_nexus_damage_rate(target_ptr, CALC_RAND) / 100;
 
-    if (!target_ptr->resist_nexus && !check_multishadow(target_ptr)) {
+    if (!has_resist_nexus(target_ptr) && !check_multishadow(target_ptr)) {
         apply_nexus(ep_ptr->m_ptr, target_ptr);
     }
 
index ae0f181..2f9b86b 100644 (file)
@@ -631,7 +631,7 @@ void update_smart_learn(player_type *player_ptr, MONSTER_IDX m_idx, int what)
 
         break;
     case DRS_NEXUS:
-        if (player_ptr->resist_nexus)
+        if (has_resist_nexus(player_ptr))
             m_ptr->smart |= SM_RES_NEXUS;
 
         break;
index 2e6570a..9354831 100644 (file)
@@ -33,7 +33,7 @@ void add_cheat_remove_flags_others(player_type *target_ptr, msr_type *msr_ptr)
     if (target_ptr->resist_blind)
         msr_ptr->smart |= SM_RES_BLIND;
 
-    if (target_ptr->resist_nexus)
+    if (has_resist_nexus(target_ptr))
         msr_ptr->smart |= SM_RES_NEXUS;
 
     if (has_resist_sound(target_ptr))
index aa344e9..bb288ca 100644 (file)
@@ -281,7 +281,7 @@ void spell_RF6_TELE_LEVEL(player_type *target_ptr, MONSTER_IDX m_idx, MONSTER_ID
     bool resist, saving_throw;
 
     if (TARGET_TYPE == MONSTER_TO_PLAYER) {
-        resist = (target_ptr->resist_nexus != 0);
+        resist = (has_resist_nexus(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 strangely."),
             _("%^sがあなたの足を指さした。", "%^s gestures at your feet."), _("しかし効果がなかった!", "You are unaffected!"),
index 059e3f9..934761f 100644 (file)
@@ -128,7 +128,7 @@ void process_world_aux_mutation(player_type *creature_ptr)
     }
 
     if ((creature_ptr->muta2 & MUT2_RTELEPORT) && (randint1(5000) == 88)) {
-        if (!creature_ptr->resist_nexus && !(creature_ptr->muta1 & MUT1_VTELEPORT) && !creature_ptr->anti_tele) {
+        if (!has_resist_nexus(creature_ptr) && !(creature_ptr->muta1 & MUT1_VTELEPORT) && !creature_ptr->anti_tele) {
             disturb(creature_ptr, FALSE, TRUE);
             msg_print(_("あなたの位置は突然ひじょうに不確定になった...", "Your position suddenly seems very uncertain..."));
             msg_print(NULL);
index 3abd611..6e59cd5 100644 (file)
@@ -81,7 +81,7 @@ void set_high_resistance_info(player_type *creature_ptr, self_info_type *self_pt
     if (has_resist_shard(creature_ptr))
         self_ptr->info[self_ptr->line++] = _("あなたは破片の攻撃への耐性を持っている。", "You are resistant to blasts of shards.");
     
-    if (creature_ptr->resist_nexus)
+    if (has_resist_nexus(creature_ptr))
         self_ptr->info[self_ptr->line++] = _("あなたは因果混乱の攻撃への耐性を持っている。", "You are resistant to nexus attacks.");
 
     if (is_specific_player_race(creature_ptr, RACE_SPECTRE))
index 598c831..7608bec 100644 (file)
@@ -394,7 +394,6 @@ void calc_bonuses(player_type *creature_ptr)
     has_curses(creature_ptr);
     creature_ptr->impact = has_impact(creature_ptr);
     has_extra_blow(creature_ptr);
-    creature_ptr->resist_nexus = has_resist_nexus(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);
index fb76443..c1c1881 100644 (file)
@@ -366,7 +366,6 @@ typedef struct player_type {
     bool is_fired;
     bool level_up_message;
 
-    BIT_FLAGS resist_nexus; /* Resist nexus */
     BIT_FLAGS resist_blind; /* Resist blindness */
     BIT_FLAGS resist_neth; /* Resist nether */
     BIT_FLAGS resist_fear; /* Resist fear */