From 8762ab38ef1dfb9f153a70ccee67308d435a2a94 Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Thu, 4 Apr 2024 12:26:57 +0300 Subject: [PATCH] Silent monsters in stinking clouds don't cough ... and you can hear the coughing some distance away, even if you can't see the monster. --- doc/fixes3-7-0.txt | 1 + src/region.c | 9 ++++++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/doc/fixes3-7-0.txt b/doc/fixes3-7-0.txt index 614581a1a..406c81d99 100644 --- a/doc/fixes3-7-0.txt +++ b/doc/fixes3-7-0.txt @@ -1391,6 +1391,7 @@ don't self-genocide if a monk picks "master-lich" or "masterlich" as target Sunsword can be invoked to create a blinding ray Excalibur is much harder to get if hero is not a knight pets considered any noise made by hero made as whistling +silent monsters in stinking clouds don't cough Fixes to 3.7.0-x General Problems Exposed Via git Repository diff --git a/src/region.c b/src/region.c index b27efc113..bec949e99 100644 --- a/src/region.c +++ b/src/region.c @@ -1084,9 +1084,12 @@ inside_gas_cloud(genericptr_t p1, genericptr_t p2) mtmp = (struct monst *) p2; if (m_poisongas_ok(mtmp) != M_POISONGAS_OK) { - if (cansee(mtmp->mx, mtmp->my)) - pline("%s coughs!", Monnam(mtmp)); - wake_nearto(mtmp->mx, mtmp->my, 2); + if (!is_silent(mtmp->data)) { + if (cansee(mtmp->mx, mtmp->my) + || (distu(mtmp->mx, mtmp->my) < 8)) + pline("%s coughs!", Monnam(mtmp)); + wake_nearto(mtmp->mx, mtmp->my, 2); + } if (heros_fault(reg)) setmangry(mtmp, TRUE); if (haseyes(mtmp->data) && mtmp->mcansee) {