From 778462e4adb2d68bbbb44997da57feff4251f6ff Mon Sep 17 00:00:00 2001 From: deskull Date: Mon, 22 Apr 2019 23:48:17 +0900 Subject: [PATCH] =?utf8?q?[Refactor]=20#38844=20monk=5Farmour=5Faux=20?= =?utf8?q?=E3=81=A8=20monk=5Fnotify=5Faux=20=E3=83=95=E3=83=A9=E3=82=B0?= =?utf8?q?=E3=82=92=20player=5Ftype=20=E6=A7=8B=E9=80=A0=E4=BD=93=E3=81=AB?= =?utf8?q?=E7=A7=BB=E5=8B=95=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/player-status.c | 14 +++++--------- src/types.h | 3 +++ 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/src/player-status.c b/src/player-status.c index b930f542f..3fcbf1d1d 100644 --- a/src/player-status.c +++ b/src/player-status.c @@ -21,11 +21,6 @@ #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++) diff --git a/src/types.h b/src/types.h index 74ad2f000..fac24cf64 100644 --- a/src/types.h +++ b/src/types.h @@ -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- */ -- 2.11.0