From: Pasi Kallinen Date: Mon, 26 Jul 2021 18:40:19 +0000 (+0300) Subject: Bugle playing should not scare some monsters X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=141a7915d6d4034353b6910515dc50e240f7f5b3;p=nethack Bugle playing should not scare some monsters Make awaken_soldiers match awaken_monsters in what monsters it can scare. --- diff --git a/doc/fixes37.0 b/doc/fixes37.0 index e2b02d43b..173da319d 100644 --- a/doc/fixes37.0 +++ b/doc/fixes37.0 @@ -572,6 +572,7 @@ fix heap-use-after-free when attacking monster with potion for "a" vs "an", add ukulele and uke as exceptions for "an u" add new extended command #retravel remove special doinv key, functionality was equal to BIND=0:inventory +some monsters should not have been scared of bugle playing Fixes to 3.7.0-x Problems that Were Exposed Via git Repository diff --git a/src/music.c b/src/music.c index 1441d28fc..8d372d38f 100644 --- a/src/music.c +++ b/src/music.c @@ -181,7 +181,9 @@ awaken_soldiers(struct monst* bugler /* monster that played instrument */) && (mtmp->mstrategy & STRAT_WAITMASK) != 0) mtmp->mstrategy &= ~STRAT_WAITMASK; else if (distm < distance / 3 - && !resist(mtmp, TOOL_CLASS, 0, NOTELL)) + && !resist(mtmp, TOOL_CLASS, 0, NOTELL) + /* some monsters are immune */ + && onscary(0, 0, mtmp)) monflee(mtmp, 0, FALSE, TRUE); } }