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:
+2
-2
@@ -119,7 +119,7 @@ struct monst *mon;
|
||||
boolean is_you = (mon == &youmonst);
|
||||
struct obj *o;
|
||||
|
||||
if (is_you ? (Blind || u.usleep || is_fainted()) :
|
||||
if (is_you ? (Blind || Unaware) :
|
||||
(mon->mblinded || !mon->mcansee || !haseyes(ptr) ||
|
||||
/* BUG: temporary sleep sets mfrozen, but since
|
||||
paralysis does too, we can't check it */
|
||||
@@ -185,7 +185,7 @@ struct obj *obj; /* aatyp == AT_WEAP, AT_SPIT */
|
||||
break;
|
||||
|
||||
case AT_ENGL:
|
||||
if (is_you && (Blindfolded || u.usleep || u.ucreamed))
|
||||
if (is_you && (Blindfolded || Unaware || u.ucreamed))
|
||||
return FALSE;
|
||||
if (!is_you && mdef->msleeping)
|
||||
return FALSE;
|
||||
|
||||
Reference in New Issue
Block a user