hiding under a cockatrice corpse
Reported a while back, a (stonable) hiding monster will hide at a location containing only a cockatrice corpse. While it would be interesting to allow monsters to try, and stone themselves as a result, I chose the simpler fix which is to not have monsters hide in such situations. I found the hiding code was duplicated in several places, so I moved it into a new hideunder() function that works for both the hero and monsters.
This commit is contained in:
@@ -1181,9 +1181,7 @@ postmov:
|
||||
usually set mundetected unless monster can't move. */
|
||||
if (mtmp->mundetected ||
|
||||
(mtmp->mcanmove && !mtmp->msleeping && rn2(5)))
|
||||
mtmp->mundetected = (ptr->mlet != S_EEL) ?
|
||||
OBJ_AT(mtmp->mx, mtmp->my) :
|
||||
(is_pool(mtmp->mx, mtmp->my) && !Is_waterlevel(&u.uz));
|
||||
(void) hideunder(mtmp);
|
||||
newsym(mtmp->mx, mtmp->my);
|
||||
}
|
||||
if (mtmp->isshk) {
|
||||
|
||||
Reference in New Issue
Block a user