From 1194ffbc76eea12ef6dc3ce5393856ad7880c197 Mon Sep 17 00:00:00 2001 From: Habu Date: Thu, 12 Aug 2021 13:10:27 +0900 Subject: [PATCH] =?utf8?q?[Fix]=20HP=E3=81=8C=E5=86=8D=E8=A8=88=E7=AE=97?= =?utf8?q?=E3=81=95=E3=82=8C=E3=81=9F=E6=99=82=E3=81=AB=E4=BD=93=E5=8A=9B?= =?utf8?q?=E3=83=A9=E3=83=B3=E3=82=AF=E3=82=92=E4=B8=8D=E6=98=8E=E3=81=AB?= =?utf8?q?=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit リファクタリングの結果、体力ランクが既知の状態でシャッフルの魔法や 新生の薬等でHPが再計算された時、再計算後もoptions引数の条件により 体力ランクが既知のままとなっている模様。 不自然なので、HP再計算時には必ず体力ランクの既知フラグをリセットする。 --- src/spell/spells-status.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/spell/spells-status.cpp b/src/spell/spells-status.cpp index 9ec273617..e00e626d3 100644 --- a/src/spell/spells-status.cpp +++ b/src/spell/spells-status.cpp @@ -244,6 +244,8 @@ void roll_hitdice(player_type *creature_ptr, spell_operation options) break; } + creature_ptr->knowledge &= ~(KNOW_HPRATE); + PERCENTAGE percent = (int)(((long)creature_ptr->player_hp[PY_MAX_LEVEL - 1] * 200L) / (2 * creature_ptr->hitdie + ((PY_MAX_LEVEL - 1 + 3) * (creature_ptr->hitdie + 1)))); @@ -265,7 +267,6 @@ void roll_hitdice(player_type *creature_ptr, spell_operation options) } msg_print(_("体力ランクが変わった。", "Life rate has changed.")); - creature_ptr->knowledge &= ~(KNOW_HPRATE); } bool life_stream(player_type *creature_ptr, bool message, bool virtue_change) -- 2.11.0