[part of] #H1743 - sleeping victim of theft (trunk only)

Mentioned by <email deleted> 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.
This commit is contained in:
nethack.rankin
2008-11-02 23:12:21 +00:00
parent 83eb72c0fd
commit fd799733c2
2 changed files with 3 additions and 2 deletions

View File

@@ -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 <armor>" for nymph or succubus even while asleep
Platform- and/or Interface-Specific Fixes

View File

@@ -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.",