]> granicus.if.org Git - nethack/commitdiff
fix #H4078 - dull spellbook vs sleep resistance
authorPatR <rankin@nethack.org>
Mon, 14 Dec 2015 21:27:31 +0000 (13:27 -0800)
committerPatR <rankin@nethack.org>
Mon, 14 Dec 2015 21:27:31 +0000 (13:27 -0800)
Reading a dull spellbook could make a sleep resistant hero fall asleep.

doc/fixes36.1
src/spell.c

index b4c572fcae096518567ef0579794449c85fa59c6..1753094366d5074d09ed51a6230169573f5ddc08 100644 (file)
@@ -28,6 +28,7 @@ negative intrinsic protection shouldn't confer MC=1, "you are warded" (not
        possible from divine protection but is possible from eating rings)
 make a slight adjustment to the quickmimic() sense wording
 fix typo in passage 1 of The Colour of Magic
+falling asleep when reading dull spellbook ignored sleep resistance
 
 
 Platform- and/or Interface-Specific Fixes
index 71068c7a6cb3fff89f117bfa7b079b70453a93eb..bc911f3c35abe3dcb3649faf7184457df8259576 100644 (file)
@@ -1,4 +1,4 @@
-/* NetHack 3.6 spell.c $NHDT-Date: 1447653429 2015/11/16 05:57:09 $  $NHDT-Branch: master $:$NHDT-Revision: 1.72 $ */
+/* NetHack 3.6 spell.c $NHDT-Date: 1450128440 2015/12/14 21:27:20 $  $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.73 $ */
 /*      Copyright (c) M. Stephenson 1988                          */
 /* NetHack may be freely redistributed.  See license for details. */
 
@@ -430,7 +430,7 @@ register struct obj *spellbook;
     boolean too_hard = FALSE;
 
     /* attempting to read dull book may make hero fall asleep */
-    if (!confused && booktype != SPE_BLANK_PAPER
+    if (!confused && !Sleep_resistance
         && !strcmp(OBJ_DESCR(objects[booktype]), "dull")) {
         const char *eyes;
         int dullbook = rnd(25) - ACURR(A_WIS);