From 785463ba31f2f29d29f7b23c2499fda5d8f4d9ce Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Sat, 5 Mar 2022 18:30:30 +0200 Subject: [PATCH] Can't swallow trapped monsters Gulping can move the trapped monster to another location, while still being marked as trapped. I don't want to deal with this, so just say purple worms can't swallow trapped monsters... --- src/mhitm.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/mhitm.c b/src/mhitm.c index f6c0bcbf6..4d7c4957d 100644 --- a/src/mhitm.c +++ b/src/mhitm.c @@ -717,6 +717,10 @@ 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) + return FALSE; + /* (hypothetical) engulfers who can pass through walls aren't limited by rock|trees|bars */ if ((magr == &g.youmonst) ? Passes_walls : passes_walls(magr->data))