]> granicus.if.org Git - nethack/commit
fix #H2150 - discovering displacement when can't see its effect
authornethack.rankin <nethack.rankin>
Sat, 24 Jul 2010 03:53:52 +0000 (03:53 +0000)
committernethack.rankin <nethack.rankin>
Sat, 24 Jul 2010 03:53:52 +0000 (03:53 +0000)
commit8aecc6620416e01f72ec8dc653d4b7ae3a8fc540
treec4b588768932a81a4aab65243de70b7c20df4c18
parentbda97fb3fa1d74c058ed3e7fb4a0290df775cb9f
fix #H2150 - discovering displacement when can't see its effect

     From a bug report, when putting on a
cloak of displacement you discovered what it was even if you were invisible
and unable to see invisible, hence couldn't see yourself.  It isn't exactly
clear what the hero sees of himself when displaced, but I think it makes
sense that you shouldn't discover the cloak when you can't see yourself,
which suggests that you shouldn't discover it when blind either.

     Discovering it after regaining sight, becoming able to see your
invisible self, or losing invisibility seemed complex and likely to be
bug-prone, so this patch leaves the cloak undiscovered in that situation.
But it does become discovered when taken off (provided that you can see
yourself by then) rather than waiting all the way 'til put back on again.

     Elven cloaks had a comparable issue.  I assume that stealthiness can
be perceived without being able to see yourself, but it shouldn't become
discovered when you're already stealthy from some other means.  (Elven
boots already behaved this way; now elven cloaks work like them.)

     Rings of stealth would never be auto-discovered.  Now they'll be
like elven cloaks and boots and be discovered if put on when not already
steathy or taken off and losing stealth.  In both cases, the ring has to
have its description known; if picked up when blind and still not seen
yet it won't become discovered even when you notice yourself gaining or
losing stealth.

     Not tested:  feedback given when a worn ring or cloak gets dipped
into a potion of polymorph and changes into or away from a stealth or
displacement conferring item.
doc/fixes35.0
src/do_wear.c