Skip to content

Commit

Permalink
invisibility vs blindness
Browse files Browse the repository at this point in the history
     Reported a month ago by <email deleted>, 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.)
  • Loading branch information
nethack.rankin committed Oct 26, 2007
1 parent aec6236 commit bdb0930
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions doc/fixes34.4
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,7 @@ could get "suddenly you cannot see the <mon>" 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
Expand Down
3 changes: 2 additions & 1 deletion src/pager.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit bdb0930

Please sign in to comment.