fix #K3938 - sleeping monster tamed by thrown food

Player reported that a cat which was asleep in a treasure zoo would
catch and eat thrown food, becoming tamed in the process, without
waking up.

Temporary sleep was handled (via checking for !mon->mcanmove) but
indefinite sleep wasn't.  Make a monster hit by taming effect (either
magic or thrown food) wake up from indefinite sleep.  For temporary
sleep, the remaining duration is cut in half.  The timeout isn't
dropped all the way to 0 because a monster with mon->mfrozen set
isn't necessarily asleep.  That timeout is shared by timed sleep,
timed paralysis, and busy time when donning armor.
This commit is contained in:
PatR
2023-06-27 08:51:29 -07:00
parent e1bae750de
commit ab0de251cd
2 changed files with 15 additions and 3 deletions

View File

@@ -1210,6 +1210,9 @@ add a level arrival region to the Gnone King's Wine Cellar variation of the
Mines' End level so that hero can't end up in the treature chamber
make potion of water become discovered if dipping a carried container into an
uncursed one reports that water gets inside or slides right off
a monster which was temporarily asleep wouldn't be affected by taming (either
food or magic), but one that was indefinitely asleep would be; when
tamable via food, it even caught and ate the food without waking up
Fixes to 3.7.0-x General Problems Exposed Via git Repository