]> granicus.if.org Git - nethack/commitdiff
B02002 - Monster werechange messages
authorcohrs <cohrs>
Sun, 20 Apr 2003 18:00:12 +0000 (18:00 +0000)
committercohrs <cohrs>
Sun, 20 Apr 2003 18:00:12 +0000 (18:00 +0000)
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.

doc/fixes34.2
src/were.c

index eb8c66d3ab3074b338e3c2b9e13dc8a502e09432..81a19cad480af2ce3e3a182e82755185eeb3566a 100644 (file)
@@ -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
index 933fdde321e07dc121faf571fcb24831d44989b6..0bc9881b9923bf454bf6c0f96f9abaaaf4208a90 100644 (file)
@@ -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);