fix #M108 - seeing while asleep
I think being asleep or unconscious ought to override vision the way
that being blinded does, but that's a more ambitious change than I care to
tackle. This replaces You("see ...") with You_see("..."), comparable to
You_hear(). It catches the reported door case and several variations of
light sources burning out while on the floor rather than in inventory, but
it probably misses some other cases. zap_over_floor() in particular is
highly suspect.
This commit is contained in:
19
src/pline.c
19
src/pline.c
@@ -1,4 +1,4 @@
|
||||
/* SCCS Id: @(#)pline.c 3.5 2004/11/22 */
|
||||
/* SCCS Id: @(#)pline.c 3.5 2005/06/22 */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -191,6 +191,23 @@ You_hear VA_DECL(const char *,line)
|
||||
VA_END();
|
||||
}
|
||||
|
||||
/*VARARGS1*/
|
||||
void
|
||||
You_see VA_DECL(const char *,line)
|
||||
char *tmp;
|
||||
|
||||
VA_START(line);
|
||||
VA_INIT(line, const char *);
|
||||
if (u.usleep)
|
||||
YouPrefix(tmp, "You dream that you see ", line);
|
||||
else if (Blind) /* caller should have caught this... */
|
||||
YouPrefix(tmp, "You sense ", line);
|
||||
else
|
||||
YouPrefix(tmp, "You see ", line);
|
||||
vpline(strcat(tmp, line), VA_ARGS);
|
||||
VA_END();
|
||||
}
|
||||
|
||||
/* Print a message inside double-quotes.
|
||||
* The caller is responsible for checking deafness.
|
||||
* Gods can speak directly to you in spite of deafness.
|
||||
|
||||
Reference in New Issue
Block a user