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:
@@ -251,6 +251,7 @@ don't place hero on top of monster when arriving on level which is so full
|
||||
have to see a divine gift in order to have it become a discovery
|
||||
honor the never-in-hell flag when selecting random monster type for corpses,
|
||||
eggs, figurines, and statues created in Gehennom
|
||||
hero is not subject to light-based blindness while fainted from hunger
|
||||
|
||||
|
||||
Platform- and/or Interface-Specific Fixes
|
||||
|
||||
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user