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:
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.6 mkobj.c $NHDT-Date: 1518053380 2018/02/08 01:29:40 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.130 $ */
|
||||
/* NetHack 3.6 mkobj.c $NHDT-Date: 1542798624 2018/11/21 11:10:24 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.136 $ */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/*-Copyright (c) Derek S. Ray, 2015. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
@@ -1388,8 +1388,6 @@ register struct obj *obj;
|
||||
when we assume this is a brand new glob so use objects[].oc_weight */
|
||||
if (obj->globby && obj->owt > 0)
|
||||
wt = obj->owt;
|
||||
if (SchroedingersBox(obj))
|
||||
wt += mons[PM_HOUSECAT].cwt;
|
||||
if (Is_container(obj) || obj->otyp == STATUE) {
|
||||
struct obj *contents;
|
||||
register int cwt = 0;
|
||||
|
||||
Reference in New Issue
Block a user