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.
PatR [Tue, 20 Nov 2018 21:13:23 +0000 (13:13 -0800)]
fix #H7530 - corpse from corpseless monster
Migrating monster attempting to arrive on a level which is already
full of monsters gets killed off. It was leaving a corpse without
regard for whether it was a type of of monster which should never
leave corpses.
I'd prefer that it be put back on the migrating_mons list rather
than be killed off, but this just suppresses impossible corpses.
Bart House [Tue, 20 Nov 2018 18:46:45 +0000 (10:46 -0800)]
Addressed compiler warnings.
Fixed declarations of draw_classic, draw_vertical and draw_horizontal.
Moved definitions of locals before code. Added initialization of
locals. Changed comments to c-style.
PatR [Tue, 20 Nov 2018 00:24:10 +0000 (16:24 -0800)]
life-saving vs sickness
Replace an old instance of direct manipulation of an intrinsic.
If life-saving occurs 1 turn before sickness will kill the hero,
the sickness if cured. But it was leaving delated_killer for SICK
allocated. Harmless but a bug none the less.
Pasi Kallinen [Mon, 19 Nov 2018 20:04:32 +0000 (22:04 +0200)]
Replace long worm on map after removing tail with wormgone
Calling wormgone will also remove the long worm monster from
the map, not just the worm tail. Put the monster back on map
so relmon can actually remove it properly.
Pasi Kallinen [Mon, 19 Nov 2018 19:54:32 +0000 (21:54 +0200)]
Explicitly remove long worm segments from the map
When a long worm was removed from the map, the segments for that worm
retained their map location info. This caused problems later on if
wormgone (or toss_wsegs) was called, because it would try to remove the
segments of that worm from the map.
Pasi Kallinen [Mon, 19 Nov 2018 19:27:19 +0000 (21:27 +0200)]
Long worm may get killed in middle of action
If long worm attacks you, and you have a passive response that may
kill the worm (eg. blue jelly), the worm may die in the middle of
a loop checking for a worm segment that can attack. This'll cause
a segfault because the worm segments will get freed.
Pasi Kallinen [Mon, 19 Nov 2018 19:24:08 +0000 (21:24 +0200)]
Moving long worms may still put tail in old location
When using rloc and friends to move monsters, and the monster
happens to be a long worm, the tail may get randomly placed
in the same place where the long worm was removed from.
In the cases where we expect the location to really be free,
explicitly recheck the location for a monster after rloc.
Pasi Kallinen [Sat, 17 Nov 2018 17:59:09 +0000 (19:59 +0200)]
Fix vault guard not considering monsters in walls
Two different cases here: a) Vault guard did not move away monsters
except if they were standing on gold, and b) moving away monsters
on a completely filled level did not work
Pasi Kallinen [Sat, 17 Nov 2018 17:26:49 +0000 (19:26 +0200)]
Fix freeing monsters not on map
Sometimes we free the monster data, but the monster is not on the
map - usually this happens if the map is full of monsters and a new one
is migrated on the level.
Make m_detach check the monster x coordinate, so it knows not to touch the map
if the monster isn't on it.
PatR [Mon, 19 Nov 2018 02:48:59 +0000 (18:48 -0800)]
fix #H7573 - impossible zero payment in money2mon
When paying for shop door or wall damage, if the entire amount was
covered by shop credit then impossible "zero payment in money2mon"
would occur as the shop code tried to transfer 0 zorkmids from hero
to shopkeeper after using credit to pay.
Bart House [Sun, 18 Nov 2018 07:56:31 +0000 (23:56 -0800)]
Build curses if PDCurses is available.
There are two ways to enable curses in the build. Either set the
environment variable PDCURSES to a folder containing a PDCurses repository
OR place the PDCurses folder alongside the NetHack source repository.