fix #H8124 - interrupted donning gives player info

about the armor.  Wearing armor sets obj->known, making its enchantment
be shown when it gets formatted, because the AC value on the status line
lets the player deduce what that is.  It was being set at the beginning
of the wear operation.  If the armor got stolen before it became fully
worn, the enchantment was still shown.  Defer that until the end of the
operation.  An attentive player can still deduce the enchantment if the
item is stolen (because its protection starts immediately) but the hero
won't learn that enchantment unless the donning completes.

This might be suboptimal but it isn't qualitatively different from
watching a pet walk/not-walk over items whose bless/curse state isn't
known or dropping unidentified items in a shop to check their price.
The player can deduce something that the hero doesn't know yet.
This commit is contained in:
PatR
2019-02-09 16:07:18 -08:00
parent 2d62513b1b
commit 128d1628a9
2 changed files with 22 additions and 17 deletions

View File

@@ -1,4 +1,4 @@
$NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.252 $ $NHDT-Date: 1549666475 2019/02/08 22:54:35 $
$NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.253 $ $NHDT-Date: 1549757225 2019/02/10 00:07:05 $
This fixes36.2 file is here to capture information about updates in the 3.6.x
lineage following the release of 3.6.1 in April 2018. Please note, however,
@@ -368,6 +368,9 @@ if game ends while hero is in a vault wall breach or in guard's temporary
DUMPLOG: output from '/' (#whatis) and ';' went into ^P message recall history
but was missing from DUMPLOG's message history due to special handling
for the first character which might be graphical rather than text
when donning armor, defer flagging its +/- value--which can be deduced from
the status line--as known until finished in case it gets stolen before
then (player might still deduce the +/- value but hero won't learn it)
Fixes to Post-3.6.1 Problems that Were Exposed Via git Repository