The bug was that you could easily displace peaceful sleeping monsters.
The source of this was that there was no check for sleeping in the
attack() function that checks for immobilization.
As well as adding the sleeping check, this logic is modified so that it
makes more sense: if a monster is immobilized at all (sleeping, frozen,
or mcanmove = 0) it always "doesn't seem to move!" You can't randomly
displace it anyway 1/6 of the time.
Sessile monsters who are otherwise not immobilized don't move 5/6 of the
time, but can be displaced with the other 1/6.
You("stop. %s is in the way!", buf);
end_running(TRUE);
return TRUE;
- } else if ((mtmp->mfrozen || (!mtmp->mcanmove)
- || (mtmp->data->mmove == 0)) && rn2(6)) {
+ } else if (mtmp->mfrozen || mtmp->msleeping || (!mtmp->mcanmove)
+ || (mtmp->data->mmove == 0 && rn2(6))) {
pline("%s doesn't seem to move!", Monnam(mtmp));
end_running(TRUE);
return TRUE;