From b8668da3ea5b7d17bcdf8266d48f11396c521fa4 Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Sat, 28 Mar 2020 11:40:39 +0200 Subject: [PATCH] Fix purple worm ending up in solid wall If you're in a vault, the vault guard enters, and your tame purple worm swallows and kills the guard, the worm ended up inside the vault wall. Instead return the attacker to the old location, if the defender's position isn't good. --- doc/fixes37.0 | 1 + src/mhitm.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/doc/fixes37.0 b/doc/fixes37.0 index d9c52681e..6af69fff2 100644 --- a/doc/fixes37.0 +++ b/doc/fixes37.0 @@ -94,6 +94,7 @@ unicorn corpses and wraith corpses could be sacrificed even if "too old" hero polymorphed into a hider and hiding was not unhidden when teleporting impose tighter restraints on 'summon nasties', both for spellcasting monsters and post-Wizard harassment +prevent swallowing monster ending up in a solid wall if it killed vault guard Fixes to 3.7.0-x Problems that Were Exposed Via git Repository diff --git a/src/mhitm.c b/src/mhitm.c index 8083944bd..18655f46c 100644 --- a/src/mhitm.c +++ b/src/mhitm.c @@ -765,6 +765,8 @@ register struct attack *mattk; * magr from level.monsters[mdef->mx][mdef->my]. We need to * put it back and display it. -kd */ + if (!goodpos(dx, dy, magr, MM_IGNOREWATER)) + dx = ax, dy = ay; place_monster(magr, dx, dy); newsym(dx, dy); /* aggressor moves to and might encounter trouble there */ -- 2.50.1