]> granicus.if.org Git - nethack/commitdiff
shape change while strangling
authorPatR <rankin@nethack.org>
Wed, 8 Dec 2021 23:31:06 +0000 (15:31 -0800)
committerPatR <rankin@nethack.org>
Wed, 8 Dec 2021 23:31:06 +0000 (15:31 -0800)
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.

doc/fixes37.0
src/polyself.c

index 634226e7eb8773f1fa333e1828495dba72bc61ca..ec27be6e516f6163ef49a7dca53f07ae67f612e5 100644 (file)
@@ -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
index a09e755f32c303a4a87e5f2c9d2c605cac908a34..e3c8925b052238c04399e0ae73f0de316b12a6d9 100644 (file)
@@ -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);
         }