]> granicus.if.org Git - nethack/commitdiff
Mindless monsters are not scared of music
authorPasi Kallinen <paxed@alt.org>
Thu, 19 Jan 2023 20:18:52 +0000 (22:18 +0200)
committerPasi Kallinen <paxed@alt.org>
Thu, 19 Jan 2023 20:18:52 +0000 (22:18 +0200)
src/music.c

index 52be4d72ae3e80a8abc31dd1e3f12e211cdb172b..18ba85974d0ad2d38e702ac5f9def325bce01e31 100644 (file)
@@ -59,6 +59,7 @@ awaken_monsters(int distance)
                 && (mtmp->mstrategy & STRAT_WAITMASK) != 0)
                 mtmp->mstrategy &= ~STRAT_WAITMASK;
             else if (distm < distance / 3
+                     && !mindless(mtmp->data)
                      && !resist(mtmp, TOOL_CLASS, 0, NOTELL)
                      /* some monsters are immune */
                      && onscary(0, 0, mtmp))
@@ -181,6 +182,7 @@ awaken_soldiers(struct monst* bugler  /* monster that played instrument */)
                 && (mtmp->mstrategy & STRAT_WAITMASK) != 0)
                 mtmp->mstrategy &= ~STRAT_WAITMASK;
             else if (distm < distance / 3
+                     && !mindless(mtmp->data)
                      && !resist(mtmp, TOOL_CLASS, 0, NOTELL)
                      /* some monsters are immune */
                      && onscary(0, 0, mtmp))