There's a chance that a tactics-using monster (eg. arch-lich)
teleporting next to you on a full level would get booted off
into limbo. After that, if the monster tried using an item
in the same action you'd get panic "relmon: mon not in list"
Fix this particular case by checking monster mstate.
Other cases may lurk in other places that eventually call mnexto.
/* Monsters that want to acquire things */
/* may teleport, so do it before inrange is set */
- if (is_covetous(mdat))
+ if (is_covetous(mdat)) {
(void) tactics(mtmp);
+ /* tactics -> mnexto -> deal_with_overcrowding */
+ if (mtmp->mstate)
+ return 0;
+ }
/* check distance and scariness of attacks */
distfleeck(mtmp, &inrange, &nearby, &scared);