OSDN Git Service

[Refactor] #40514 player_type の sustain_wis 変数を廃止. / Abolished sustain_wis variable...
authordeskull <deskull@users.sourceforge.jp>
Mon, 11 Jan 2021 05:25:11 +0000 (14:25 +0900)
committerdeskull <deskull@users.sourceforge.jp>
Mon, 11 Jan 2021 05:25:29 +0000 (14:25 +0900)
src/mutation/mutation-processor.c
src/player-info/base-status-info.c
src/player/player-status.c
src/player/player-status.h
src/status/bad-status-setter.c
src/status/base-status.c

index dbc0405..2051b1a 100644 (file)
@@ -328,7 +328,7 @@ void process_world_aux_mutation(player_type *creature_ptr)
                 sustained = TRUE;
             break;
         case A_WIS:
-            if (creature_ptr->sustain_wis)
+            if (has_sustain_wis(creature_ptr))
                 sustained = TRUE;
             break;
         case A_DEX:
index 7e8710f..ee0f964 100644 (file)
@@ -64,7 +64,7 @@ void set_status_sustain_info(player_type *creature_ptr, self_info_type *self_ptr
     if (has_sustain_int(creature_ptr)) {
         self_ptr->info[self_ptr->line++] = _("あなたの知能は維持されている。", "Your intelligence is sustained.");
     }
-    if (creature_ptr->sustain_wis) {
+    if (has_sustain_wis(creature_ptr)) {
         self_ptr->info[self_ptr->line++] = _("あなたの賢さは維持されている。", "Your wisdom is sustained.");
     }
     if (creature_ptr->sustain_con) {
index be7c2f8..3e87416 100644 (file)
@@ -377,7 +377,6 @@ void calc_bonuses(player_type *creature_ptr)
     creature_ptr->hold_exp = has_hold_exp(creature_ptr);
     creature_ptr->see_inv = has_see_inv(creature_ptr);
     creature_ptr->free_act = has_free_act(creature_ptr);
-    creature_ptr->sustain_wis = has_sustain_wis(creature_ptr);
     creature_ptr->sustain_dex = has_sustain_dex(creature_ptr);
     creature_ptr->sustain_con = has_sustain_con(creature_ptr);
     creature_ptr->sustain_chr = has_sustain_chr(creature_ptr);
index b04c6bc..d31ce66 100644 (file)
@@ -369,7 +369,6 @@ typedef struct player_type {
     BIT_FLAGS anti_magic; /* Anti-magic */
     BIT_FLAGS anti_tele; /* Prevent teleportation */
 
-    BIT_FLAGS sustain_wis; /* Keep wisdom */
     BIT_FLAGS sustain_dex; /* Keep dexterity */
     BIT_FLAGS sustain_con; /* Keep constitution */
     BIT_FLAGS sustain_chr; /* Keep charisma */
index 4081e4e..8cb15c8 100644 (file)
@@ -422,13 +422,13 @@ bool set_stun(player_type *creature_ptr, TIME_EFFECT v)
             if (one_in_(3)) {
                 if (!has_sustain_int(creature_ptr))
                     (void)do_dec_stat(creature_ptr, A_INT);
-                if (!creature_ptr->sustain_wis)
+                if (!has_sustain_wis(creature_ptr))
                     (void)do_dec_stat(creature_ptr, A_WIS);
             } else if (one_in_(2)) {
                 if (!has_sustain_int(creature_ptr))
                     (void)do_dec_stat(creature_ptr, A_INT);
             } else {
-                if (!creature_ptr->sustain_wis)
+                if (!has_sustain_wis(creature_ptr))
                     (void)do_dec_stat(creature_ptr, A_WIS);
             }
         }
index c91e33e..b731fdb 100644 (file)
@@ -187,7 +187,7 @@ bool do_dec_stat(player_type *creature_ptr, int stat)
             sust = TRUE;
         break;
     case A_WIS:
-        if (creature_ptr->sustain_wis)
+        if (has_sustain_wis(creature_ptr))
             sust = TRUE;
         break;
     case A_DEX: