OSDN Git Service

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

index b2f8b02..b8f47c4 100644 (file)
@@ -340,7 +340,7 @@ void process_world_aux_mutation(player_type *creature_ptr)
                 sustained = TRUE;
             break;
         case A_CHR:
-            if (creature_ptr->sustain_chr)
+            if (has_sustain_chr(creature_ptr))
                 sustained = TRUE;
             break;
         default:
index d6e0e4a..925a064 100644 (file)
@@ -70,10 +70,10 @@ void set_status_sustain_info(player_type *creature_ptr, self_info_type *self_ptr
     if (has_sustain_con(creature_ptr)) {
         self_ptr->info[self_ptr->line++] = _("あなたの耐久力は維持されている。", "Your constitution is sustained.");
     }
-    if (has_sustain_dex (creature_ptr)) {
+    if (has_sustain_dex(creature_ptr)) {
         self_ptr->info[self_ptr->line++] = _("あなたの器用さは維持されている。", "Your dexterity is sustained.");
     }
-    if (creature_ptr->sustain_chr) {
+    if (has_sustain_chr(creature_ptr)) {
         self_ptr->info[self_ptr->line++] = _("あなたの魅力は維持されている。", "Your charisma is sustained.");
     }
 }
index 3ebeac0..255cccd 100644 (file)
@@ -369,8 +369,6 @@ typedef struct player_type {
     BIT_FLAGS anti_magic; /* Anti-magic */
     BIT_FLAGS anti_tele; /* Prevent teleportation */
 
-    BIT_FLAGS sustain_chr; /* Keep charisma */
-
     BIT_FLAGS cursed; /* Player is cursed */
 
     bool can_swim; /* No damage falling */
index 8cb15c8..7fc2b3f 100644 (file)
@@ -555,7 +555,7 @@ bool set_cut(player_type *creature_ptr, TIME_EFFECT v)
 
         notice = TRUE;
         if (randint1(1000) < v || one_in_(16)) {
-            if (!creature_ptr->sustain_chr) {
+            if (!has_sustain_chr(creature_ptr)) {
                 msg_print(_("ひどい傷跡が残ってしまった。", "You have been horribly scarred."));
                 do_dec_stat(creature_ptr, A_CHR);
             }
index a32f1b1..e40d658 100644 (file)
@@ -199,7 +199,7 @@ bool do_dec_stat(player_type *creature_ptr, int stat)
             sust = TRUE;
         break;
     case A_CHR:
-        if (creature_ptr->sustain_chr)
+        if (has_sustain_chr(creature_ptr))
             sust = TRUE;
         break;
     }