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.
This commit is contained in:
Pasi Kallinen
2022-07-08 10:47:00 +03:00
parent 4c343d079a
commit 96f6c52082

View File

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