From fd799733c277c77657dc5302524e306ac0fa9e3c Mon Sep 17 00:00:00 2001 From: "nethack.rankin" Date: Sun, 2 Nov 2008 23:12:21 +0000 Subject: [PATCH] [part of] #H1743 - sleeping victim of theft (trunk only) Mentioned by in his report about sound anomalies, it was possible for a sleeping hero to "gladly start removing armor" when attacked by a nymph or succubus. The code explicitly wakes up the hero if he has fainted from lack of food because "can't charm without waking you" (according to the existing comment), but it didn't handle other forms of sleep and paralysis. You could get |You fall asleep. |The wood nymph charms you. You gladly start removing your armor. |The combat awakens you. Now in the same situation you'll get |You fall asleep. |You wake up. |The wood nymph charms you. You gladly start removing your armor. --- doc/fixes35.0 | 1 + src/steal.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/doc/fixes35.0 b/doc/fixes35.0 index 0636f2618..37c50bd2d 100644 --- a/doc/fixes35.0 +++ b/doc/fixes35.0 @@ -293,6 +293,7 @@ if polymorph causes a monster to drop items, they won't be used up via shuddering vibrations or as golem creation fodder monsters who ate green slime corpses weren't turned into green slime "hand slip" while naming an object would never pick 'z' as a substitute letter +hero would "gladly take off " for nymph or succubus even while asleep Platform- and/or Interface-Specific Fixes diff --git a/src/steal.c b/src/steal.c index 58d53cf22..f2a2359f9 100644 --- a/src/steal.c +++ b/src/steal.c @@ -1,4 +1,4 @@ -/* SCCS Id: @(#)steal.c 3.5 2007/04/16 */ +/* SCCS Id: @(#)steal.c 3.5 2008/11/02 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -421,7 +421,7 @@ gotobj: otmp->cursed = 0; /* can't charm you without first waking you */ - if (multi < 0 && is_fainted()) unmul((char *)0); + if (Unaware) unmul((char *)0); slowly = (armordelay >= 1 || multi < 0); if(flags.female) pline("%s charms you. You gladly %s your %s.",