fix issue #836 - engulfing mounter hero
Reported by copperwater: if an engulfer swallowed a mounted hero, odd things could happen if the hero dismounted. The steed would be silently expelled and float-down flooreffects were attempted. It turns out that if the engulfer is classified as an animal (so purple worm, lurker above, trapper), the hero got "plucked from <steed>'s saddle" and was forcibly dismounted prior to completing the engulf operation, but non-animals (vortices, air elemental, ocher jelly, Juiblex) swallowed the hero+steed intact. The most straightforward fix to dismounting-while-engulfed issues is to change engulfing to always pluck the hero from the saddle even when the engulfer isn't an animal. If there's no room on the level to place the former steed, it gets killed off. I looked at changing that to put the steed into limbo, waiting to migrate back to the current level if hero leaves and subsequently returns, but that breaks movemon()'s assumption that when monsters are in the process of moving, only the currently moving one can be taken off the fmon list to be placed on migrating_mons. [The recently added monster knockback code violates that assumption too when knocking the victim into a level changer trap. It needs to be fixed in one fashion or another.]
This commit is contained in:
@@ -1559,6 +1559,7 @@ extern void mon_to_stone(struct monst *);
|
||||
extern void m_into_limbo(struct monst *);
|
||||
extern void migrate_mon(struct monst *, coordxy, coordxy);
|
||||
extern void mnexto(struct monst *, unsigned);
|
||||
extern void deal_with_overcrowding(struct monst *);
|
||||
extern void maybe_mnexto(struct monst *);
|
||||
extern int mnearto(struct monst *, coordxy, coordxy, boolean, unsigned);
|
||||
extern void m_respond(struct monst *);
|
||||
@@ -1571,7 +1572,9 @@ extern void seemimic(struct monst *);
|
||||
extern void normal_shape(struct monst *);
|
||||
extern void iter_mons(void (*)(struct monst *));
|
||||
extern struct monst *get_iter_mons(boolean (*)(struct monst *));
|
||||
extern struct monst *get_iter_mons_xy(boolean (*)(struct monst *, coordxy, coordxy), coordxy, coordxy);
|
||||
extern struct monst *get_iter_mons_xy(boolean (*)(struct monst *,
|
||||
coordxy, coordxy),
|
||||
coordxy, coordxy);
|
||||
extern void rescham(void);
|
||||
extern void restartcham(void);
|
||||
extern void restore_cham(struct monst *);
|
||||
|
||||
Reference in New Issue
Block a user