fix #H179 - blinding attack while fainted

From a bug report, being hit with a
yellow light explosion while fainted from lack of food caused blindness
but being hit while sleeping did not.  Make being in fainted state become
a protection against light-induced blindness.
This commit is contained in:
nethack.rankin
2006-08-27 02:09:39 +00:00
parent 63af2521dd
commit 1574c6effd
2 changed files with 3 additions and 2 deletions

View File

@@ -1,4 +1,4 @@
/* SCCS Id: @(#)mondata.c 3.5 2006/07/07 */
/* SCCS Id: @(#)mondata.c 3.5 2006/08/26 */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */
@@ -119,7 +119,7 @@ struct monst *mon;
boolean is_you = (mon == &youmonst);
struct obj *o;
if (is_you ? (Blind || u.usleep) :
if (is_you ? (Blind || u.usleep || is_fainted()) :
(mon->mblinded || !mon->mcansee || !haseyes(ptr) ||
/* BUG: temporary sleep sets mfrozen, but since
paralysis does too, we can't check it */