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.
This commit is contained in:
nethack.rankin
2010-07-24 03:53:52 +00:00
parent bda97fb3fa
commit 8aecc66204
2 changed files with 104 additions and 24 deletions

View File

@@ -328,6 +328,9 @@ improve the message sequencing when a thrown poisoned weapon loses is poison
attempting to open, close, or lock/unlock a door while confused or stunned
uses up a move regardless of whether direction choice finds a door
grammar fixes for vault guard messages given after player assigns guard a name
wearing cloak of displacement auto-discovered it even when hero couldn't see
wearing elven cloak auto-discovered it even when already stealthy
putting on ring of stealth never auto-discovered it
Platform- and/or Interface-Specific Fixes