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.
This commit is contained in:
PatR
2021-12-08 15:31:06 -08:00
parent 49f21769da
commit 5ce53f4d17
2 changed files with 5 additions and 1 deletions

View 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);
}