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:
nethack.rankin
2006-09-02 03:32:18 +00:00
parent 1574c6effd
commit 06e9fa91de
8 changed files with 44 additions and 14 deletions

View File

@@ -3092,7 +3092,7 @@ drown()
return(FALSE);
}
if ((Teleportation || can_teleport(youmonst.data)) &&
!u.usleep && (Teleport_control || rn2(3) < Luck+2)) {
!Unaware && (Teleport_control || rn2(3) < Luck+2)) {
You("attempt a teleport spell."); /* utcsri!carroll */
if (!level.flags.noteleport) {
(void) dotele();
@@ -3113,6 +3113,8 @@ drown()
while still asleep; we can't do that the same way that waking
due to combat is handled; note unmul() clears u.usleep */
if (u.usleep) unmul("Suddenly you wake up!");
/* being doused will revive from fainting */
if (is_fainted()) reset_faint();
/* can't crawl if unable to move (crawl_ok flag stays false) */
if (multi < 0 || (Upolyd && !youmonst.data->mmove)) goto crawl;
/* look around for a place to crawl to */