more sleeping monster

Extend the PR#660 change that shows whether a monster is asleep when
examined by farlook/quicklook/autodescribe to monsters that aren't
moving due to timed sleep as well as those that are asleep for an
unspecified amount of time.  Unfortunately 'mfrozen' isn't specific
about why a monster can't move so the phrasing is less than ideal.
This commit is contained in:
PatR
2022-02-22 12:12:13 -08:00
parent 407e515d7a
commit 82accf9169
3 changed files with 20 additions and 4 deletions
+13 -2
View File
@@ -359,11 +359,22 @@ look_at_monster(char *buf,
Strcat(buf, (Upolyd && sticks(g.youmonst.data))
? ", being held" : ", holding you");
}
if (mtmp->msleeping)
/* if mtmp isn't able to move (other than because it is a type of
monster that never moves), say so [excerpt from mstatusline() for
stethoscope or wand of probing] */
if (mtmp->mfrozen)
/* unfortunately mfrozen covers temporary sleep and being busy
(donning armor, for instance) as well as paralysis */
Strcat(buf, ", can't move (paralyzed or sleeping or busy)");
else if (mtmp->msleeping)
/* sleeping for an indeterminate duration */
Strcat(buf, ", asleep");
else if ((mtmp->mstrategy & STRAT_WAITMASK) != 0)
/* arbitrary reason why it isn't moving */
Strcat(buf, ", meditating");
if (mtmp->mleashed)
Strcat(buf, ", leashed to you");
if (mtmp->mtrapped && cansee(mtmp->mx, mtmp->my)) {
struct trap *t = t_at(mtmp->mx, mtmp->my);
int tt = t ? t->ttyp : NO_TRAP;