Bart House [Thu, 22 Nov 2018 23:20:17 +0000 (15:20 -0800)]
Added decl_early_init() which is called when PLAYAGAIN is supported.
decl_early_init() is called when we are starting a game. On first
start, it validates that global state is in the expected state.
When called on subsequent starts, it initializes global state to
expected state.
Bart House [Thu, 22 Nov 2018 18:15:43 +0000 (10:15 -0800)]
Removed unnecessary use of static for nocreate values.
If multiple games are played without exiting the process, on the second
new player creation the nocreate values will already be set based
on the first player creation.
Bart House [Thu, 22 Nov 2018 23:20:17 +0000 (15:20 -0800)]
Added decl_early_init() which is called when PLAYAGAIN is supported.
decl_early_init() is called when we are starting a game. On first
start, it validates that global state is in the expected state.
When called on subsequent starts, it initializes global state to
expected state.
Bart House [Thu, 22 Nov 2018 18:15:43 +0000 (10:15 -0800)]
Removed unnecessary use of static for nocreate values.
If multiple games are played without exiting the process, on the second
new player creation the nocreate values will already be set based
on the first player creation.
Pasi Kallinen [Thu, 22 Nov 2018 18:24:56 +0000 (20:24 +0200)]
Fix guard shoving monsters away coordinate logic
The logic required both x and y coordinates of the guard location and
the new location the guard wanted to move to be different. This is
obviously wrong, as the guard may move horizontally or vertically.
PatR [Thu, 22 Nov 2018 03:16:23 +0000 (19:16 -0800)]
fix #H7585 - can't untrap from edge of pit
Attempting to untrap an adjacent location failed if you had escaped a
pit, claiming that you couldn't reach. You can't reach the bottom of
the pit if you're not in it, but you should be able to reach adjacent
spots normally.
PatR [Thu, 22 Nov 2018 02:32:04 +0000 (18:32 -0800)]
more Schroedinger's Cat
Prevent food detection--scroll or crystal ball--from noticing the cat
corpse inside SchroedingersBox since its presence is tentative and
resolving its status during detection is a huge can of worms (live cat
placement on map from inside locked box, parallel resolution required
for monster detection/warning/telepathy that would render the box
fairly useless since it would probably end up getting resolved by ESP
before hero gains access).
Prevent cat corpse in the Box from being added to shop bill if unpaid
Box is picked up. That prevents it from being listed as a bought item
if the player buys the box (instead of being described as unknown
contents; an older, more general bug which still hasn't been fixed).
As far as I'm aware, off the revised handling of Schroedingers Cat is
finished.
PatR [Thu, 22 Nov 2018 00:47:42 +0000 (16:47 -0800)]
vmsbuild.com update
A copyright header inserted last spring uses the wrong format for a
DCL comment and triggers a couple of warnings about invalid commands.
Some linker hackery added a long time ago draws complaints from the
linker on IA64. This was noticed during the release cycle for 3.6.0
but then went unaddressed.
PatR [Wed, 21 Nov 2018 11:10:49 +0000 (03:10 -0800)]
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.