]> granicus.if.org Git - nethack/commitdiff
Don't anger target via mon vs mon zap/breath
authorMichael Meyer <me@entrez.cc>
Mon, 13 Feb 2023 22:11:07 +0000 (17:11 -0500)
committerPasi Kallinen <paxed@alt.org>
Tue, 14 Feb 2023 07:22:56 +0000 (09:22 +0200)
dobuzz() was modified in 677b32c2a7 to anger the target, but beams
handled by dobuzz() don't necessarily originate from the hero.  Monsters
can zap wands that hit other monsters, dragons can use their breath
attacks, etc.  Those things were causing the targets to become angry at
the hero.

src/zap.c

index 8bc5bcaaca34222021aa2ed847b1fb038d302072..fa236d03a9068b0da681420da3a3ee36bd2e8dd3 100644 (file)
--- a/src/zap.c
+++ b/src/zap.c
@@ -4482,7 +4482,7 @@ dobuzz(
                         if (mon_could_move && !mon->mcanmove) /* ZT_SLEEP */
                             slept_monst(mon);
                         if (abstype != ZT_SLEEP)
-                            wakeup(mon, TRUE);
+                            wakeup(mon, !gc.context.mon_moving);
                     }
                 }
                 range -= 2;