Schroedinger's Cat

If hero was carrying Schroedinger's Box at end of game, disclosing
inventory converted it into an ordinary box.  That interferred with
subsequent disclosure when writing DUMPLOG, which saw an empty box
if inventory had been shown or the special box with newly-determined
contents if not.  I tried a couple of ways to fix it and decided
that redoing it was better in the long run.

Schroedinger's box is still flagged with box->spe = 1, but instead
of having that affect the box's weight, now there is always a cat
corpse in the box.  When opened, that will already be in place for
a dead cat or be discarded for a live one, but the weight will be
standard for container+contents and when box->cknown is set it will
always be "containing 1 item" (which might turn out to be a monster).

Some temporary code fixes up old save/bones files to stay compatible.

TODO:  food detection used to skip Schroedinger's Box; now it will
always find a corpse, so some fixup like the ridiculous probing code
is needed.
This commit is contained in:
PatR
2018-11-21 03:10:49 -08:00
parent 03ef9da591
commit 2beb36fc61
8 changed files with 181 additions and 93 deletions

View File

@@ -205,6 +205,8 @@ successfully paying for shop damage with shop credit would be followed by
if a migrating monster was killed off because there was no room on the
destination level, it would leave a corpse even if it was a type
which should never leave one (demon, golem, blob, &c)
end of game while carrying Schroedinger's Box would reveal cat-or-corpse
for inventory disclosure or put that info into dumplog, but not both
Fixes to Post-3.6.1 Problems that Were Exposed Via git Repository