Fix: monster hurtling and liquid

A monster hurtling over liquid would drown immediately the instant it
touched the first square of water, even if normally it would have kept
moving (e.g. hurtling over a short moat).  Additionally, its placement
on liquid would not take into consideration other monsters, so it could
overwrite an existing monster on that spot and lead to an impossible,
and/or two monsters occupying a single position.

Fix these issues, so that liquid effects like drowning only happen if
the monster ends up in liquid at the end of the hurtle, and so that
other monsters in the way will stop it early even if they're floating
over or swimming on a pool/water/lava square.

Also use canspotmon instead of canseemon for the wiztelekinesis debug
command.
This commit is contained in:
Michael Meyer
2022-02-23 12:58:43 -05:00
committed by Pasi Kallinen
parent 8e91320d2f
commit 1e951db9bc
4 changed files with 12 additions and 16 deletions

View File

@@ -297,6 +297,7 @@ typedef struct sortloot_item Loot;
* to make an extra call to goodpos()] */
#define GP_ALLOW_U 0x100000L /* don't reject hero's location */
#define MM_NOEXCLAM 0x200000L /* more sedate "<mon> appears." mesg for ^G */
#define MM_IGNORELAVA 0x400000L /* ignore lava when positioning */
/* flags for make_corpse() and mkcorpstat(); 0..7 are recorded in obj->spe */
#define CORPSTAT_NONE 0x00