Make STEED unconditional.

This commit is contained in:
Sean Hunt
2015-02-13 21:23:56 -05:00
committed by Pasi Kallinen
parent aba6ecb7b3
commit 9759f5bf6d
62 changed files with 98 additions and 641 deletions

View File

@@ -148,9 +148,7 @@ struct monst *
makedog()
{
register struct monst *mtmp;
#ifdef STEED
register struct obj *otmp;
#endif
const char *petname;
int pettype;
static int petname_used = 0;
@@ -179,7 +177,6 @@ makedog()
if(!mtmp) return((struct monst *) 0); /* pets were genocided */
context.startingpet_mid = mtmp->m_id;
#ifdef STEED
/* Horses already wear a saddle */
if (pettype == PM_PONY && !!(otmp = mksobj(SADDLE, TRUE, FALSE))) {
if (mpickobj(mtmp, otmp))
@@ -190,7 +187,6 @@ makedog()
otmp->leashmon = mtmp->m_id;
update_mon_intrinsics(mtmp, otmp, TRUE, TRUE);
}
#endif
if (!petname_used++ && *petname)
mtmp = christen_monst(mtmp, petname);
@@ -323,10 +319,8 @@ boolean with_you;
mtmp->mtrack[0].x = mtmp->mtrack[0].y = 0;
mtmp->mtrack[1].x = mtmp->mtrack[1].y = 0;
#ifdef STEED
if (mtmp == u.usteed)
return; /* don't place steed on the map */
#endif
if (with_you) {
/* When a monster accompanies you, sometimes it will arrive
at your intended destination and you'll end up next to
@@ -575,24 +569,20 @@ boolean pets_only; /* true for ascension or final escape */
only if in range. -3. */
(u.uhave.amulet && mtmp->iswiz))
&& ((!mtmp->msleeping && mtmp->mcanmove)
#ifdef STEED
/* eg if level teleport or new trap, steed has no control
to avoid following */
|| (mtmp == u.usteed)
#endif
)
/* monster won't follow if it hasn't noticed you yet */
&& !(mtmp->mstrategy & STRAT_WAITFORU)) {
stay_behind = FALSE;
if (mtmp->mtrapped) (void)mintrap(mtmp); /* try to escape */
#ifdef STEED
if (mtmp == u.usteed) {
/* make sure steed is eligible to accompany hero */
mtmp->mtrapped = 0; /* escape trap */
mtmp->meating = 0; /* terminate eating */
mdrop_special_objs(mtmp); /* drop Amulet */
} else
#endif
if (mtmp->meating || mtmp->mtrapped) {
if (canseemon(mtmp))
pline("%s is still %s.", Monnam(mtmp),
@@ -612,14 +602,12 @@ boolean pets_only; /* true for ascension or final escape */
: "Its");
m_unleash(mtmp, FALSE);
}
#ifdef STEED
if (mtmp == u.usteed) {
/* can't happen unless someone makes a change
which scrambles the stay_behind logic above */
impossible("steed left behind?");
dismount_steed(DISMOUNT_GENERIC);
}
#endif
continue;
}
if (mtmp->isshk)
@@ -980,9 +968,7 @@ boolean was_dead;
/* a life-saved monster might be leashed;
don't leave it that way if it's no longer tame */
if (mtmp->mleashed) m_unleash(mtmp, TRUE);
#ifdef STEED
if (mtmp == u.usteed) dismount_steed(DISMOUNT_THROWN);
#endif
} else if (edog) {
/* it's still a pet; start a clean pet-slate now */
edog->revivals++;