]> granicus.if.org Git - nethack/commitdiff
Monsters should growl even if you can't hear it
authorPasi Kallinen <paxed@alt.org>
Thu, 10 Feb 2022 11:41:50 +0000 (13:41 +0200)
committerPasi Kallinen <paxed@alt.org>
Thu, 10 Feb 2022 11:41:53 +0000 (13:41 +0200)
Call growl even if you are deaf, because growling also
wakes up nearby monsters. Just make growl not show the message
if you can't hear or see the monster.

doc/fixes3-7-0.txt
src/mon.c
src/sounds.c

index 3d1353d860a83cfa1aec5f01e3e20fa971cc8014..1e69edf7ab80eefb42aa438f06641b46ad2e85c2 100644 (file)
@@ -774,6 +774,7 @@ magic traps can toggle intrinsic invisibility
 Death attacking a monster does drain life attack
 add unique Rider revival messages
 don't dereference NULL u.ustuck in dobuzz() when hero has been swallowed
+monsters should growl even if you can't hear it
 
 
 Fixes to 3.7.0-x Problems that Were Exposed Via git Repository
index 137cd2ed5c14dcb8fac982685579071fe017ecc6..03f6a763a9733d798244244c6e65d8cba2d3276b 100644 (file)
--- a/src/mon.c
+++ b/src/mon.c
@@ -3509,11 +3509,11 @@ setmangry(struct monst* mtmp, boolean via_attack)
             adjalign(2);
     } else
         adjalign(-1); /* attacking peaceful monsters is bad */
-    if (couldsee(mtmp->mx, mtmp->my)) {
-        if (humanoid(mtmp->data) || mtmp->isshk || mtmp->isgd)
+    if (humanoid(mtmp->data) || mtmp->isshk || mtmp->isgd) {
+        if (couldsee(mtmp->mx, mtmp->my))
             pline("%s gets angry!", Monnam(mtmp));
-        else if (flags.verbose && !Deaf)
-            growl(mtmp);
+    } else {
+        growl(mtmp);
     }
 
     /* attacking your own quest leader will anger his or her guardians */
@@ -3613,7 +3613,7 @@ setmangry(struct monst* mtmp, boolean via_attack)
                 } else if (mon->data->mlet == mtmp->data->mlet
                            && big_little_match(mndx, monsndx(mon->data))
                            && !rn2(3)) {
-                    if (!Deaf && !rn2(4)) {
+                    if (!rn2(4)) {
                         growl(mon);
                         exclaimed = (iflags.last_msg == PLNMSG_GROWL);
                     }
index aced134ac181cbd4affbdcee6a7167bfc2fd5054..04de94c5c0b2d3d272d093830e94e0c6f79e58ab 100644 (file)
@@ -348,7 +348,7 @@ growl(register struct monst* mtmp)
 {
     register const char *growl_verb = 0;
 
-    if (mtmp->msleeping || !mtmp->mcanmove || !mtmp->data->msound)
+    if (mtmp->msleeping || !mtmp->mcanmove || mtmp->data->msound == MS_SILENT)
         return;
 
     /* presumably nearness and soundok checks have already been made */
@@ -357,10 +357,12 @@ growl(register struct monst* mtmp)
     else
         growl_verb = growl_sound(mtmp);
     if (growl_verb) {
-        pline("%s %s!", Monnam(mtmp), vtense((char *) 0, growl_verb));
-        iflags.last_msg = PLNMSG_GROWL;
-        if (g.context.run)
-            nomul(0);
+        if (canseemon(mtmp) || !Deaf) {
+            pline("%s %s!", Monnam(mtmp), vtense((char *) 0, growl_verb));
+            iflags.last_msg = PLNMSG_GROWL;
+            if (g.context.run)
+                nomul(0);
+        }
         wake_nearto(mtmp->mx, mtmp->my, mtmp->data->mlevel * 18);
     }
 }