OSDN Git Service

[Refactor] #38844 monk_armour_aux と monk_notify_aux フラグを player_type 構造体に移動。
authordeskull <deskull@users.sourceforge.jp>
Mon, 22 Apr 2019 14:48:17 +0000 (23:48 +0900)
committerdeskull <deskull@users.sourceforge.jp>
Mon, 22 Apr 2019 14:48:44 +0000 (23:48 +0900)
src/player-status.c
src/types.h

index b930f54..3fcbf1d 100644 (file)
 #include "cmd-spell.h"
 #include "player-effects.h"
 
-/* Hack, monk armour */
-static bool monk_armour_aux;
-static bool monk_notify_aux;
-
-
 /*!
  * @var horror_desc
  * @brief ELDRITCH HORROR効果時のモンスターの形容メッセージ(通常時)
@@ -378,6 +373,7 @@ void calc_bonuses(void)
        bool omoi = FALSE;
        bool yoiyami = FALSE;
        bool down_saving = FALSE;
+
 #if 0
        bool have_dd_s = FALSE, have_dd_t = FALSE;
 #endif
@@ -2576,11 +2572,11 @@ void calc_bonuses(void)
 
        if (p_ptr->riding) p_ptr->levitation = riding_levitation;
 
-       monk_armour_aux = FALSE;
+       p_ptr->monk_armour_aux = FALSE;
 
        if (heavy_armor())
        {
-               monk_armour_aux = TRUE;
+               p_ptr->monk_armour_aux = TRUE;
        }
 
        for (i = 0; i < 2; i++)
@@ -2850,7 +2846,7 @@ void calc_bonuses(void)
                p_ptr->old_riding_ryoute = p_ptr->riding_ryoute;
        }
 
-       if (((p_ptr->pclass == CLASS_MONK) || (p_ptr->pclass == CLASS_FORCETRAINER) || (p_ptr->pclass == CLASS_NINJA)) && (monk_armour_aux != monk_notify_aux))
+       if (((p_ptr->pclass == CLASS_MONK) || (p_ptr->pclass == CLASS_FORCETRAINER) || (p_ptr->pclass == CLASS_NINJA)) && (p_ptr->monk_armour_aux != p_ptr->monk_notify_aux))
        {
                if (heavy_armor())
                {
@@ -2865,7 +2861,7 @@ void calc_bonuses(void)
                        msg_print(_("バランスがとれるようになった。", "You regain your balance."));
                }
 
-               monk_notify_aux = monk_armour_aux;
+               p_ptr->monk_notify_aux = p_ptr->monk_armour_aux;
        }
 
        for (i = 0; i < INVEN_PACK; i++)
index 74ad2f0..fac24cf 100644 (file)
@@ -1662,6 +1662,9 @@ struct player_type
        bool playing;                   /* True if player is playing */
        bool leaving;                   /* True if player is leaving */
 
+       bool monk_armour_aux;
+       bool monk_notify_aux;
+
        byte leave_bldg;
        byte exit_bldg;                 /* Goal obtained in arena? -KMW- */