Add helpless monster macro

This commit is contained in:
Pasi Kallinen
2022-03-18 10:19:04 +02:00
parent 480ba917a1
commit 39acd095b2
21 changed files with 66 additions and 68 deletions
+5 -5
View File
@@ -383,7 +383,7 @@ kick_steed(void)
return;
/* [ALI] Various effects of kicking sleeping/paralyzed steeds */
if (u.usteed->msleeping || !u.usteed->mcanmove) {
if (helpless(u.usteed)) {
/* We assume a message has just been output of the form
* "You kick <steed>."
*/
@@ -398,7 +398,7 @@ kick_steed(void)
u.usteed->mfrozen = 0;
u.usteed->mcanmove = 1;
}
if (u.usteed->msleeping || !u.usteed->mcanmove)
if (helpless(u.usteed))
pline("%s stirs.", He);
else
/* if hallucinating, might yield "He rouses herself" or
@@ -707,7 +707,7 @@ static void
maybewakesteed(struct monst* steed)
{
int frozen = (int) steed->mfrozen;
boolean wasimmobile = steed->msleeping || !steed->mcanmove;
boolean wasimmobile = helpless(steed);
steed->msleeping = 0;
if (frozen) {
@@ -721,7 +721,7 @@ maybewakesteed(struct monst* steed)
steed->mfrozen = frozen;
}
}
if (wasimmobile && !steed->msleeping && steed->mcanmove)
if (wasimmobile && !helpless(steed))
pline("%s wakes up.", Monnam(steed));
/* regardless of waking, terminate any meal in progress */
finish_meating(steed);
@@ -736,7 +736,7 @@ stucksteed(boolean checkfeeding)
if (steed) {
/* check whether steed can move */
if (steed->msleeping || !steed->mcanmove) {
if (helpless(steed)) {
pline("%s won't move!", upstart(y_monnam(steed)));
return TRUE;
}