Sleeping vs Sleepy (trunk only)
While looking at fixing the mfrozen issue for monsters (there's no
way to tell whether it's been caused by sleep or paralysis, necessitating
that some messages be vague or suppressed when actions impact monsters
who can't move), I noticed a drawbridge bug for the hero. It was using
the misleadingly named Sleeping intrinsic incorrectly. When that is
nonzero, the hero is prone to falling asleep at random intervals, not
necessarily asleep right now. I've always intended to rename it to
something that's not misleading, but hadn't ever gotten around to doing
so, until now: change the SLEEPING property to SLEEPY and the Sleeping
intrinsic/attribute to Sleepy.
This may be moot for the drawbridge. I can't remember any hero ever
jumping to safety instead of being crushed by either the bridge or its
portcullis, and I'm sure sleepiness hasn't been a factor. So I haven't
included any fixes entry about misusing Sleeping when it meant u.usleep
(or better yet, unconscious(); or even better, Unaware [a post-3.4.3
pseudo-property that tests both unconscious() and fainted() when checking
whether hero is incapacitated]).
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
/* NetHack 3.5 prop.h $Date$ $Revision$ */
|
||||
/* SCCS Id: @(#)prop.h 3.5 1999/07/07 */
|
||||
/* Copyright (c) 1989 Mike Threepoint */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -36,7 +35,7 @@
|
||||
#define HALLUC_RES 24
|
||||
#define FUMBLING 25
|
||||
#define WOUNDED_LEGS 26
|
||||
#define SLEEPING 27
|
||||
#define SLEEPY 27
|
||||
#define HUNGER 28
|
||||
/* Vision and senses */
|
||||
#define SEE_INVIS 29
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
/* NetHack 3.5 youprop.h $Date$ $Revision$ */
|
||||
/* SCCS Id: @(#)youprop.h 3.5 2007/03/16 */
|
||||
/* Copyright (c) 1989 Mike Threepoint */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -132,9 +131,9 @@
|
||||
#define EWounded_legs u.uprops[WOUNDED_LEGS].extrinsic
|
||||
#define Wounded_legs (HWounded_legs || EWounded_legs)
|
||||
|
||||
#define HSleeping u.uprops[SLEEPING].intrinsic
|
||||
#define ESleeping u.uprops[SLEEPING].extrinsic
|
||||
#define Sleeping (HSleeping || ESleeping)
|
||||
#define HSleepy u.uprops[SLEEPY].intrinsic
|
||||
#define ESleepy u.uprops[SLEEPY].extrinsic
|
||||
#define Sleepy (HSleepy || ESleepy)
|
||||
|
||||
#define HHunger u.uprops[HUNGER].intrinsic
|
||||
#define EHunger u.uprops[HUNGER].extrinsic
|
||||
|
||||
Reference in New Issue
Block a user