]> granicus.if.org Git - nethack/commitdiff
sleeping shopkeeper
authorcohrs <cohrs>
Thu, 30 Oct 2003 04:31:05 +0000 (04:31 +0000)
committercohrs <cohrs>
Thu, 30 Oct 2003 04:31:05 +0000 (04:31 +0000)
Pat verified something I had wondered about, that various tests of mcanmove
in shk.c should have also been testing mcanmove.  There may well be other
tests of mcanmove in other files that need fixing.

doc/fixes34.3
src/shk.c

index c9f0e157d46e99222d60efa66247818039bdbec7..94c00fcf5a0fc183e51e164e8115075a4a1ed0d2 100644 (file)
@@ -84,6 +84,7 @@ 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
+sleeping shopkeeper responds to various events without waking
 
 
 Platform- and/or Interface-Specific Fixes
index ecaf783ba436a27001b70b6531ab2bf2db3177f6..e0fc11f1179c270f5447576419e5b6339f0cc182 100644 (file)
--- a/src/shk.c
+++ b/src/shk.c
@@ -939,7 +939,7 @@ rouse_shk(shkp, verbosely)
 struct monst *shkp;
 boolean verbosely;
 {
-       if (!shkp->mcanmove) {
+       if (!shkp->mcanmove || shkp->msleeping) {
            /* greed induced recovery... */
            if (verbosely && canspotmon(shkp))
                pline("%s %s.", Monnam(shkp),
@@ -1168,7 +1168,7 @@ proceed:
        if (ltmp || eshkp->billct || eshkp->debit) 
            rouse_shk(shkp, TRUE);
 
-       if (!shkp->mcanmove) {      /* still asleep or paralyzed */
+       if (!shkp->mcanmove || shkp->msleeping) { /* still asleep/paralyzed */
                pline("%s %s.", Monnam(shkp),
                      rn2(2) ? "seems to be napping" : "doesn't respond");
                return 0;
@@ -1617,7 +1617,7 @@ int croaked;
            if (cansee(shkp->mx, shkp->my && croaked))
                pline("%s %slooks at your corpse%s and %s.",
                      Monnam(shkp),
-                     !shkp->mcanmove ? "wakes up, " : "",
+                     (!shkp->mcanmove || shkp->msleeping) ? "wakes up, " : "",
                      !rn2(2) ? (shkp->female ? ", shakes her head," :
                           ", shakes his head,") : "",
                      !inhishop(shkp) ? "disappears" : "sighs");
@@ -1653,7 +1653,7 @@ int croaked;
                 umoney = money_cnt(invent);
 #endif
                takes[0] = '\0';
-               if (!shkp->mcanmove)
+               if (!shkp->mcanmove || shkp->msleeping)
                        Strcat(takes, "wakes up and ");
                if (distu(shkp->mx, shkp->my) > 2)
                        Strcat(takes, "comes and ");