Unaware; fix #H202 and extend the fix for #H179 (trunk only)
Turn being unconscious (via several reasons, including fainted from hunger) into a pseudo-property named `Unaware' and use it in several places where only being asleep was checked. #H202 was about a stunned character who got the recovery message when it timed out while fainted. This suppresses messages for several difficulties when they begin or end while hero is Unaware. Messages about fatal illness, sliming, or petrification aren't suppressed; they're too important to hide from the player. "You feel ..." messages come out as "You dream that you feel ..." when Unaware; fairly lame but hopefully adequate.
This commit is contained in:
28
src/potion.c
28
src/potion.c
@@ -59,6 +59,8 @@ boolean talk;
|
||||
{
|
||||
long old = HConfusion;
|
||||
|
||||
if (Unaware) talk = FALSE;
|
||||
|
||||
if (!xtime && old) {
|
||||
if (talk)
|
||||
You_feel("less %s now.",
|
||||
@@ -76,6 +78,8 @@ boolean talk;
|
||||
{
|
||||
long old = HStun;
|
||||
|
||||
if (Unaware) talk = FALSE;
|
||||
|
||||
if (!xtime && old) {
|
||||
if (talk)
|
||||
You_feel("%s now.",
|
||||
@@ -105,6 +109,10 @@ int type;
|
||||
{
|
||||
long old = Sick;
|
||||
|
||||
#if 0
|
||||
if (Unaware) talk = FALSE;
|
||||
#endif
|
||||
|
||||
if (xtime > 0L) {
|
||||
if (Sick_resistance) return;
|
||||
if (!old) {
|
||||
@@ -125,7 +133,7 @@ int type;
|
||||
if (talk) You_feel("somewhat better.");
|
||||
set_itimeout(&Sick, Sick * 2); /* approximation */
|
||||
} else {
|
||||
if (talk) pline("What a relief!");
|
||||
if (talk) You_feel("cured. What a relief!");
|
||||
Sick = 0L; /* set_itimeout(&Sick, 0L) */
|
||||
}
|
||||
context.botl = TRUE;
|
||||
@@ -145,6 +153,10 @@ const char *msg;
|
||||
{
|
||||
long old = Slimed;
|
||||
|
||||
#if 0
|
||||
if (Unaware) msg = 0;
|
||||
#endif
|
||||
|
||||
if ((!xtime && old) || (xtime && !old)) {
|
||||
if (msg) pline("%s", msg);
|
||||
context.botl = 1;
|
||||
@@ -163,6 +175,10 @@ const char *killername;
|
||||
{
|
||||
long old = Stoned;
|
||||
|
||||
#if 0
|
||||
if (Unaware) msg = 0;
|
||||
#endif
|
||||
|
||||
if ((!xtime && old) || (xtime && !old)) {
|
||||
if (msg) pline("%s", msg);
|
||||
/* context.botl = 1; --- Stoned is not a status line item */
|
||||
@@ -179,6 +195,8 @@ boolean talk;
|
||||
{
|
||||
long old = Vomiting;
|
||||
|
||||
if (Unaware) talk = FALSE;
|
||||
|
||||
if(!xtime && old)
|
||||
if(talk) You_feel("much less nauseated now.");
|
||||
|
||||
@@ -205,7 +223,7 @@ boolean talk;
|
||||
can_see_now = !Blind;
|
||||
Blinded = old; /* restore */
|
||||
|
||||
if (u.usleep) talk = FALSE;
|
||||
if (Unaware) talk = FALSE;
|
||||
|
||||
if (can_see_now && !u_could_see) { /* regaining sight */
|
||||
if (talk) {
|
||||
@@ -283,6 +301,8 @@ long mask; /* nonzero if resistance status should change by mask */
|
||||
boolean changed = 0;
|
||||
const char *message, *verb;
|
||||
|
||||
if (Unaware) talk = FALSE;
|
||||
|
||||
message = (!xtime) ? "Everything %s SO boring now." :
|
||||
"Oh wow! Everything %s so cosmic!";
|
||||
verb = (!Blind) ? "looks" : "feels";
|
||||
@@ -1431,12 +1451,12 @@ register struct obj *obj;
|
||||
exercise(A_DEX, TRUE);
|
||||
break;
|
||||
case POT_BLINDNESS:
|
||||
if (!Blind && !u.usleep) {
|
||||
if (!Blind && !Unaware) {
|
||||
kn++;
|
||||
pline("It suddenly gets dark.");
|
||||
}
|
||||
make_blinded(itimeout_incr(Blinded, rnd(5)), FALSE);
|
||||
if (!Blind && !u.usleep) Your(vision_clears);
|
||||
if (!Blind && !Unaware) Your(vision_clears);
|
||||
break;
|
||||
case POT_WATER:
|
||||
if(u.umonnum == PM_GREMLIN) {
|
||||
|
||||
Reference in New Issue
Block a user