From: cohrs Date: Thu, 30 Oct 2003 02:40:45 +0000 (+0000) Subject: sleeping monster responding to attacks X-Git-Tag: MOVE2GIT~1618 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e8a53c9ea38b4c81f77e38fd1b1222728aba6780;p=nethack sleeping monster responding to attacks when msleeping is set, mcanmove is not cleared. mcanmove applies only to mfrozen. So, mattackm needs to test both mcanmove and msleeping. mattackm will not wake the defender if the attack misses. --- diff --git a/doc/fixes34.3 b/doc/fixes34.3 index 8d65e1f21..c9f0e157d 100644 --- a/doc/fixes34.3 +++ b/doc/fixes34.3 @@ -83,6 +83,7 @@ allow Conflict-resistant monsters to respond to conflict attacks rather than prefer herbivorous stone-to-flesh message when hero is a vegitarian try even harder to avoid incorrect map display while changing levels no "freaked" message by exploding black light, unless you really are +sleeping monster could respond to attacks by other monsters Platform- and/or Interface-Specific Fixes diff --git a/src/mhitm.c b/src/mhitm.c index d3d941b66..3562365eb 100644 --- a/src/mhitm.c +++ b/src/mhitm.c @@ -203,7 +203,7 @@ mattackm(magr, mdef) struct permonst *pa, *pd; if (!magr || !mdef) return(MM_MISS); /* mike@genat */ - if (!magr->mcanmove) return(MM_MISS); /* riv05!a3 */ + if (!magr->mcanmove || magr->msleeping) return(MM_MISS); pa = magr->data; pd = mdef->data; /* Grid bugs cannot attack at an angle. */