]> granicus.if.org Git - nethack/commitdiff
Fix purple worm ending up in solid wall
authorPasi Kallinen <paxed@alt.org>
Sat, 28 Mar 2020 09:40:39 +0000 (11:40 +0200)
committerPasi Kallinen <paxed@alt.org>
Sat, 28 Mar 2020 09:40:42 +0000 (11:40 +0200)
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
src/mhitm.c

index d9c52681e906404390b165cb6f36465f161519d9..6af69fff2bddc650044f342c69ed810b9ef590d4 100644 (file)
@@ -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
index 8083944bdec08f20fc48f8575a36fad19d95d8fe..18655f46c4a3cb9081de3deb4ad44a32cd06ae6f 100644 (file)
@@ -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 <dx,dy> and might encounter trouble there */