OSDN Git Service

[Refactor] #40514 player_type の sustain_dex 変数を廃止. / Abolished sustain_dex variable...
authordeskull <deskull@users.sourceforge.jp>
Mon, 11 Jan 2021 05:27:39 +0000 (14:27 +0900)
committerdeskull <deskull@users.sourceforge.jp>
Mon, 11 Jan 2021 05:27:39 +0000 (14:27 +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/base-status.c

index 2051b1a..366939f 100644 (file)
@@ -332,7 +332,7 @@ void process_world_aux_mutation(player_type *creature_ptr)
                 sustained = TRUE;
             break;
         case A_DEX:
-            if (creature_ptr->sustain_dex)
+            if (has_sustain_dex(creature_ptr))
                 sustained = TRUE;
             break;
         case A_CON:
index ee0f964..9c31b7e 100644 (file)
@@ -70,7 +70,7 @@ void set_status_sustain_info(player_type *creature_ptr, self_info_type *self_ptr
     if (creature_ptr->sustain_con) {
         self_ptr->info[self_ptr->line++] = _("あなたの耐久力は維持されている。", "Your constitution is sustained.");
     }
-    if (creature_ptr->sustain_dex) {
+    if (has_sustain_dex (creature_ptr)) {
         self_ptr->info[self_ptr->line++] = _("あなたの器用さは維持されている。", "Your dexterity is sustained.");
     }
     if (creature_ptr->sustain_chr) {
index 3e87416..94095cc 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_dex = has_sustain_dex(creature_ptr);
     creature_ptr->sustain_con = has_sustain_con(creature_ptr);
     creature_ptr->sustain_chr = has_sustain_chr(creature_ptr);
     creature_ptr->levitation = has_levitation(creature_ptr);
index d31ce66..472f781 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_dex; /* Keep dexterity */
     BIT_FLAGS sustain_con; /* Keep constitution */
     BIT_FLAGS sustain_chr; /* Keep charisma */
 
index b731fdb..5d43bf0 100644 (file)
@@ -191,7 +191,7 @@ bool do_dec_stat(player_type *creature_ptr, int stat)
             sust = TRUE;
         break;
     case A_DEX:
-        if (creature_ptr->sustain_dex)
+        if (has_sustain_dex(creature_ptr))
             sust = TRUE;
         break;
     case A_CON: