From: PatR Date: Wed, 8 Dec 2021 23:31:06 +0000 (-0800) Subject: shape change while strangling X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5ce53f4d173de546fe0f1fcbee6fdcffb56f4ce9;p=nethack shape change while strangling Polymorphing into a vulnerable form while wearing an amulet of strangulation says "your amulet still constricts your neck" if your previous form was also vulnerable or "your amulet beings constricting your neck" if previous form wasn't vulnerable. But a change nearly 6 years ago to have the status line be updated to say "Strangling" during the message--instead of next status update after it--caused the "still constricts" variation to always be given even when the "begins constricting" was appropriate. --- diff --git a/doc/fixes37.0 b/doc/fixes37.0 index 634226e7e..ec27be6e5 100644 --- a/doc/fixes37.0 +++ b/doc/fixes37.0 @@ -708,6 +708,8 @@ when filling a special room with monsters, if one that can come in groups got extend 3.6.1 fix to explicitly use name of unseen shopkeeper instead of "It" in various shop related messages (ones issued outside of shk.c) fix some inconsistencies with applied bullwhip vs monster +polymorphing while wearing an amulet of strangulation from a form that wasn't + vulnerable to one that was gave wrong message ("still constricts") Fixes to 3.7.0-x Problems that Were Exposed Via git Repository diff --git a/src/polyself.c b/src/polyself.c index a09e755f3..e3c8925b0 100644 --- a/src/polyself.c +++ b/src/polyself.c @@ -141,6 +141,8 @@ check_strangling(boolean on) { /* on -- maybe resume strangling */ if (on) { + boolean was_strangled = (Strangled != 0L); + /* when Strangled is already set, polymorphing from one vulnerable form into another causes the counter to be reset */ if (uamul && uamul->otyp == AMULET_OF_STRANGULATION @@ -148,7 +150,7 @@ check_strangling(boolean on) Strangled = 6L; g.context.botl = TRUE; Your("%s %s your %s!", simpleonames(uamul), - Strangled ? "still constricts" : "begins constricting", + was_strangled ? "still constricts" : "begins constricting", body_part(NECK)); /* "throat" */ makeknown(AMULET_OF_STRANGULATION); }