Fixes and sanity checks for monster undetected and trapped states

Adds sanity checks for mtrapped and mundetected states.

Fixes cases where those were left in wrong state.

1. Trapped monster (eg. a nymph) teleported out of a trap
2. Monster was hiding under ball or chain, which then got removed
3. While restoring a level, a zombie corpse revived while monster
   was hiding under it
4. A general case where the only object was deleted off floor and
   a monster was hiding under it

Monsters hiding under ball or chain will now get revealed when
the b or c are moved.
This commit is contained in:
Pasi Kallinen
2020-11-24 19:26:12 +02:00
parent 43379bffcc
commit 229930e505
7 changed files with 53 additions and 2 deletions

View File

@@ -1514,6 +1514,7 @@ E void FDECL(seemimic, (struct monst *));
E void NDECL(rescham);
E void NDECL(restartcham);
E void FDECL(restore_cham, (struct monst *));
E void FDECL(maybe_unhide_at, (XCHAR_P, XCHAR_P));
E boolean FDECL(hideunder, (struct monst *));
E void FDECL(hide_monst, (struct monst *));
E void FDECL(mon_animal_list, (BOOLEAN_P));