]> granicus.if.org Git - nethack/commitdiff
sleeping monster responding to attacks
authorcohrs <cohrs>
Thu, 30 Oct 2003 02:40:45 +0000 (02:40 +0000)
committercohrs <cohrs>
Thu, 30 Oct 2003 02:40:45 +0000 (02:40 +0000)
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.

doc/fixes34.3
src/mhitm.c

index 8d65e1f21752da610545a8ae842b81311a1c3b88..c9f0e157d46e99222d60efa66247818039bdbec7 100644 (file)
@@ -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
index d3d941b660d86244fef4a468ea4335fc5b802006..3562365eb22e4c765d4844b362f2ea55ea8bb6b7 100644 (file)
@@ -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. */