Reported by elunna: a monster trapped in a pit or web that was
adjacent to a polymorph trap could enter that trap to change shape.
It would remain flagged as trapped but there's no way to escape
from a polymorph trap so it would be stuck.
Fix supplied by entrez: when a monster is picking MUSE strategy,
don't allow it choose "enter polymorph trap" if it is currently
trapped.
I entered the changes from the diff manually and added a bunch of
minor formatting bits.
Fixes#972
Issue reported for a hardfought player by k2: dying in a shop wall
produced "place_object: <item> [0] off map <0,0>" when hero's invent
was dropped. It happened in Mine Town where multiple shopkeepers are
present and it is possible to have two shops share a wall.
I could not reprouce the problem, even after setting up--and dying
various times at a gap in--a wall shared by two shops.
paybill() -> inherits() -> set_repo_loc() sets up the destination
prior to disclosure and finish_paybill() -> drop_upon_death() later
places invent at the spot iff bones are going to he saved. inherits()
is convoluted and evidently took at least one path that failed to
call set_repo_loc(). Change it to always call set_repo_loc() when
returning 'True' so that the destination should always be set if
really_done() calls finish_paybill().
Some followups by entrez are probably still useful.
Closes#965
Add "walls of lava", basically lava which blocks vision and
require a bit more than just levitation or flight to move through.
No levels use this yet, as testing isn't thorough enough.
The intuitive behavior of des.levregion or des.teleport_region when
"exclude" is left unspecified is that there is no exclusion area.
However, this wasn't actually the case: since l_get_lregion defaulted
the exclusion area to (0,0,0,0) and exclude_islev to 0, this meant that
the 0,0 space on the map would always be excluded from regions. In cases
where a region was specified with its inclusion area constrained to the
0,0 space of the map, this would create a "Couldn't place lregion"
impossible message.
This fixes that issue by defaulting the exclusion area to (-1,-1,-1,-1),
and if the exclusion area is left unspecified, forces exclude_islev=1.
This means that the exclusion zone will be outside the walkable space of
the level where it can't cause any problems.
If a level designer puts negative coordinates in their inclusion or
exclusion parameters, this might not work correctly, but negative region
coordinates aren't currently used anywhere and probably shouldn't be
supported anyway.
With sounds on, using #levelchange to drop more than one level only
gave the level-loss sound effect once. Level-gain sound was better
because the more verbose messaging triggered --More-- before moving
on. Have both gain and loss use urgent_pline() in case messages
are being suppressed due to ESC, and have both request --More-- to
make the player acknowledge the message. That has a side-effect of
letting the sound play to conclusion.
cppregex.cpp recently had `#include "extern.h"' added as the last
quoted include. That gets set to "" while collecting dependencies,
then preceded by a space when output. So the unexpected trailing
space was new and wasn't caused by a change of awk versions as I
was suspecting. This removes it.
Requires rebuild of your Makefiles via hints file (for new stock wav additions).
If you've been testing by copying the wav files manually to
~/Library/Sounds, you'll need to copy them again to pick up
the additional wav files.
Start to add supporting code to windsound and macsound. The latter
remains commented out because I haven't had a chance to try
it on macOS yet.
In order to test it out, I added two more stock sounds:
sa2_xplevelup and sa2_xpleveldown.
A detected cave spider was hiding under a generic spellbook object;
farlooking at it produced a segfault. OBJ_NAME is null for the generic
objects, so don't try to strcmp it.
For strength over 18, A_CURR(A_STR) can return up to 125, giving
the chance to break bars by hitting them with a warhammer a 50:50
chance. Switch to acurrstr() which returns at most 25.
Allow heavy iron balls (wielded or thrown, regardless of whether
they're chained to hero) to have a chance to break bars too. They
are slightly more complicated because they don't use obj->spe like
a weapon but are otherwise straightfoward.
Makefile.src didn't know about 'sndprocs.h' yet.
Something weird is going on with 'make depend'. It has started
adding a trailing space to
|$(TARGETPFX)cppregex.o: ../sys/share/cppregex.cpp $(CONFIG_H)
(actual trailing space omitted here). It's repeatable. I don't
understand it and have not tried to fix it, just removed the space
from the generated Makefile before putting into place as modified
Makefile.src and making this commit.
sanity_check feedback which occurred after using locking magic to
set off a bear trap at the location of a monster hiding under an
object.
Trivial bit: a recent change made stunning via knockback only occur
when not already stunned but was still adding the current stun time
to the new stun time even though current stun is now always zero.
Several formatting bits included.
When attached iron ball was in a pit (or a pool) with a monster,
and your levitation ended, you were put on top of the monster.
Add a sanity check for hero over monster.
While fuzzing, I saw a sanity checking error complaining about
a ceiling hider being on top of a pool; the rock piercer was
teleported on top of the pool while it was hiding in the ceiling.
Try to be a bit more consistent when a monster is hiding in ceiling,
and if it's valid for it to be on a pool.