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

@@ -118,11 +118,7 @@ moverock()
/* Give them a chance to climb over it? */
return -1;
}
if (verysmall(youmonst.data)
#ifdef STEED
&& !u.usteed
#endif
) {
if (verysmall(youmonst.data) && !u.usteed) {
if (Blind) feel_location(sx, sy);
pline("You're too small to push that %s.", xname(otmp));
goto cannot_push;
@@ -159,10 +155,7 @@ moverock()
}
if (flags.verbose)
pline("Perhaps that's why %s cannot move it.",
#ifdef STEED
u.usteed ? y_monnam(u.usteed) :
#endif
"you");
u.usteed ? y_monnam(u.usteed) : "you");
goto cannot_push;
}
@@ -231,13 +224,11 @@ moverock()
/* trap didn't work; skip "disappears" message */
goto dopush;
}
#ifdef STEED
if (u.usteed)
pline("%s pushes %s and suddenly it disappears!",
upstart(y_monnam(u.usteed)), the(xname(otmp)));
pline("%s pushes %s and suddenly it disappears!",
upstart(y_monnam(u.usteed)), the(xname(otmp)));
else
#endif
You("push %s and suddenly it disappears!",
You("push %s and suddenly it disappears!",
the(xname(otmp)));
if (ttmp->ttyp == TELEP_TRAP) {
(void)rloco(otmp);
@@ -279,19 +270,15 @@ moverock()
static NEARDATA long lastmovetime;
#endif
dopush:
#ifdef STEED
if (!u.usteed) {
#endif
if (moves > lastmovetime+2 || moves < lastmovetime)
pline("With %s effort you move %s.",
throws_rocks(youmonst.data) ? "little" : "great",
the(xname(otmp)));
exercise(A_STR, TRUE);
#ifdef STEED
} else
pline("%s moves %s.",
upstart(y_monnam(u.usteed)), the(xname(otmp)));
#endif
lastmovetime = moves;
}
@@ -307,24 +294,19 @@ moverock()
}
} else {
nopushmsg:
#ifdef STEED
if (u.usteed)
pline("%s tries to move %s, but cannot.",
upstart(y_monnam(u.usteed)), the(xname(otmp)));
else
#endif
You("try to move %s, but in vain.", the(xname(otmp)));
if (Blind) feel_location(sx, sy);
cannot_push:
if (throws_rocks(youmonst.data)) {
#ifdef STEED
if (u.usteed && P_SKILL(P_RIDING) < P_BASIC) {
You("aren't skilled enough to %s %s from %s.",
(flags.pickup && !Sokoban) ? "pick up" : "push aside",
the(xname(otmp)), y_monnam(u.usteed));
} else
#endif
{
} else {
pline("However, you can easily %s.",
(flags.pickup && !Sokoban) ?
"pick it up" : "push it aside");
@@ -334,11 +316,7 @@ moverock()
break;
}
if (
#ifdef STEED
!u.usteed &&
#endif
(((!invent || inv_weight() <= -850) &&
if (!u.usteed && (((!invent || inv_weight() <= -850) &&
(!u.dx || !u.dy || (IS_ROCK(levl[u.ux][sy].typ)
&& IS_ROCK(levl[sx][u.uy].typ))))
|| verysmall(youmonst.data))) {
@@ -693,13 +671,10 @@ int mode;
You("try to ooze under the door, but can't squeeze your possessions through.");
else if (x == ux || y == uy) {
if (Blind || Stunned || ACURR(A_DEX) < 10 || Fumbling) {
#ifdef STEED
if (u.usteed) {
You_cant("lead %s through that closed door.",
y_monnam(u.usteed));
} else
#endif
{
} else {
pline("Ouch! You bump into a door.");
exercise(A_DEX, FALSE);
}
@@ -1001,9 +976,7 @@ struct trap *desttrap; /* nonnull if another trap at <x,y> */
{
boolean anchored;
const char *predicament, *culprit;
#ifdef STEED
char *steedname = !u.usteed ? (char *)0 : y_monnam(u.usteed);
#endif
if (!u.utrap) return TRUE; /* sanity check */
@@ -1011,11 +984,9 @@ struct trap *desttrap; /* nonnull if another trap at <x,y> */
case TT_BEARTRAP:
if (flags.verbose) {
predicament = "caught in a bear trap";
#ifdef STEED
if (u.usteed)
Norep("%s is %s.", upstart(steedname), predicament);
else
#endif
Norep("You are %s.", predicament);
}
/* [why does diagonal movement give quickest escape?] */
@@ -1037,41 +1008,33 @@ struct trap *desttrap; /* nonnull if another trap at <x,y> */
if (--u.utrap) {
if (flags.verbose) {
predicament = "stuck to the web";
#ifdef STEED
if (u.usteed)
Norep("%s is %s.", upstart(steedname), predicament);
Norep("%s is %s.", upstart(steedname), predicament);
else
#endif
Norep("You are %s.", predicament);
Norep("You are %s.", predicament);
}
} else {
#ifdef STEED
if (u.usteed)
pline("%s breaks out of the web.", upstart(steedname));
else
#endif
You("disentangle yourself.");
}
break;
case TT_LAVA:
if (flags.verbose) {
predicament = "stuck in the lava";
#ifdef STEED
if (u.usteed)
Norep("%s is %s.", upstart(steedname), predicament);
else
#endif
Norep("You are %s.", predicament);
}
if (!is_lava(x, y)) {
u.utrap--;
if ((u.utrap & 0xff) == 0) {
u.utrap = 0;
#ifdef STEED
if (u.usteed)
You("lead %s to the edge of the lava.", steedname);
else
#endif
You("pull yourself to the edge of the lava.");
}
}
@@ -1106,7 +1069,6 @@ struct trap *desttrap; /* nonnull if another trap at <x,y> */
predicament = "stuck in the";
culprit = surface(u.ux, u.uy);
}
#ifdef STEED
if (u.usteed) {
if (anchored)
Norep("You and %s are %s %s.", steedname,
@@ -1115,16 +1077,13 @@ struct trap *desttrap; /* nonnull if another trap at <x,y> */
Norep("%s is %s %s.", upstart(steedname),
predicament, culprit);
} else
#endif
Norep("You are %s %s.", predicament, culprit);
Norep("You are %s %s.", predicament, culprit);
}
} else {
#ifdef STEED
if (u.usteed)
pline("%s finally %s free.", upstart(steedname),
!anchored ? "lurches" : "wrenches the ball");
else
#endif
You("finally %s free.",
!anchored ? "wriggle" : "wrench the ball");
if (anchored)
@@ -1419,12 +1378,10 @@ domove()
newsym(x, y);
}
/* not attacking an animal, so we try to move */
#ifdef STEED
if ((u.dx || u.dy) && u.usteed && stucksteed(FALSE)) {
nomul(0);
return;
}
#endif
if(!youmonst.data->mmove) {
You("are rooted %s.",
Levitation || Is_airlevel(&u.uz) || Is_waterlevel(&u.uz) ?
@@ -1456,14 +1413,12 @@ domove()
mtmp = m_at(x, y);
u.ux += u.dx;
u.uy += u.dy;
#ifdef STEED
/* Move your steed, too */
if (u.usteed) {
u.usteed->mx = u.ux;
u.usteed->my = u.uy;
exercise_steed();
}
#endif
/*
* If safepet at destination then move the pet to the hero's
@@ -1662,11 +1617,8 @@ invocation_message()
struct obj *otmp = carrying(CANDELABRUM_OF_INVOCATION);
nomul(0); /* stop running or travelling */
#ifdef STEED
if (u.usteed) Sprintf(buf, "beneath %s", y_monnam(u.usteed));
else
#endif
if (Levitation || Flying) Strcpy(buf, "beneath you");
else if (Levitation || Flying) Strcpy(buf, "beneath you");
else Sprintf(buf, "under your %s", makeplural(body_part(FOOT)));
You_feel("a strange vibration %s.", buf);
@@ -1752,7 +1704,6 @@ boolean newspot; /* true if called by spoteffects */
/* check for entering water or lava */
if (!u.ustuck && !Levitation && !Flying &&
is_pool_or_lava(u.ux, u.uy)) {
#ifdef STEED
if (u.usteed && (is_flyer(u.usteed->data) ||
is_floater(u.usteed->data) || is_clinger(u.usteed->data))) {
/* floating or clinging steed keeps hero safe (is_flyer() test
@@ -1770,7 +1721,6 @@ boolean newspot; /* true if called by spoteffects */
return TRUE;
}
/* not mounted */
#endif /* STEED */
/* drown(),lava_effects() return true if hero changes
location while surviving the problem */
@@ -2266,10 +2216,8 @@ dopickup()
if (!can_reach_floor(TRUE)) {
if (traphere && uteetering_at_seen_pit(traphere))
You("cannot reach the bottom of the pit.");
#ifdef STEED
else if (u.usteed && P_SKILL(P_RIDING) < P_BASIC)
rider_cant_reach();
#endif
else if (Blind && !can_reach_floor(TRUE))
You("cannot reach anything here.");
else
@@ -2578,9 +2526,7 @@ weight_cap()
}
if (Levitation || Is_airlevel(&u.uz) /* pugh@cornell */
#ifdef STEED
|| (u.usteed && strongmonst(u.usteed->data))
#endif
)
carrcap = MAX_CARR_CAP;
else {