]> granicus.if.org Git - nethack/commitdiff
sleeping gas trap vs steed
authornethack.rankin <nethack.rankin>
Sun, 11 Feb 2007 01:23:28 +0000 (01:23 +0000)
committernethack.rankin <nethack.rankin>
Sun, 11 Feb 2007 01:23:28 +0000 (01:23 +0000)
     Noticed while checking out the report that you can #jump when riding
a sleeping steed:  hero's sleep resistance or magical breathing prevented
sleeping gas traps from hitting steed.  "You are enveloped in a cloud of
gas" but your steed is untouched?  That didn't make sense.

doc/fixes34.4
src/trap.c

index 3ddaa3ddb3e46e0ce54d6ade83852a5ce1eeddc9..0e92c370e6f18b912752cbcce4e5812fcc34aad3 100644 (file)
@@ -318,6 +318,7 @@ prevent long messages from triggering access violation or segmentation fault
 cursed corpse wielded by a monster isn't welded to its hand or paw
 fix grammar errors in samurai quest, wakarimasu ka?
 fix spelling of Dr Dolittle
+hero's sleep resistance shouldn't protect steed from sleeping gas trap
 
 
 Platform- and/or Interface-Specific Fixes
index 509da79cc486afb0b2b642fee4304f76d3fe59b3..b91e3c7131bfa0c9a99251eceac0d4889e188561 100644 (file)
@@ -1,4 +1,4 @@
-/*     SCCS Id: @(#)trap.c     3.5     2006/12/16      */
+/*     SCCS Id: @(#)trap.c     3.5     2007/02/10      */
 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
 /* NetHack may be freely redistributed.  See license for details. */
 
@@ -889,10 +889,10 @@ unsigned trflags;
                seetrap(trap);
                if(Sleep_resistance || breathless(youmonst.data)) {
                    You("are enveloped in a cloud of gas!");
-                   break;
+               } else {
+                   pline("A cloud of gas puts you to sleep!");
+                   fall_asleep(-rnd(25), TRUE);
                }
-               pline("A cloud of gas puts you to sleep!");
-               fall_asleep(-rnd(25), TRUE);
 #ifdef STEED
                (void) steedintrap(trap, (struct obj *)0);
 #endif