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...
This commit is contained in:
Pasi Kallinen
2022-03-05 18:30:30 +02:00
parent 0dec6cad34
commit 785463ba31

View File

@@ -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))