From: cohrs Date: Sun, 20 Apr 2003 18:00:12 +0000 (+0000) Subject: B02002 - Monster werechange messages X-Git-Tag: MOVE2GIT~2027 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=cb56f6fd2dea236f7fb326c2c4418ae744619524;p=nethack B02002 - Monster werechange messages Change the monster constants to match the current position of the switch statement. Also test canseemon(), since the message isn't needed if you see the change. I didn't make any other change to the message frequency. If it's too frequent, then perhaps the changes themselves are too frequent. --- diff --git a/doc/fixes34.2 b/doc/fixes34.2 index eb8c66d3a..81a19cad4 100644 --- a/doc/fixes34.2 +++ b/doc/fixes34.2 @@ -43,6 +43,7 @@ failed attempt to eat floor gold while polymorphed would lose the gold running that stops for closed doors should stop at mimics mimicking closed doors allow wishing for magenta potions (ignoring the rank name 'mage') fix an uninitialized memory access in non-quick dolookup +fix were changing message that wasn't being displayed Platform- and/or Interface-Specific Fixes diff --git a/src/were.c b/src/were.c index 933fdde32..0bc9881b9 100644 --- a/src/were.c +++ b/src/were.c @@ -15,16 +15,16 @@ register struct monst *mon; if (is_human(mon->data)) { if (!Protection_from_shape_changers && - !rn2(night() ? (flags.moonphase == FULL_MOON ? 3 : 30) - : (flags.moonphase == FULL_MOON ? 10 : 50))) { + !rn2(night() ? (flags.moonphase == FULL_MOON ? 3 : 30) + : (flags.moonphase == FULL_MOON ? 10 : 50))) { new_were(mon); /* change into animal form */ - if (flags.soundok) { + if (flags.soundok && !canseemon(mon)) { const char *howler; switch (monsndx(mon->data)) { - case PM_HUMAN_WEREWOLF: howler = "wolf"; break; - case PM_HUMAN_WEREJACKAL: howler = "jackal"; break; - default: howler = (char *)0; break; + case PM_WEREWOLF: howler = "wolf"; break; + case PM_WEREJACKAL: howler = "jackal"; break; + default: howler = (char *)0; break; } if (howler) You_hear("a %s howling at the moon.", howler);