sleeping steeds (trunk only)
From the newsgroup: it was possible to saddle, mount, and ride on a sleeping jabberwork without it ever waking up. Movement was checking for timed sleep (!mon->mcanmove, set when mon->mfrozen contains a timer count for either sleep or paralysis) but not indefinite sleep (mon->msleeping). This moves the checking into its own routine which handles both types. And it gives monsters a chance to wake up when they get saddled or mounted.
This commit is contained in:
18
src/do.c
18
src/do.c
@@ -755,13 +755,9 @@ dodown()
|
||||
}
|
||||
|
||||
#ifdef STEED
|
||||
if (u.usteed && !u.usteed->mcanmove) {
|
||||
pline("%s won't move!", Monnam(u.usteed));
|
||||
return(0);
|
||||
} else if (u.usteed && u.usteed->meating) {
|
||||
pline("%s is still eating.", Monnam(u.usteed));
|
||||
return(0);
|
||||
} else
|
||||
if (stucksteed(TRUE)) {
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
if (Levitation) {
|
||||
if ((HLevitation & I_SPECIAL) || (ELevitation & W_ARTI)) {
|
||||
@@ -875,13 +871,9 @@ doup()
|
||||
return(0);
|
||||
}
|
||||
#ifdef STEED
|
||||
if (u.usteed && !u.usteed->mcanmove) {
|
||||
pline("%s won't move!", Monnam(u.usteed));
|
||||
if (stucksteed(TRUE)) {
|
||||
return(0);
|
||||
} else if (u.usteed && u.usteed->meating) {
|
||||
pline("%s is still eating.", Monnam(u.usteed));
|
||||
return(0);
|
||||
} else
|
||||
}
|
||||
#endif
|
||||
if(u.ustuck) {
|
||||
You("are %s, and cannot go up.",
|
||||
|
||||
Reference in New Issue
Block a user