Not sure if this can actually happen in a non-modified game, but
my fuzz testing stopped here, so deal with it.
If a polymorphing monster turns into an earth elemental or other
wall-phasing monster, it can wander into a non-diggable area, and
then turn into a tunneling monster.
This caused mdig_tunnel to issue an impossible.
}
/* possibly dig */
- if (can_tunnel && mdig_tunnel(mtmp))
+ if (can_tunnel && may_dig(mtmp->mx, mtmp->my)
+ && mdig_tunnel(mtmp))
return 2; /* mon died (position already updated) */
/* set also in domove(), hack.c */