From 96f6c520824842c75d3b3d6c9e942147357feb8c Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Fri, 8 Jul 2022 10:47:00 +0300 Subject: [PATCH] Trapped monster cannot move to swallow another The swallower kept their trapped-state, but could be moved to another location. Just deal with it by not letting a trapped monster swallow. --- src/mhitm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mhitm.c b/src/mhitm.c index b2bbf6526..b9b2b5ac2 100644 --- a/src/mhitm.c +++ b/src/mhitm.c @@ -722,8 +722,8 @@ engulf_target(struct monst *magr, struct monst *mdef) if (mdef->data->msize >= MZ_HUGE) return FALSE; - /* can't swallow trapped monsters. TODO: could do some? */ - if (mdef->mtrapped) + /* can't (move to) swallow if trapped. TODO: could do some? */ + if (mdef->mtrapped || magr->mtrapped) return FALSE; /* (hypothetical) engulfers who can pass through walls aren't