From bdb0930316187f6c0f7bfddd9e18066bb68a92ca Mon Sep 17 00:00:00 2001 From: "nethack.rankin" Date: Fri, 26 Oct 2007 02:00:43 +0000 Subject: [PATCH] invisibility vs blindness Reported a month ago by , putting on a cloak of invisibility while blind and then using ';' or '/' to examine yourself revealed that you had become invisible. This fix just changes the lookat() output when you can't see that you can't see yourself. :-) Probing and stethoscope still reveal invisibility, as will any message which uses x_monnam() to identify the hero. (First part is intentional; last part seems not worth bothering about--I'm not even sure that the player can arrange to trigger it.) --- doc/fixes34.4 | 1 + src/pager.c | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/doc/fixes34.4 b/doc/fixes34.4 index 2e11e718b..9079da7b0 100644 --- a/doc/fixes34.4 +++ b/doc/fixes34.4 @@ -365,6 +365,7 @@ could get "suddenly you cannot see the " while invisible mon remained displayed due to telepathy or extended detection cutting a long worm in half would trigger segfault/accvio crash if the hit took parent down to 1 hit point or if long worms had become extinct +blinded invisible hero can't see self as invisible via ';' or '/' Platform- and/or Interface-Specific Fixes diff --git a/src/pager.c b/src/pager.c index fce2ee218..e3c4abdb7 100644 --- a/src/pager.c +++ b/src/pager.c @@ -74,7 +74,8 @@ lookat(x, y, buf, monbuf) } Sprintf(buf, "%s%s%s called %s", - Invis ? "invisible " : "", + /* being blinded may hide invisibility from self */ + (Invis && (senseself() || !Blind)) ? "invisible " : "", race, mons[u.umonnum].mname, plname);