Make STEED unconditional.
This commit is contained in:
@@ -118,12 +118,10 @@ boolean resuming;
|
||||
(void) makemon((struct permonst *)0, 0, 0, NO_MM_FLAGS);
|
||||
|
||||
/* calculate how much time passed. */
|
||||
#ifdef STEED
|
||||
if (u.usteed && u.umoved) {
|
||||
/* your speed doesn't augment steed's speed */
|
||||
moveamt = mcalcmove(u.usteed);
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
moveamt = youmonst.data->mmove;
|
||||
|
||||
|
||||
+6
-36
@@ -302,7 +302,6 @@ use_stethoscope(obj)
|
||||
context.stethoscope_move = moves;
|
||||
context.stethoscope_movement = youmonst.movement;
|
||||
|
||||
#ifdef STEED
|
||||
if (u.usteed && u.dz > 0) {
|
||||
if (interference) {
|
||||
pline("%s interferes.", Monnam(u.ustuck));
|
||||
@@ -311,7 +310,6 @@ use_stethoscope(obj)
|
||||
mstatusline(u.usteed);
|
||||
return res;
|
||||
} else
|
||||
#endif
|
||||
if (u.uswallow && (u.dx || u.dy || u.dz)) {
|
||||
mstatusline(u.ustuck);
|
||||
return res;
|
||||
@@ -442,11 +440,9 @@ struct obj *obj;
|
||||
for(mtmp = fmon; mtmp; mtmp = nextmon) {
|
||||
nextmon = mtmp->nmon; /* trap might kill mon */
|
||||
if (DEADMONSTER(mtmp)) continue;
|
||||
#ifdef STEED
|
||||
/* steed is already at your location, so not affected;
|
||||
this avoids trap issues if you're on a trap location */
|
||||
if (mtmp == u.usteed) continue;
|
||||
#endif
|
||||
if (mtmp->mtame) {
|
||||
if (mtmp->mtrapped) {
|
||||
/* no longer in previous trap (affects mintrap) */
|
||||
@@ -550,13 +546,11 @@ struct obj *obj;
|
||||
if(!get_adjacent_loc((char *)0, (char *)0, u.ux, u.uy, &cc)) return;
|
||||
|
||||
if((cc.x == u.ux) && (cc.y == u.uy)) {
|
||||
#ifdef STEED
|
||||
if (u.usteed && u.dz > 0) {
|
||||
mtmp = u.usteed;
|
||||
spotmon = 1;
|
||||
goto got_target;
|
||||
}
|
||||
#endif
|
||||
pline("Leash yourself? Very funny...");
|
||||
return;
|
||||
}
|
||||
@@ -567,9 +561,7 @@ struct obj *obj;
|
||||
}
|
||||
|
||||
spotmon = canspotmon(mtmp);
|
||||
#ifdef STEED
|
||||
got_target:
|
||||
#endif
|
||||
|
||||
if(!mtmp->mtame) {
|
||||
if(!spotmon)
|
||||
@@ -648,10 +640,8 @@ next_to_u()
|
||||
}
|
||||
}
|
||||
}
|
||||
#ifdef STEED
|
||||
/* no pack mules for the Amulet */
|
||||
if (u.usteed && mon_has_amulet(u.usteed)) return FALSE;
|
||||
#endif
|
||||
return(TRUE);
|
||||
}
|
||||
|
||||
@@ -1388,12 +1378,10 @@ int magic; /* 0=Physical, otherwise skill level */
|
||||
} else if (!magic && !Jumping) {
|
||||
You_cant("jump very far.");
|
||||
return 0;
|
||||
#ifdef STEED
|
||||
/* if steed is immobile, can't do physical jump but can do spell one */
|
||||
} else if (!magic && u.usteed && stucksteed(FALSE)) {
|
||||
/* stucksteed gave "<steed> won't move" message */
|
||||
return 0;
|
||||
#endif
|
||||
} else if (u.uswallow) {
|
||||
if (magic) {
|
||||
You("bounce around a little.");
|
||||
@@ -1438,23 +1426,19 @@ int magic; /* 0=Physical, otherwise skill level */
|
||||
const char *bp = body_part(LEG);
|
||||
|
||||
if (wl == BOTH_SIDES) bp = makeplural(bp);
|
||||
#ifdef STEED
|
||||
if (u.usteed)
|
||||
pline("%s is in no shape for jumping.", Monnam(u.usteed));
|
||||
else
|
||||
#endif
|
||||
Your("%s%s %s in no shape for jumping.",
|
||||
(wl == LEFT_SIDE) ? "left " :
|
||||
(wl == RIGHT_SIDE) ? "right " : "",
|
||||
bp, (wl == BOTH_SIDES) ? "are" : "is");
|
||||
Your("%s%s %s in no shape for jumping.",
|
||||
(wl == LEFT_SIDE) ? "left " :
|
||||
(wl == RIGHT_SIDE) ? "right " : "",
|
||||
bp, (wl == BOTH_SIDES) ? "are" : "is");
|
||||
return 0;
|
||||
}
|
||||
#ifdef STEED
|
||||
else if (u.usteed && u.utrap) {
|
||||
pline("%s is stuck in a trap.", Monnam(u.usteed));
|
||||
return (0);
|
||||
}
|
||||
#endif
|
||||
|
||||
pline("Where do you want to jump?");
|
||||
cc.x = u.ux;
|
||||
@@ -2237,7 +2221,6 @@ struct obj *otmp;
|
||||
trapinfo.time_needed += (tmp > 12) ? 1 : (tmp > 7) ? 2 : 4;
|
||||
/*[fumbling and/or confusion and/or cursed object check(s)
|
||||
should be incorporated here instead of in set_trap]*/
|
||||
#ifdef STEED
|
||||
if (u.usteed && P_SKILL(P_RIDING) < P_BASIC) {
|
||||
boolean chance;
|
||||
|
||||
@@ -2267,7 +2250,6 @@ struct obj *otmp;
|
||||
return;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
You("begin setting %s%s.",
|
||||
shk_your(buf, otmp),
|
||||
defsyms[trap_to_defsym(what_trap(ttyp))].explanation);
|
||||
@@ -2369,19 +2351,13 @@ struct obj *obj;
|
||||
} else if ((!u.dx && !u.dy) || (u.dz > 0)) {
|
||||
int dam;
|
||||
|
||||
#ifdef STEED
|
||||
/* Sometimes you hit your steed by mistake */
|
||||
if (u.usteed && !rn2(proficient + 2)) {
|
||||
You("whip %s!", mon_nam(u.usteed));
|
||||
kick_steed();
|
||||
return 1;
|
||||
}
|
||||
#endif
|
||||
if (Levitation
|
||||
#ifdef STEED
|
||||
|| u.usteed
|
||||
#endif
|
||||
) {
|
||||
if (Levitation || u.usteed) {
|
||||
/* Have a shot at snaring something on the floor */
|
||||
otmp = level.objects[u.ux][u.uy];
|
||||
if (otmp && otmp->otyp == CORPSE && otmp->corpsenm == PM_HORSE) {
|
||||
@@ -3194,11 +3170,9 @@ doapply()
|
||||
case LEASH:
|
||||
use_leash(obj);
|
||||
break;
|
||||
#ifdef STEED
|
||||
case SADDLE:
|
||||
res = use_saddle(obj);
|
||||
break;
|
||||
#endif
|
||||
case MAGIC_WHISTLE:
|
||||
use_magic_whistle(obj);
|
||||
break;
|
||||
@@ -3336,11 +3310,7 @@ unfixable_trouble_count(is_horn)
|
||||
|
||||
if (Stoned) unfixable_trbl++;
|
||||
if (Strangled) unfixable_trbl++;
|
||||
if (Wounded_legs
|
||||
#ifdef STEED
|
||||
&& !u.usteed
|
||||
#endif
|
||||
) unfixable_trbl++;
|
||||
if (Wounded_legs && !u.usteed) unfixable_trbl++;
|
||||
if (Slimed) unfixable_trbl++;
|
||||
/* lycanthropy is not desirable, but it doesn't actually make you feel
|
||||
bad */
|
||||
|
||||
+1
-6
@@ -1687,10 +1687,7 @@ long *abil;
|
||||
long wornbits;
|
||||
long wornmask = (W_ARM | W_ARMC | W_ARMH | W_ARMS | W_ARMG | W_ARMF |
|
||||
W_WEP | W_QUIVER | W_SWAPWEP | W_ART | W_ARTI | W_AMUL |
|
||||
W_RINGL | W_RINGR | W_TOOL | W_BALL | W_CHAIN
|
||||
#ifdef STEED
|
||||
| W_SADDLE
|
||||
#endif
|
||||
W_RINGL | W_RINGR | W_TOOL | W_BALL | W_CHAIN | W_SADDLE
|
||||
#ifdef TOURIST
|
||||
| W_ARMU
|
||||
#endif
|
||||
@@ -1868,7 +1865,6 @@ int dropflag; /* 0==don't drop, 1==drop all, 2==drop weapon */
|
||||
/* check primary weapon next so that they're handled together */
|
||||
if (uwep) (void)untouchable(uwep, dropit);
|
||||
|
||||
#ifdef STEED
|
||||
/* in case someone is daft enough to add artifact or silver saddle */
|
||||
if (u.usteed && (obj = which_armor(u.usteed, W_SADDLE)) != 0) {
|
||||
/* untouchable() calls retouch_object() which expects an object in
|
||||
@@ -1876,7 +1872,6 @@ int dropflag; /* 0==don't drop, 1==drop all, 2==drop weapon */
|
||||
saddle and we're suppressing drop, so this works as intended */
|
||||
if (untouchable(obj, FALSE)) dismount_steed(DISMOUNT_THROWN);
|
||||
}
|
||||
#endif
|
||||
/*
|
||||
* TODO? Force off gloves if either or both rings are going to
|
||||
* become unworn; force off cloak [suit] before suit [shirt].
|
||||
|
||||
+2
-5
@@ -440,11 +440,8 @@ exerper()
|
||||
|
||||
if(Sick || Vomiting) exercise(A_CON, FALSE);
|
||||
if(Confusion || Hallucination) exercise(A_WIS, FALSE);
|
||||
if((Wounded_legs
|
||||
#ifdef STEED
|
||||
&& !u.usteed
|
||||
#endif
|
||||
) || Fumbling || HStun) exercise(A_DEX, FALSE);
|
||||
if((Wounded_legs && !u.usteed) || Fumbling || HStun)
|
||||
exercise(A_DEX, FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
-4
@@ -692,10 +692,7 @@ xchar x, y;
|
||||
register long side = rn2(3) ? LEFT_SIDE : RIGHT_SIDE;
|
||||
pline(pullmsg, "bear trap");
|
||||
set_wounded_legs(side, rn1(1000, 500));
|
||||
#ifdef STEED
|
||||
if (!u.usteed)
|
||||
#endif
|
||||
{
|
||||
if (!u.usteed) {
|
||||
Your("%s %s is severely damaged.",
|
||||
(side == LEFT_SIDE) ? "left" : "right",
|
||||
body_part(LEG));
|
||||
|
||||
@@ -1528,7 +1528,6 @@ int final;
|
||||
boolean magic = (mode & MAGICENLIGHTENMENT) ? TRUE : FALSE;
|
||||
int cap;
|
||||
char buf[BUFSZ], youtoo[BUFSZ];
|
||||
#ifdef STEED
|
||||
boolean Riding = (u.usteed &&
|
||||
/* if hero dies while dismounting, u.usteed will still
|
||||
be set; we want to ignore steed in that situation */
|
||||
@@ -1540,7 +1539,6 @@ int final;
|
||||
(char *)0,
|
||||
(SUPPRESS_SADDLE | SUPPRESS_HALLUCINATION),
|
||||
FALSE);
|
||||
#endif
|
||||
|
||||
/*\
|
||||
* Status (many are abbreviated on bottom line; others are or
|
||||
@@ -1553,7 +1551,6 @@ int final;
|
||||
/* not a traditional status but inherently obvious to player; more
|
||||
detail given below (attributes section) for magic enlightenment */
|
||||
if (Upolyd) you_are("transformed", "");
|
||||
#ifdef STEED
|
||||
/* not a trouble, but we want to display riding status before maybe
|
||||
reporting steed as trapped or hero stuck to cursed saddle */
|
||||
if (Riding) {
|
||||
@@ -1561,7 +1558,6 @@ int final;
|
||||
you_are(buf, "");
|
||||
Sprintf(eos(youtoo), "and %s ", steedname);
|
||||
}
|
||||
#endif /*STEED*/
|
||||
/* other movement situations that hero should always know */
|
||||
if (Levitation) {
|
||||
if (Lev_at_will && magic)
|
||||
@@ -1639,14 +1635,12 @@ int final;
|
||||
Sprintf(eos(predicament), " in %s",
|
||||
an(defsyms[trap_to_defsym(t->ttyp)].explanation));
|
||||
}
|
||||
#ifdef STEED
|
||||
if (u.usteed) { /* not `Riding' here */
|
||||
Sprintf(buf, "%s%s ", anchored ? "you and " : "", steedname);
|
||||
*buf = highc(*buf);
|
||||
enl_msg(buf, (anchored ? "are " : "is "),
|
||||
(anchored ? "were " : "was "), predicament, "");
|
||||
} else
|
||||
#endif /*STEED*/
|
||||
you_are(predicament, "");
|
||||
} /* (u.utrap) */
|
||||
if (u.uswallow) {
|
||||
@@ -1661,7 +1655,6 @@ int final;
|
||||
a_monnam(u.ustuck));
|
||||
you_are(buf, "");
|
||||
}
|
||||
#ifdef STEED
|
||||
if (Riding) {
|
||||
struct obj *saddle = which_armor(u.usteed, W_SADDLE);
|
||||
|
||||
@@ -1671,9 +1664,7 @@ int final;
|
||||
you_are(buf, "");
|
||||
}
|
||||
}
|
||||
#endif /*STEED*/
|
||||
if (Wounded_legs) {
|
||||
#ifdef STEED
|
||||
/* when mounted, Wounded_legs applies to steed rather than to
|
||||
hero; we only report steed's wounded legs in wizard mode */
|
||||
if (u.usteed) { /* not `Riding' here */
|
||||
@@ -1684,9 +1675,7 @@ int final;
|
||||
enl_msg(buf, " has", " had", " wounded legs", "");
|
||||
}
|
||||
# endif
|
||||
} else
|
||||
#endif /*STEED*/
|
||||
{
|
||||
} else {
|
||||
Sprintf(buf, "wounded %s", makeplural(body_part(LEG)));
|
||||
you_have(buf, "");
|
||||
}
|
||||
@@ -2474,9 +2463,7 @@ static const struct func_tab cmdlist[] = {
|
||||
{'r', FALSE, doread},
|
||||
{'R', FALSE, doremring},
|
||||
{M('r'), FALSE, dorub},
|
||||
#ifdef STEED
|
||||
{M('R'), FALSE, doride}, /* #ride */
|
||||
#endif
|
||||
{'s', TRUE, dosearch, "searching"},
|
||||
{'S', TRUE, dosave},
|
||||
{M('s'), FALSE, dosit},
|
||||
@@ -2553,9 +2540,7 @@ struct ext_func_tab extcmdlist[] = {
|
||||
#endif /* DUNGEON_OVERVIEW */
|
||||
{"pray", "pray to the gods for help", dopray, TRUE},
|
||||
{"quit", "exit without saving current game", done2, TRUE},
|
||||
#ifdef STEED
|
||||
{"ride", "ride (or stop riding) a monster", doride, FALSE},
|
||||
#endif
|
||||
{"rub", "rub a lamp or a stone", dorub, FALSE},
|
||||
{"sit", "sit down", dosit, FALSE},
|
||||
{"terrain", "show map without obstructions", doterrain, TRUE},
|
||||
|
||||
@@ -250,13 +250,11 @@ dig(VOID_ARGS)
|
||||
You("fumble and drop %s.", yname(uwep));
|
||||
dropx(uwep);
|
||||
} else {
|
||||
#ifdef STEED
|
||||
if (u.usteed)
|
||||
pline("%s and %s %s!",
|
||||
Yobjnam2(uwep, "bounce"), otense(uwep, "hit"),
|
||||
mon_nam(u.usteed));
|
||||
else
|
||||
#endif
|
||||
pline("Ouch! %s and %s you!",
|
||||
Yobjnam2(uwep, "bounce"), otense(uwep, "hit"));
|
||||
set_wounded_legs(RIGHT_SIDE, 5 + rnd(5));
|
||||
|
||||
+1
-3
@@ -1126,11 +1126,9 @@ see_monsters()
|
||||
warn_obj_cnt = new_warn_obj_cnt;
|
||||
}
|
||||
|
||||
#ifdef STEED
|
||||
/* when mounted, hero's location gets caught by monster loop */
|
||||
if (!u.usteed)
|
||||
#endif
|
||||
newsym(u.ux, u.uy);
|
||||
newsym(u.ux, u.uy);
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -80,11 +80,9 @@ boolean pushing;
|
||||
char whobuf[BUFSZ];
|
||||
|
||||
Strcpy(whobuf, "you");
|
||||
#ifdef STEED
|
||||
if (u.usteed) Strcpy(whobuf, y_monnam(u.usteed));
|
||||
#endif
|
||||
pline("%s %s %s into the %s.", upstart(whobuf),
|
||||
vtense(whobuf, "push"), the(xname(otmp)), what);
|
||||
pline("%s %s %s into the %s.", upstart(whobuf),
|
||||
vtense(whobuf, "push"), the(xname(otmp)), what);
|
||||
if (flags.verbose && !Blind)
|
||||
pline("Now you can cross it!");
|
||||
/* no splashing in this case */
|
||||
@@ -434,14 +432,12 @@ register const char *word;
|
||||
body_part(HAND));
|
||||
return(FALSE);
|
||||
}
|
||||
#ifdef STEED
|
||||
if (obj->owornmask & W_SADDLE) {
|
||||
if (*word)
|
||||
You("cannot %s %s you are sitting on.", word,
|
||||
something);
|
||||
return (FALSE);
|
||||
}
|
||||
#endif
|
||||
return(TRUE);
|
||||
}
|
||||
|
||||
@@ -801,11 +797,9 @@ dodown()
|
||||
return 1;
|
||||
}
|
||||
|
||||
#ifdef STEED
|
||||
if (stucksteed(TRUE)) {
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
/* Levitation might be blocked, but player can still use '>' to
|
||||
turn off controlled levitaiton */
|
||||
if (HLevitation || ELevitation) {
|
||||
@@ -924,11 +918,9 @@ doup()
|
||||
You_cant("go up here.");
|
||||
return(0);
|
||||
}
|
||||
#ifdef STEED
|
||||
if (stucksteed(TRUE)) {
|
||||
return(0);
|
||||
}
|
||||
#endif
|
||||
if(u.ustuck) {
|
||||
You("are %s, and cannot go up.",
|
||||
!u.uswallow ? "being held" : is_animal(u.ustuck->data) ?
|
||||
@@ -1267,12 +1259,10 @@ boolean at_stairs, falling, portal;
|
||||
freeinv(uball);
|
||||
}
|
||||
}
|
||||
#ifdef STEED
|
||||
/* falling off steed has its own losehp() call */
|
||||
if (u.usteed)
|
||||
dismount_steed(DISMOUNT_FELL);
|
||||
else
|
||||
#endif
|
||||
losehp(Maybe_Half_Phys(rnd(3)),
|
||||
at_ladder ? "falling off a ladder" :
|
||||
"tumbling down a flight of stairs",
|
||||
@@ -1305,11 +1295,7 @@ boolean at_stairs, falling, portal;
|
||||
|
||||
initrack();
|
||||
|
||||
if ((mtmp = m_at(u.ux, u.uy)) != 0
|
||||
#ifdef STEED
|
||||
&& mtmp != u.usteed
|
||||
#endif
|
||||
) {
|
||||
if ((mtmp = m_at(u.ux, u.uy)) != 0 && mtmp != u.usteed) {
|
||||
/* There's a monster at your target destination; it might be one
|
||||
which accompanied you--see mon_arrive(dogmove.c)--or perhaps
|
||||
it was already here. Randomly move you to an adjacent spot
|
||||
@@ -1746,9 +1732,7 @@ heal_legs()
|
||||
context.botl = 1;
|
||||
}
|
||||
|
||||
#ifdef STEED
|
||||
if (!u.usteed)
|
||||
#endif
|
||||
{
|
||||
const char *legs = body_part(LEG);
|
||||
|
||||
|
||||
@@ -329,20 +329,16 @@ do_mname()
|
||||
cy = cc.y;
|
||||
|
||||
if (cx == u.ux && cy == u.uy) {
|
||||
#ifdef STEED
|
||||
if (u.usteed && canspotmon(u.usteed))
|
||||
mtmp = u.usteed;
|
||||
else {
|
||||
#endif
|
||||
pline("This %s creature is called %s and cannot be renamed.",
|
||||
ACURR(A_CHA) > 14 ?
|
||||
(flags.female ? "beautiful" : "handsome") :
|
||||
"ugly",
|
||||
plname);
|
||||
return;
|
||||
#ifdef STEED
|
||||
}
|
||||
#endif
|
||||
} else
|
||||
mtmp = m_at(cx, cy);
|
||||
|
||||
@@ -678,9 +674,7 @@ boolean called;
|
||||
do_it = !canspotmon(mtmp) &&
|
||||
article != ARTICLE_YOUR &&
|
||||
!program_state.gameover &&
|
||||
#ifdef STEED
|
||||
mtmp != u.usteed &&
|
||||
#endif
|
||||
!(u.uswallow && mtmp == u.ustuck) &&
|
||||
!(suppress & SUPPRESS_IT);
|
||||
do_saddle = !(suppress & SUPPRESS_SADDLE);
|
||||
@@ -746,11 +740,9 @@ boolean called;
|
||||
Strcat(strcat(buf, adjective), " ");
|
||||
if (do_invis)
|
||||
Strcat(buf, "invisible ");
|
||||
#ifdef STEED
|
||||
if (do_saddle && (mtmp->misc_worn_check & W_SADDLE) &&
|
||||
!Blind && !Hallucination)
|
||||
Strcat(buf, "saddled ");
|
||||
#endif
|
||||
if (buf[0] != 0)
|
||||
has_adjectives = TRUE;
|
||||
else
|
||||
@@ -898,10 +890,8 @@ struct monst *mtmp;
|
||||
|
||||
prefix = mtmp->mtame ? ARTICLE_YOUR : ARTICLE_THE;
|
||||
suppression_flag = (has_mname(mtmp)
|
||||
#ifdef STEED
|
||||
/* "saddled" is redundant when mounted */
|
||||
|| mtmp == u.usteed
|
||||
#endif
|
||||
) ? SUPPRESS_SADDLE : 0;
|
||||
|
||||
return x_monnam(mtmp, prefix, (char *)0, suppression_flag, FALSE);
|
||||
|
||||
@@ -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++;
|
||||
|
||||
+4
-12
@@ -354,11 +354,7 @@ register struct edog *edog;
|
||||
stop_occupation();
|
||||
} else if (monstermoves > edog->hungrytime + 750 || mtmp->mhp < 1) {
|
||||
dog_died:
|
||||
if (mtmp->mleashed
|
||||
#ifdef STEED
|
||||
&& mtmp != u.usteed
|
||||
#endif
|
||||
)
|
||||
if (mtmp->mleashed && mtmp != u.usteed)
|
||||
Your("leash goes slack.");
|
||||
else if (cansee(mtmp->mx, mtmp->my))
|
||||
pline("%s starves.", Monnam(mtmp));
|
||||
@@ -453,11 +449,9 @@ int after, udist, whappr;
|
||||
xchar otyp;
|
||||
int appr;
|
||||
|
||||
#ifdef STEED
|
||||
/* Steeds don't move on their own will */
|
||||
if (mtmp == u.usteed)
|
||||
return (-2);
|
||||
#endif
|
||||
|
||||
omx = mtmp->mx;
|
||||
omy = mtmp->my;
|
||||
@@ -626,7 +620,6 @@ register int after; /* this is extra fast monster movement */
|
||||
if (has_edog && dog_hunger(mtmp, edog)) return(2); /* starved */
|
||||
|
||||
udist = distu(omx,omy);
|
||||
#ifdef STEED
|
||||
/* Let steeds eat and maybe throw rider during Conflict */
|
||||
if (mtmp == u.usteed) {
|
||||
if (Conflict && !resist(mtmp, RING_CLASS, 0, 0)) {
|
||||
@@ -634,10 +627,9 @@ register int after; /* this is extra fast monster movement */
|
||||
return (1);
|
||||
}
|
||||
udist = 1;
|
||||
} else
|
||||
#endif
|
||||
/* maybe we tamed him while being swallowed --jgm */
|
||||
if (!udist) return(0);
|
||||
} else if (!udist)
|
||||
/* maybe we tamed him while being swallowed --jgm */
|
||||
return(0);
|
||||
|
||||
nix = omx; /* set before newdogpos */
|
||||
niy = omy;
|
||||
|
||||
@@ -716,7 +716,6 @@ dokick()
|
||||
} else if (verysmall(youmonst.data)) {
|
||||
You("are too small to do any kicking.");
|
||||
no_kick = TRUE;
|
||||
#ifdef STEED
|
||||
} else if (u.usteed) {
|
||||
if (yn_function("Kick your steed?", ynchars, 'y') == 'y') {
|
||||
You("kick %s.", mon_nam(u.usteed));
|
||||
@@ -725,7 +724,6 @@ dokick()
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
} else if (Wounded_legs) {
|
||||
/* note: jump() has similar code */
|
||||
long wl = (EWounded_legs & BOTH_SIDES);
|
||||
|
||||
@@ -1002,13 +1002,11 @@ boolean twoweap; /* used to restore twoweapon mode if wielded weapon returns */
|
||||
u.twoweap = twoweap;
|
||||
} else if (u.dz < 0) {
|
||||
(void) toss_up(obj, rn2(5) && !Underwater);
|
||||
#ifdef STEED
|
||||
} else if (u.dz > 0 && u.usteed &&
|
||||
obj->oclass == POTION_CLASS && rn2(6)) {
|
||||
/* alternative to prayer or wand of opening/spell of knock
|
||||
for dealing with cursed saddle: throw holy water > */
|
||||
potionhit(u.usteed, obj, TRUE);
|
||||
#endif
|
||||
} else {
|
||||
hitfloor(obj);
|
||||
}
|
||||
|
||||
@@ -1148,10 +1148,8 @@ int x, y;
|
||||
#ifdef CLIPPING
|
||||
cliparound(u.ux, u.uy);
|
||||
#endif
|
||||
#ifdef STEED
|
||||
/* ridden steed always shares hero's location */
|
||||
if (u.usteed) u.usteed->mx = u.ux, u.usteed->my = u.uy;
|
||||
#endif
|
||||
/* when changing levels, don't leave old position set with
|
||||
stale values from previous level */
|
||||
if (!on_level(&u.uz, &u.uz0)) u.ux0 = u.ux, u.uy0 = u.uy;
|
||||
|
||||
@@ -1017,10 +1017,8 @@ register int pm;
|
||||
u.uconduct.polyselfs++; /* you're changing form */
|
||||
You_cant("resist the temptation to mimic %s.",
|
||||
Hallucination ? "an orange" : "a pile of gold");
|
||||
#ifdef STEED
|
||||
/* A pile of gold can't ride. */
|
||||
if (u.usteed) dismount_steed(DISMOUNT_FELL);
|
||||
#endif
|
||||
nomul(-tmp);
|
||||
Sprintf(buf, Hallucination ?
|
||||
"You suddenly dread being peeled and mimic %s again!" :
|
||||
@@ -1540,9 +1538,7 @@ struct obj *obj;
|
||||
what = "you lose control of", where = "yourself";
|
||||
else
|
||||
what = "you slap against the", where =
|
||||
#ifdef STEED
|
||||
(u.usteed) ? "saddle" :
|
||||
#endif
|
||||
surface(u.ux,u.uy);
|
||||
pline_The("world spins and %s %s.", what, where);
|
||||
incr_itimeout(&HDeaf, duration);
|
||||
@@ -2337,11 +2333,7 @@ doeat() /* generic "eat" command funtion (see cmd.c) */
|
||||
} else if (!is_edible(otmp)) {
|
||||
You("cannot eat that!");
|
||||
return 0;
|
||||
} else if ((otmp->owornmask & (W_ARMOR|W_TOOL|W_AMUL
|
||||
#ifdef STEED
|
||||
|W_SADDLE
|
||||
#endif
|
||||
)) != 0) {
|
||||
} else if ((otmp->owornmask & (W_ARMOR|W_TOOL|W_AMUL|W_SADDLE)) != 0) {
|
||||
/* let them eat rings */
|
||||
You_cant("eat %s you're wearing.", something);
|
||||
return 0;
|
||||
@@ -2844,9 +2836,7 @@ floorfood(verb,corpsecheck) /* get food from floor or pack */
|
||||
|
||||
/* if we can't touch floor objects then use invent food only */
|
||||
if (!can_reach_floor(TRUE) ||
|
||||
#ifdef STEED
|
||||
(feeding && u.usteed) || /* can't eat off floor while riding */
|
||||
#endif
|
||||
(is_pool_or_lava(u.ux, u.uy) &&
|
||||
(Wwalking || is_clinger(youmonst.data) ||
|
||||
(Flying && !Breathless))))
|
||||
|
||||
@@ -140,10 +140,8 @@ boolean check_pit;
|
||||
struct trap *t;
|
||||
|
||||
if (u.uswallow) return FALSE;
|
||||
#ifdef STEED
|
||||
/* Restricted/unskilled riders can't reach the floor */
|
||||
if (u.usteed && P_SKILL(P_RIDING) < P_BASIC) return FALSE;
|
||||
#endif
|
||||
if (check_pit && (t = t_at(u.ux, u.uy)) != 0 &&
|
||||
uteetering_at_seen_pit(t) && !Flying)
|
||||
return FALSE;
|
||||
|
||||
@@ -167,10 +167,8 @@ int expltype;
|
||||
}
|
||||
/* can be both you and mtmp if you're swallowed */
|
||||
mtmp = m_at(i+x-1, j+y-1);
|
||||
#ifdef STEED
|
||||
if (!mtmp && i+x-1 == u.ux && j+y-1 == u.uy)
|
||||
mtmp = u.usteed;
|
||||
#endif
|
||||
if (mtmp) {
|
||||
if (mtmp->mhp < 1) explmask[i][j] = 2;
|
||||
else switch(adtyp) {
|
||||
@@ -275,10 +273,8 @@ int expltype;
|
||||
type, &shopdamage, exploding_wand_typ);
|
||||
|
||||
mtmp = m_at(i+x-1, j+y-1);
|
||||
#ifdef STEED
|
||||
if (!mtmp && i+x-1 == u.ux && j+y-1 == u.uy)
|
||||
mtmp = u.usteed;
|
||||
#endif
|
||||
if (!mtmp) continue;
|
||||
if (do_hallu) {
|
||||
/* replace "gas spore" with a different description
|
||||
|
||||
+12
-66
@@ -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 {
|
||||
|
||||
+2
-9
@@ -1252,10 +1252,7 @@ is_worn(otmp)
|
||||
register struct obj *otmp;
|
||||
{
|
||||
return((boolean)(!!(otmp->owornmask & (W_ARMOR | W_RING | W_AMUL | W_TOOL |
|
||||
#ifdef STEED
|
||||
W_SADDLE |
|
||||
#endif
|
||||
W_WEP | W_SWAPWEP | W_QUIVER))));
|
||||
W_SADDLE | W_WEP | W_SWAPWEP | W_QUIVER))));
|
||||
}
|
||||
|
||||
/* extra xprname() input that askchain() can't pass through safe_qbuf() */
|
||||
@@ -2803,11 +2800,7 @@ STATIC_OVL boolean
|
||||
tool_in_use(obj)
|
||||
struct obj *obj;
|
||||
{
|
||||
if ((obj->owornmask & (W_TOOL
|
||||
#ifdef STEED
|
||||
| W_SADDLE
|
||||
#endif
|
||||
)) != 0L) return TRUE;
|
||||
if ((obj->owornmask & (W_TOOL | W_SADDLE)) != 0L) return TRUE;
|
||||
if (obj->oclass != TOOL_CLASS) return FALSE;
|
||||
return (boolean)(obj == uwep || obj->lamplit ||
|
||||
(obj->otyp == LEASH && obj->leashmon));
|
||||
|
||||
+2
-10
@@ -749,19 +749,11 @@ doclose() /* try to close a door */
|
||||
}
|
||||
|
||||
if(door->doormask == D_ISOPEN) {
|
||||
if(verysmall(youmonst.data)
|
||||
#ifdef STEED
|
||||
&& !u.usteed
|
||||
#endif
|
||||
) {
|
||||
if(verysmall(youmonst.data) && !u.usteed) {
|
||||
pline("You're too small to push the door closed.");
|
||||
return res;
|
||||
}
|
||||
if (
|
||||
#ifdef STEED
|
||||
u.usteed ||
|
||||
#endif
|
||||
rn2(25) < (ACURRSTR+ACURR(A_DEX)+ACURR(A_CON))/3) {
|
||||
if ( u.usteed || rn2(25) < (ACURRSTR+ACURR(A_DEX)+ACURR(A_CON))/3) {
|
||||
pline_The("door closes.");
|
||||
door->doormask = D_CLOSED;
|
||||
if (Blind)
|
||||
|
||||
+1
-9
@@ -405,12 +405,10 @@ mattackm(magr, mdef)
|
||||
break;
|
||||
|
||||
case AT_ENGL:
|
||||
#ifdef STEED
|
||||
if (u.usteed && (mdef == u.usteed)) {
|
||||
strike = 0;
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
/* Engulfing attacks are directed at the hero if
|
||||
* possible. -dlc
|
||||
*/
|
||||
@@ -956,11 +954,7 @@ mdamagem(magr, mdef, mattk)
|
||||
if (vis) Strcpy(mdef_Monnam, Monnam(mdef));
|
||||
mdef->mstrategy &= ~STRAT_WAITFORU;
|
||||
(void) rloc(mdef, FALSE);
|
||||
if (vis && !canspotmon(mdef)
|
||||
#ifdef STEED
|
||||
&& mdef != u.usteed
|
||||
#endif
|
||||
)
|
||||
if (vis && !canspotmon(mdef) && mdef != u.usteed)
|
||||
pline("%s suddenly disappears!", mdef_Monnam);
|
||||
}
|
||||
break;
|
||||
@@ -1117,12 +1111,10 @@ mdamagem(magr, mdef, mattk)
|
||||
Strcpy(mdefnambuf, x_monnam(mdef, ARTICLE_THE, (char *)0, 0, FALSE));
|
||||
|
||||
otmp = obj;
|
||||
#ifdef STEED
|
||||
if (u.usteed == mdef &&
|
||||
otmp == which_armor(mdef, W_SADDLE))
|
||||
/* "You can no longer ride <steed>." */
|
||||
dismount_steed(DISMOUNT_POLY);
|
||||
#endif
|
||||
obj_extract_self(otmp);
|
||||
if (otmp->owornmask) {
|
||||
mdef->misc_worn_check &= ~otmp->owornmask;
|
||||
|
||||
+2
-10
@@ -323,7 +323,6 @@ mattacku(mtmp)
|
||||
if(u.uinvulnerable) return (0); /* stomachs can't hurt you! */
|
||||
}
|
||||
|
||||
#ifdef STEED
|
||||
else if (u.usteed) {
|
||||
if (mtmp == u.usteed)
|
||||
/* Your steed won't attack you */
|
||||
@@ -343,7 +342,6 @@ mattacku(mtmp)
|
||||
return (!!(mattackm(u.usteed, mtmp) & MM_DEF_DIED));
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
if (u.uundetected && !range2 && foundyou && !u.uswallow) {
|
||||
if (!canspotmon(mtmp)) map_invisible(mtmp->mx, mtmp->my);
|
||||
@@ -1145,11 +1143,7 @@ dopois:
|
||||
* still _can_ attack you when you're flying or mounted.
|
||||
* [FIXME: why can't a flying attacker overcome this?]
|
||||
*/
|
||||
if (
|
||||
#ifdef STEED
|
||||
u.usteed ||
|
||||
#endif
|
||||
Levitation || Flying) {
|
||||
if (u.usteed || Levitation || Flying) {
|
||||
pline("%s tries to reach your %s %s!", Monnam(mtmp),
|
||||
sidestr, body_part(LEG));
|
||||
dmg = 0;
|
||||
@@ -1664,7 +1658,6 @@ gulpmu(mtmp, mattk) /* monster swallows you, or damage if u.uswallow */
|
||||
place_monster(mtmp, u.ux, u.uy);
|
||||
u.ustuck = mtmp;
|
||||
newsym(mtmp->mx,mtmp->my);
|
||||
#ifdef STEED
|
||||
if (is_animal(mtmp->data) && u.usteed) {
|
||||
char buf[BUFSZ];
|
||||
/* Too many quirks presently if hero and steed
|
||||
@@ -1676,8 +1669,7 @@ gulpmu(mtmp, mattk) /* monster swallows you, or damage if u.uswallow */
|
||||
Monnam(mtmp), buf);
|
||||
dismount_steed(DISMOUNT_ENGULFED);
|
||||
} else
|
||||
#endif
|
||||
pline("%s engulfs you!", Monnam(mtmp));
|
||||
pline("%s engulfs you!", Monnam(mtmp));
|
||||
stop_occupation();
|
||||
reset_occupations(); /* behave as if you had moved */
|
||||
|
||||
|
||||
@@ -337,12 +337,10 @@ register struct monst *mtmp;
|
||||
!is_flyer(mtmp->data) && !is_floater(mtmp->data);
|
||||
infountain = IS_FOUNTAIN(levl[mtmp->mx][mtmp->my].typ);
|
||||
|
||||
#ifdef STEED
|
||||
/* Flying and levitation keeps our steed out of the liquid */
|
||||
/* (but not water-walking or swimming) */
|
||||
if (mtmp == u.usteed && (Flying || Levitation))
|
||||
return (0);
|
||||
#endif
|
||||
|
||||
/* Gremlin multiplying won't go on forever since the hit points
|
||||
* keep going down, and when it gets to 1 hit point the clone
|
||||
@@ -449,15 +447,12 @@ struct monst *mon;
|
||||
else if (mon->mspeed == MFAST)
|
||||
mmove = (4 * mmove + 2) / 3;
|
||||
|
||||
#ifdef STEED
|
||||
if (mon == u.usteed) {
|
||||
if (u.ugallop && context.mv) {
|
||||
/* average movement is 1.50 times normal */
|
||||
mmove = ((rn2(2) ? 4 : 5) * mmove) / 3;
|
||||
}
|
||||
} else
|
||||
#endif
|
||||
if (mmove) {
|
||||
} else if (mmove) {
|
||||
/* vary movement points allocated to slightly reduce predictability;
|
||||
random increment (avg +2) exceeds random decrement (avg +1) by
|
||||
a small amount; normal speed monsters will occasionally get an
|
||||
@@ -958,10 +953,8 @@ struct obj *otmp;
|
||||
(otyp != BELL_OF_OPENING || !is_covetous(mdat)))
|
||||
return FALSE;
|
||||
|
||||
#ifdef STEED
|
||||
/* Steeds don't pick up stuff (to avoid shop abuse) */
|
||||
if (mtmp == u.usteed) return (FALSE);
|
||||
#endif
|
||||
if (mtmp->isshk) return(TRUE); /* no limit */
|
||||
if (mtmp->mpeaceful && !mtmp->mtame) return(FALSE);
|
||||
/* otherwise players might find themselves obligated to violate
|
||||
@@ -1313,10 +1306,8 @@ register struct monst *mtmp, *mtmp2;
|
||||
relmon(mtmp, (struct monst **)0);
|
||||
|
||||
/* finish adding its replacement */
|
||||
#ifdef STEED
|
||||
if (mtmp == u.usteed) ; else /* don't place steed onto the map */
|
||||
#endif
|
||||
place_monster(mtmp2, mtmp2->mx, mtmp2->my);
|
||||
if (mtmp != u.usteed) /* don't place steed onto the map */
|
||||
place_monster(mtmp2, mtmp2->mx, mtmp2->my);
|
||||
if (mtmp2->wormno) /* update level.monsters[wseg->wx][wseg->wy] */
|
||||
place_wsegs(mtmp2); /* locations to mtmp2 not mtmp. */
|
||||
if (emits_light(mtmp2->data)) {
|
||||
@@ -1330,9 +1321,7 @@ register struct monst *mtmp, *mtmp2;
|
||||
mtmp2->nmon = fmon;
|
||||
fmon = mtmp2;
|
||||
if (u.ustuck == mtmp) u.ustuck = mtmp2;
|
||||
#ifdef STEED
|
||||
if (u.usteed == mtmp) u.usteed = mtmp2;
|
||||
#endif
|
||||
if (mtmp2->isshk) replshk(mtmp,mtmp2);
|
||||
|
||||
/* discard the old monster */
|
||||
@@ -1597,11 +1586,9 @@ register struct monst *mtmp;
|
||||
need to do this after life-saving and before m_detach() */
|
||||
if (mtmp->isgd && !grddead(mtmp)) return;
|
||||
|
||||
#ifdef STEED
|
||||
/* Player is thrown from his steed when it dies */
|
||||
if (mtmp == u.usteed)
|
||||
dismount_steed(DISMOUNT_GENERIC);
|
||||
#endif
|
||||
|
||||
mptr = mtmp->data; /* save this for m_detach() */
|
||||
/* restore chameleon, lycanthropes to true form at death */
|
||||
@@ -1748,11 +1735,9 @@ mongone(mdef)
|
||||
register struct monst *mdef;
|
||||
{
|
||||
mdef->mhp = 0; /* can skip some inventory bookkeeping */
|
||||
#ifdef STEED
|
||||
/* Player is thrown from his steed when it disappears */
|
||||
if (mdef == u.usteed)
|
||||
dismount_steed(DISMOUNT_GENERIC);
|
||||
#endif
|
||||
|
||||
/* drop special items like the Amulet so that a dismissed Kop or nurse
|
||||
can't remove them from the game */
|
||||
@@ -2121,14 +2106,12 @@ mnexto(mtmp) /* Make monster mtmp next to you (if possible) */
|
||||
coord mm;
|
||||
boolean couldspot = canspotmon(mtmp);
|
||||
|
||||
#ifdef STEED
|
||||
if (mtmp == u.usteed) {
|
||||
/* Keep your steed in sync with you instead */
|
||||
mtmp->mx = u.ux;
|
||||
mtmp->my = u.uy;
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
if(!enexto(&mm, u.ux, u.uy, mtmp->data)) return;
|
||||
rloc_to(mtmp, mm.x, mm.y);
|
||||
|
||||
@@ -791,9 +791,7 @@ boolean
|
||||
levl_follower(mtmp)
|
||||
struct monst *mtmp;
|
||||
{
|
||||
#ifdef STEED
|
||||
if (mtmp == u.usteed) return TRUE;
|
||||
#endif
|
||||
|
||||
/* Wizard with Amulet won't bother trying to follow across levels */
|
||||
if (mtmp->iswiz && mon_has_amulet(mtmp)) return FALSE;
|
||||
|
||||
@@ -618,12 +618,8 @@ TOOL("crystal ball", "glass orb",
|
||||
TOOL("lenses", (char *)0, 1, 0, 0, 0, 5, 3, 80, GLASS, HI_GLASS),
|
||||
TOOL("blindfold", (char *)0, 1, 0, 0, 0, 50, 2, 20, CLOTH, CLR_BLACK),
|
||||
TOOL("towel", (char *)0, 1, 0, 0, 0, 50, 2, 50, CLOTH, CLR_MAGENTA),
|
||||
#ifdef STEED
|
||||
TOOL("saddle", (char *)0, 1, 0, 0, 0, 5,200, 150, LEATHER, HI_LEATHER),
|
||||
TOOL("leash", (char *)0, 1, 0, 0, 0, 65, 12, 20, LEATHER, HI_LEATHER),
|
||||
#else
|
||||
TOOL("leash", (char *)0, 1, 0, 0, 0, 70, 12, 20, LEATHER, HI_LEATHER),
|
||||
#endif
|
||||
TOOL("stethoscope", (char *)0, 1, 0, 0, 0, 25, 4, 75, IRON, HI_METAL),
|
||||
TOOL("tinning kit", (char *)0, 1, 0, 0, 1, 15,100, 30, IRON, HI_METAL),
|
||||
TOOL("tin opener", (char *)0, 1, 0, 0, 0, 35, 4, 30, IRON, HI_METAL),
|
||||
|
||||
+1
-5
@@ -772,11 +772,7 @@ plus:
|
||||
/* weptools already get this done when we go to the +n code */
|
||||
if (!is_weptool(obj))
|
||||
add_erosion_words(obj, prefix);
|
||||
if(obj->owornmask & (W_TOOL /* blindfold */
|
||||
#ifdef STEED
|
||||
| W_SADDLE
|
||||
#endif
|
||||
)) {
|
||||
if(obj->owornmask & (W_TOOL /* blindfold */ | W_SADDLE)) {
|
||||
Strcat(bp, " (being worn)");
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -65,10 +65,8 @@ char *outbuf;
|
||||
/* being blinded may hide invisibility from self */
|
||||
(Invis && (senseself() || !Blind)) ? "invisible " : "",
|
||||
race, mons[u.umonnum].mname, plname);
|
||||
#ifdef STEED
|
||||
if (u.usteed)
|
||||
Sprintf(eos(outbuf), ", mounted on %s", y_monnam(u.usteed));
|
||||
#endif
|
||||
return outbuf;
|
||||
}
|
||||
|
||||
|
||||
@@ -1516,11 +1516,9 @@ boolean looting; /* loot vs tip */
|
||||
const char *verb = looting ? "loot" : "tip";
|
||||
|
||||
if (!can_reach_floor(TRUE)) {
|
||||
#ifdef STEED
|
||||
if (u.usteed && P_SKILL(P_RIDING) < P_BASIC)
|
||||
rider_cant_reach(); /* not skilled enough to reach */
|
||||
else
|
||||
#endif
|
||||
cant_reach_floor(x, y, FALSE, TRUE);
|
||||
return FALSE;
|
||||
} else if ((is_pool(x, y) && (looting || !Underwater)) ||
|
||||
@@ -1777,7 +1775,6 @@ boolean *prev_loot;
|
||||
{
|
||||
int c = -1;
|
||||
int timepassed = 0;
|
||||
#ifdef STEED
|
||||
struct obj *otmp;
|
||||
char qbuf[QBUFSZ];
|
||||
|
||||
@@ -1816,7 +1813,6 @@ boolean *prev_loot;
|
||||
return (0);
|
||||
}
|
||||
}
|
||||
#endif /* STEED */
|
||||
/* 3.4.0 introduced the ability to pick things up from within swallower's stomach */
|
||||
if (u.uswallow) {
|
||||
int count = passed_info ? *passed_info : 0;
|
||||
|
||||
+1
-6
@@ -401,9 +401,7 @@ register struct monst *mtmp;
|
||||
", digesting you" :
|
||||
is_animal(u.ustuck->data) ? ", swallowing you" :
|
||||
", engulfing you");
|
||||
#ifdef STEED
|
||||
if (mtmp == u.usteed) Strcat(info, ", carrying you");
|
||||
#endif
|
||||
|
||||
/* avoid "Status of the invisible newt ..., invisible" */
|
||||
/* and unlike a normal mon_nam, use "saddled" even if it has a name */
|
||||
@@ -451,10 +449,7 @@ ustatusline()
|
||||
} /* note: "goop" == "glop"; variation is intentional */
|
||||
}
|
||||
if (Stunned) Strcat(info, ", stunned");
|
||||
#ifdef STEED
|
||||
if (!u.usteed)
|
||||
#endif
|
||||
if (Wounded_legs) {
|
||||
if (!u.usteed && Wounded_legs) {
|
||||
const char *what = body_part(LEG);
|
||||
if ((Wounded_legs & BOTH_SIDES) == BOTH_SIDES)
|
||||
what = makeplural(what);
|
||||
|
||||
@@ -691,7 +691,6 @@ int mntmp;
|
||||
|
||||
if (!sticky && !u.uswallow && u.ustuck && sticks(youmonst.data)) u.ustuck = 0;
|
||||
else if (sticky && !sticks(youmonst.data)) uunstick();
|
||||
#ifdef STEED
|
||||
if (u.usteed) {
|
||||
if (touch_petrifies(u.usteed->data) &&
|
||||
!Stone_resistance && rnl(3)) {
|
||||
@@ -704,7 +703,6 @@ int mntmp;
|
||||
}
|
||||
if (!can_ride(u.usteed)) dismount_steed(DISMOUNT_POLY);
|
||||
}
|
||||
#endif
|
||||
|
||||
if (flags.verbose) {
|
||||
static const char use_thec[] = "Use the command #%s to %s.";
|
||||
|
||||
+5
-31
@@ -90,11 +90,9 @@ boolean talk;
|
||||
}
|
||||
if (xtime && !old) {
|
||||
if (talk) {
|
||||
#ifdef STEED
|
||||
if (u.usteed)
|
||||
You("wobble in the saddle.");
|
||||
else
|
||||
#endif
|
||||
You("%s...", stagger(youmonst.data, "stagger"));
|
||||
}
|
||||
}
|
||||
@@ -676,10 +674,8 @@ peffects(otmp)
|
||||
else {
|
||||
if (Levitation || Is_airlevel(&u.uz)||Is_waterlevel(&u.uz))
|
||||
You("are motionlessly suspended.");
|
||||
#ifdef STEED
|
||||
else if (u.usteed)
|
||||
You("are frozen in place!");
|
||||
#endif
|
||||
else
|
||||
Your("%s are frozen to the %s!",
|
||||
makeplural(body_part(FOOT)), surface(u.ux, u.uy));
|
||||
@@ -814,11 +810,8 @@ peffects(otmp)
|
||||
}
|
||||
break;
|
||||
case POT_SPEED:
|
||||
if(Wounded_legs && !otmp->cursed
|
||||
#ifdef STEED
|
||||
&& !u.usteed /* heal_legs() would heal steeds legs */
|
||||
#endif
|
||||
) {
|
||||
if(Wounded_legs && !otmp->cursed && !u.usteed) {
|
||||
/* heal_legs() would heal steeds legs */
|
||||
heal_legs();
|
||||
unkn++;
|
||||
break;
|
||||
@@ -1143,10 +1136,8 @@ boolean your_fault;
|
||||
register const char *botlnam = bottlename();
|
||||
boolean isyou = (mon == &youmonst);
|
||||
int distance;
|
||||
#ifdef STEED
|
||||
struct obj *saddle = (struct obj *)0;
|
||||
boolean hit_saddle = FALSE;
|
||||
#endif
|
||||
|
||||
if(isyou) {
|
||||
distance = 0;
|
||||
@@ -1154,7 +1145,6 @@ boolean your_fault;
|
||||
botlnam, body_part(HEAD));
|
||||
losehp(Maybe_Half_Phys(rnd(2)), "thrown potion", KILLED_BY_AN);
|
||||
} else {
|
||||
#ifdef STEED
|
||||
/* sometimes it hits the saddle */
|
||||
if(((mon->misc_worn_check & W_SADDLE) &&
|
||||
(saddle = which_armor(mon, W_SADDLE))) &&
|
||||
@@ -1163,21 +1153,17 @@ boolean your_fault;
|
||||
((rnl(10) > 7 && obj->cursed) ||
|
||||
(rnl(10) < 4 && obj->blessed) || !rn2(3)))))
|
||||
hit_saddle = TRUE;
|
||||
#endif
|
||||
distance = distu(mon->mx,mon->my);
|
||||
if (!cansee(mon->mx,mon->my)) pline("Crash!");
|
||||
else {
|
||||
char *mnam = mon_nam(mon);
|
||||
char buf[BUFSZ];
|
||||
|
||||
#ifdef STEED
|
||||
if(hit_saddle && saddle) {
|
||||
Sprintf(buf, "%s saddle", s_suffix(x_monnam(mon,
|
||||
ARTICLE_THE, (char *)0,
|
||||
(SUPPRESS_IT|SUPPRESS_SADDLE), FALSE)));
|
||||
} else
|
||||
#endif
|
||||
if(has_head(mon->data)) {
|
||||
} else if(has_head(mon->data)) {
|
||||
Sprintf(buf, "%s %s",
|
||||
s_suffix(mnam),
|
||||
(notonhead ? "body" : "head"));
|
||||
@@ -1187,20 +1173,12 @@ boolean your_fault;
|
||||
pline_The("%s crashes on %s and breaks into shards.",
|
||||
botlnam, buf);
|
||||
}
|
||||
if(rn2(5) && mon->mhp > 1
|
||||
#ifdef STEED
|
||||
&& !hit_saddle
|
||||
#endif
|
||||
)
|
||||
if(rn2(5) && mon->mhp > 1 && !hit_saddle)
|
||||
mon->mhp--;
|
||||
}
|
||||
|
||||
/* oil doesn't instantly evaporate; Neither does a saddle hit */
|
||||
if (obj->otyp != POT_OIL &&
|
||||
#ifdef STEED
|
||||
!hit_saddle &&
|
||||
#endif
|
||||
cansee(mon->mx,mon->my))
|
||||
if (obj->otyp != POT_OIL && !hit_saddle && cansee(mon->mx,mon->my))
|
||||
pline("%s.", Tobjnam(obj, "evaporate"));
|
||||
|
||||
if (isyou) {
|
||||
@@ -1224,7 +1202,6 @@ boolean your_fault;
|
||||
}
|
||||
break;
|
||||
}
|
||||
#ifdef STEED
|
||||
} else if (hit_saddle && saddle) {
|
||||
char *mnam, buf[BUFSZ], saddle_glows[BUFSZ];
|
||||
boolean affected = FALSE;
|
||||
@@ -1245,7 +1222,6 @@ boolean your_fault;
|
||||
}
|
||||
if (useeit && !affected)
|
||||
pline("%s %s wet.", buf, aobjnam(saddle, "get"));
|
||||
#endif
|
||||
} else {
|
||||
boolean angermon = TRUE;
|
||||
|
||||
@@ -1777,11 +1753,9 @@ dodip()
|
||||
if (yn(upstart(qtoo)) == 'y') {
|
||||
if (Levitation) {
|
||||
floating_above(pooltype);
|
||||
#ifdef STEED
|
||||
} else if (u.usteed && !is_swimmer(u.usteed->data) &&
|
||||
P_SKILL(P_RIDING) < P_BASIC) {
|
||||
rider_cant_reach(); /* not skilled enough to reach */
|
||||
#endif
|
||||
} else {
|
||||
if (obj->otyp == POT_ACID) obj->in_use = 1;
|
||||
(void) get_wet(obj);
|
||||
|
||||
+1
-9
@@ -207,12 +207,10 @@ in_trouble()
|
||||
Cursed_obj(uarmf, FUMBLE_BOOTS))
|
||||
return TROUBLE_FUMBLING;
|
||||
if (worst_cursed_item()) return TROUBLE_CURSED_ITEMS;
|
||||
#ifdef STEED
|
||||
if (u.usteed) { /* can't voluntarily dismount from a cursed saddle */
|
||||
otmp = which_armor(u.usteed, W_SADDLE);
|
||||
if (Cursed_obj(otmp, SADDLE)) return TROUBLE_SADDLE;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (Blinded > 1 && haseyes(youmonst.data) &&
|
||||
(!u.uswallow ||
|
||||
@@ -220,11 +218,7 @@ in_trouble()
|
||||
return(TROUBLE_BLIND);
|
||||
for(i=0; i<A_MAX; i++)
|
||||
if(ABASE(i) < AMAX(i)) return(TROUBLE_POISONED);
|
||||
if(Wounded_legs
|
||||
#ifdef STEED
|
||||
&& !u.usteed
|
||||
#endif
|
||||
) return (TROUBLE_WOUNDED_LEGS);
|
||||
if(Wounded_legs && !u.usteed) return (TROUBLE_WOUNDED_LEGS);
|
||||
if (u.uhs >= HUNGRY) return TROUBLE_HUNGRY;
|
||||
if (HStun & TIMEOUT) return TROUBLE_STUNNED;
|
||||
if (HConfusion & TIMEOUT) return TROUBLE_CONFUSED;
|
||||
@@ -483,7 +477,6 @@ decurse:
|
||||
pline ("Looks like you are back in Kansas.");
|
||||
(void) make_hallucinated(0L,FALSE,0L);
|
||||
break;
|
||||
#ifdef STEED
|
||||
case TROUBLE_SADDLE:
|
||||
otmp = which_armor(u.usteed, W_SADDLE);
|
||||
if (!Blind) {
|
||||
@@ -493,7 +486,6 @@ decurse:
|
||||
}
|
||||
uncurse(otmp);
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
-4
@@ -1126,10 +1126,7 @@ struct obj *sobj; /* scroll, or fake spellbook object for scroll-like spell */
|
||||
for (i = -bd; i <= bd; i++) for(j = -bd; j <= bd; j++) {
|
||||
if (!isok(u.ux + i, u.uy + j)) continue;
|
||||
if ((mtmp = m_at(u.ux + i, u.uy + j)) != 0
|
||||
#ifdef STEED
|
||||
|| (!i && !j && (mtmp = u.usteed) != 0)
|
||||
#endif
|
||||
) {
|
||||
|| (!i && !j && (mtmp = u.usteed) != 0)) {
|
||||
++candidates;
|
||||
res = maybe_tame(mtmp, sobj);
|
||||
results += res;
|
||||
|
||||
+2
-8
@@ -516,7 +516,7 @@ STATIC_OVL
|
||||
boolean
|
||||
restgamestate(fd, stuckid, steedid)
|
||||
register int fd;
|
||||
unsigned int *stuckid, *steedid; /* STEED */
|
||||
unsigned int *stuckid, *steedid;
|
||||
{
|
||||
struct flag newgameflags;
|
||||
#ifdef SYSFLAGS
|
||||
@@ -652,10 +652,8 @@ unsigned int *stuckid, *steedid; /* STEED */
|
||||
restore_oracles(fd);
|
||||
if (u.ustuck)
|
||||
mread(fd, (genericptr_t) stuckid, sizeof (*stuckid));
|
||||
#ifdef STEED
|
||||
if (u.usteed)
|
||||
mread(fd, (genericptr_t) steedid, sizeof (*steedid));
|
||||
#endif
|
||||
mread(fd, (genericptr_t) pl_character, sizeof pl_character);
|
||||
|
||||
mread(fd, (genericptr_t) pl_fruit, sizeof pl_fruit);
|
||||
@@ -676,7 +674,7 @@ unsigned int *stuckid, *steedid; /* STEED */
|
||||
*/
|
||||
STATIC_OVL void
|
||||
restlevelstate(stuckid, steedid)
|
||||
unsigned int stuckid, steedid; /* STEED */
|
||||
unsigned int stuckid, steedid;
|
||||
{
|
||||
register struct monst *mtmp;
|
||||
|
||||
@@ -686,7 +684,6 @@ unsigned int stuckid, steedid; /* STEED */
|
||||
if (!mtmp) panic("Cannot find the monster ustuck.");
|
||||
u.ustuck = mtmp;
|
||||
}
|
||||
#ifdef STEED
|
||||
if (steedid) {
|
||||
for (mtmp = fmon; mtmp; mtmp = mtmp->nmon)
|
||||
if (mtmp->m_id == steedid) break;
|
||||
@@ -694,7 +691,6 @@ unsigned int stuckid, steedid; /* STEED */
|
||||
u.usteed = mtmp;
|
||||
remove_monster(mtmp->mx, mtmp->my);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
/*ARGSUSED*/ /* fd used in MFLOPPY only */
|
||||
@@ -793,9 +789,7 @@ register int fd;
|
||||
* place_monster() on other levels
|
||||
*/
|
||||
u.ustuck = (struct monst *)0;
|
||||
#ifdef STEED
|
||||
u.usteed = (struct monst *)0;
|
||||
#endif
|
||||
|
||||
#ifdef MICRO
|
||||
# ifdef AMII_GRAPHICS
|
||||
|
||||
@@ -231,9 +231,7 @@ dosave0()
|
||||
store_savefileinfo(fd);
|
||||
store_plname_in_file(fd);
|
||||
ustuck_id = (u.ustuck ? u.ustuck->m_id : 0);
|
||||
#ifdef STEED
|
||||
usteed_id = (u.usteed ? u.usteed->m_id : 0);
|
||||
#endif
|
||||
savelev(fd, ledger_no(&u.uz), WRITE_SAVE | FREE_SAVE);
|
||||
savegamestate(fd, WRITE_SAVE | FREE_SAVE);
|
||||
|
||||
@@ -248,9 +246,7 @@ dosave0()
|
||||
* may mislead place_monster() on other levels
|
||||
*/
|
||||
u.ustuck = (struct monst *)0;
|
||||
#ifdef STEED
|
||||
u.usteed = (struct monst *)0;
|
||||
#endif
|
||||
|
||||
for(ltmp = (xchar)1; ltmp <= maxledgerno(); ltmp++) {
|
||||
if (ltmp == ledger_no(&uz_save)) continue;
|
||||
@@ -356,10 +352,8 @@ register int fd, mode;
|
||||
save_oracles(fd, mode);
|
||||
if(ustuck_id)
|
||||
bwrite(fd, (genericptr_t) &ustuck_id, sizeof ustuck_id);
|
||||
#ifdef STEED
|
||||
if(usteed_id)
|
||||
bwrite(fd, (genericptr_t) &usteed_id, sizeof usteed_id);
|
||||
#endif
|
||||
bwrite(fd, (genericptr_t) pl_character, sizeof pl_character);
|
||||
bwrite(fd, (genericptr_t) pl_fruit, sizeof pl_fruit);
|
||||
savefruitchn(fd, mode);
|
||||
@@ -433,9 +427,7 @@ savestateinlock()
|
||||
store_plname_in_file(fd);
|
||||
|
||||
ustuck_id = (u.ustuck ? u.ustuck->m_id : 0);
|
||||
#ifdef STEED
|
||||
usteed_id = (u.usteed ? u.usteed->m_id : 0);
|
||||
#endif
|
||||
savegamestate(fd, WRITE_SAVE);
|
||||
}
|
||||
bclose(fd);
|
||||
|
||||
@@ -619,13 +619,11 @@ char *enterstring;
|
||||
"Leave the %s%s outside.",
|
||||
tool, plur(cnt));
|
||||
should_block = TRUE;
|
||||
#ifdef STEED
|
||||
} else if (u.usteed) {
|
||||
verbalize(NOTANGRY(shkp) ?
|
||||
"Will you please leave %s outside?" :
|
||||
"Leave %s outside.", y_monnam(u.usteed));
|
||||
should_block = TRUE;
|
||||
#endif
|
||||
verbalize(NOTANGRY(shkp) ?
|
||||
"Will you please leave %s outside?" :
|
||||
"Leave %s outside.", y_monnam(u.usteed));
|
||||
should_block = TRUE;
|
||||
} else {
|
||||
should_block = (Fast && (sobj_at(PICK_AXE, u.ux, u.uy) ||
|
||||
sobj_at(DWARVISH_MATTOCK, u.ux, u.uy)));
|
||||
@@ -3512,11 +3510,7 @@ register struct monst *shkp;
|
||||
avoid = FALSE;
|
||||
} else {
|
||||
#define GDIST(x,y) (dist2(x,y,gx,gy))
|
||||
if (Invis
|
||||
#ifdef STEED
|
||||
|| u.usteed
|
||||
#endif
|
||||
) {
|
||||
if (Invis || u.usteed) {
|
||||
avoid = FALSE;
|
||||
} else {
|
||||
uondoor = (u.ux == eshkp->shd.x && u.uy == eshkp->shd.y);
|
||||
@@ -4285,9 +4279,7 @@ register xchar x, y;
|
||||
&& shkp->mcanmove && !shkp->msleeping
|
||||
&& (x == sx-1 || x == sx+1 || y == sy-1 || y == sy+1)
|
||||
&& (Invis || carrying(PICK_AXE) || carrying(DWARVISH_MATTOCK)
|
||||
#ifdef STEED
|
||||
|| u.usteed
|
||||
#endif
|
||||
)) {
|
||||
pline("%s%s blocks your way!", shkname(shkp),
|
||||
Invis ? " senses your motion and" : "");
|
||||
|
||||
@@ -363,7 +363,6 @@ rndcurse() /* curse a few inventory items at random! */
|
||||
update_inventory();
|
||||
}
|
||||
|
||||
#ifdef STEED
|
||||
/* treat steed's saddle as extended part of hero's inventory */
|
||||
if (u.usteed && !rn2(4) &&
|
||||
(otmp = which_armor(u.usteed, W_SADDLE)) != 0 &&
|
||||
@@ -379,7 +378,6 @@ rndcurse() /* curse a few inventory items at random! */
|
||||
otmp->bknown = TRUE;
|
||||
}
|
||||
}
|
||||
#endif /*STEED*/
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
+5
-7
@@ -974,15 +974,13 @@ dochat()
|
||||
return(0);
|
||||
}
|
||||
|
||||
#ifdef STEED
|
||||
if (u.usteed && u.dz > 0) {
|
||||
if (!u.usteed->mcanmove || u.usteed->msleeping) {
|
||||
pline("%s seems not to notice you.", Monnam(u.usteed));
|
||||
return(1);
|
||||
} else
|
||||
return (domonnoise(u.usteed));
|
||||
if (!u.usteed->mcanmove || u.usteed->msleeping) {
|
||||
pline("%s seems not to notice you.", Monnam(u.usteed));
|
||||
return(1);
|
||||
} else
|
||||
return (domonnoise(u.usteed));
|
||||
}
|
||||
#endif
|
||||
|
||||
if (u.dz) {
|
||||
pline("They won't hear you %s there.", u.dz < 0 ? "up" : "down");
|
||||
|
||||
+18
-22
@@ -50,16 +50,15 @@ register struct monst *mtmp;
|
||||
mtmp->mgold += gold->quan;
|
||||
delobj(gold);
|
||||
newsym(u.ux, u.uy);
|
||||
#ifdef STEED
|
||||
if (u.usteed)
|
||||
who = u.usteed,
|
||||
whose = s_suffix(y_monnam(who)),
|
||||
what = makeplural(mbodypart(who, FOOT));
|
||||
else
|
||||
#endif
|
||||
who = &youmonst,
|
||||
whose = "your",
|
||||
what = makeplural(body_part(FOOT));
|
||||
if (u.usteed) {
|
||||
who = u.usteed;
|
||||
whose = s_suffix(y_monnam(who));
|
||||
what = makeplural(mbodypart(who, FOOT));
|
||||
} else {
|
||||
who = &youmonst;
|
||||
whose = "your";
|
||||
what = makeplural(body_part(FOOT));
|
||||
}
|
||||
/* [ avoid "between your rear regions" :-] */
|
||||
if (slithy(who->data)) what = "coils";
|
||||
/* reduce "rear hooves/claws" to "hooves/claws" */
|
||||
@@ -137,16 +136,15 @@ register struct monst *mtmp;
|
||||
obj_extract_self(fgold);
|
||||
add_to_minv(mtmp, fgold);
|
||||
newsym(u.ux, u.uy);
|
||||
#ifdef STEED
|
||||
if (u.usteed)
|
||||
who = u.usteed,
|
||||
whose = s_suffix(y_monnam(who)),
|
||||
what = makeplural(mbodypart(who, FOOT));
|
||||
else
|
||||
#endif
|
||||
who = &youmonst,
|
||||
whose = "your",
|
||||
what = makeplural(body_part(FOOT));
|
||||
if (u.usteed) {
|
||||
who = u.usteed;
|
||||
whose = s_suffix(y_monnam(who));
|
||||
what = makeplural(mbodypart(who, FOOT));
|
||||
} else {
|
||||
who = &youmonst;
|
||||
whose = "your";
|
||||
what = makeplural(body_part(FOOT));
|
||||
}
|
||||
/* [ avoid "between your rear regions" :-] */
|
||||
if (slithy(who->data)) what = "coils";
|
||||
/* reduce "rear hooves/claws" to "hooves/claws" */
|
||||
@@ -639,7 +637,6 @@ boolean verbosely;
|
||||
if (mon->mhp > 0) {
|
||||
mon->misc_worn_check &= ~obj->owornmask;
|
||||
update_mon = TRUE;
|
||||
#ifdef STEED
|
||||
/* don't charge for an owned saddle on dead steed (provided
|
||||
that the hero is within the same shop at the time) */
|
||||
} else if (mon->mtame && (obj->owornmask & W_SADDLE) &&
|
||||
@@ -647,7 +644,6 @@ boolean verbosely;
|
||||
/* being at a costly_spot guarantees lev->roomno is not 0 */
|
||||
index(in_rooms(u.ux, u.uy, SHOPBASE), levl[omx][omy].roomno)) {
|
||||
obj->no_charge = 1;
|
||||
#endif
|
||||
}
|
||||
/* this should be done even if the monster has died */
|
||||
if (obj->owornmask & W_WEP) setmnotwielded(mon, obj);
|
||||
|
||||
@@ -5,9 +5,6 @@
|
||||
|
||||
#include "hack.h"
|
||||
|
||||
|
||||
#ifdef STEED
|
||||
|
||||
/* Monsters that might be ridden */
|
||||
static NEARDATA const char steeds[] = {
|
||||
S_QUADRUPED, S_UNICORN, S_ANGEL, S_CENTAUR, S_DRAGON, S_JABBERWOCK, '\0'
|
||||
@@ -698,6 +695,4 @@ int x, y;
|
||||
level.monsters[x][y] = mon;
|
||||
}
|
||||
|
||||
#endif /* STEED */
|
||||
|
||||
/*steed.c*/
|
||||
|
||||
+1
-10
@@ -39,10 +39,7 @@ unsigned gpflags;
|
||||
* oh well.
|
||||
*/
|
||||
if (mtmp != &youmonst && x == u.ux && y == u.uy
|
||||
#ifdef STEED
|
||||
&& (!u.usteed || mtmp != u.usteed)
|
||||
#endif
|
||||
)
|
||||
&& (!u.usteed || mtmp != u.usteed))
|
||||
return FALSE;
|
||||
|
||||
if (mtmp) {
|
||||
@@ -379,10 +376,8 @@ boolean force_it;
|
||||
{
|
||||
register struct obj *otmp;
|
||||
|
||||
#ifdef STEED
|
||||
if (mtmp == u.usteed)
|
||||
return (FALSE);
|
||||
#endif
|
||||
|
||||
if (mtmp->mleashed) {
|
||||
otmp = get_mleash(mtmp);
|
||||
@@ -454,10 +449,8 @@ struct obj *scroll;
|
||||
char whobuf[BUFSZ];
|
||||
|
||||
Strcpy(whobuf, "you");
|
||||
#ifdef STEED
|
||||
if (u.usteed)
|
||||
Sprintf(eos(whobuf), " and %s", mon_nam(u.usteed));
|
||||
#endif
|
||||
pline("To what position do %s want to be teleported?",
|
||||
whobuf);
|
||||
cc.x = u.ux;
|
||||
@@ -1032,12 +1025,10 @@ boolean suppress_impossible;
|
||||
{
|
||||
register int x, y, trycount;
|
||||
|
||||
#ifdef STEED
|
||||
if (mtmp == u.usteed) {
|
||||
tele();
|
||||
return TRUE;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (mtmp->iswiz && mtmp->mx) { /* Wizard, not just arriving */
|
||||
if (!In_W_tower(u.ux, u.uy, &u.uz))
|
||||
|
||||
@@ -236,12 +236,10 @@ nh_timeout()
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef STEED
|
||||
if (u.ugallop) {
|
||||
if (--u.ugallop == 0L && u.usteed)
|
||||
pline("%s stops galloping.", Monnam(u.usteed));
|
||||
}
|
||||
#endif
|
||||
|
||||
for(upp = u.uprops; upp < u.uprops+SIZE(u.uprops); upp++)
|
||||
if((upp->intrinsic & TIMEOUT) && !(--upp->intrinsic & TIMEOUT)) {
|
||||
@@ -671,9 +669,7 @@ slip_or_trip()
|
||||
const char *what;
|
||||
char buf[BUFSZ];
|
||||
boolean on_foot = TRUE;
|
||||
#ifdef STEED
|
||||
if (u.usteed) on_foot = FALSE;
|
||||
#endif
|
||||
|
||||
if (otmp && on_foot && !u.uinwater && is_pool(u.ux, u.uy)) otmp = 0;
|
||||
|
||||
@@ -707,11 +703,9 @@ slip_or_trip()
|
||||
}
|
||||
} else if (rn2(3) && is_ice(u.ux, u.uy)) {
|
||||
pline("%s %s%s on the ice.",
|
||||
#ifdef STEED
|
||||
u.usteed ? upstart(x_monnam(u.usteed,
|
||||
(has_mname(u.usteed)) ? ARTICLE_NONE : ARTICLE_THE,
|
||||
(char *)0, SUPPRESS_SADDLE, FALSE)) :
|
||||
#endif
|
||||
"You", rn2(2) ? "slip" : "slide", on_foot ? "" : "s");
|
||||
} else {
|
||||
if (on_foot) {
|
||||
@@ -732,7 +726,6 @@ slip_or_trip()
|
||||
break;
|
||||
}
|
||||
}
|
||||
#ifdef STEED
|
||||
else {
|
||||
switch (rn2(4)) {
|
||||
case 1:
|
||||
@@ -750,7 +743,6 @@ slip_or_trip()
|
||||
}
|
||||
dismount_steed(DISMOUNT_FELL);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+7
-94
@@ -30,11 +30,9 @@ STATIC_DCL char *FDECL(trapnote, (struct trap *,BOOLEAN_P));
|
||||
STATIC_DCL void FDECL(join_adjacent_pits, (struct trap *));
|
||||
#endif
|
||||
STATIC_DCL void FDECL(clear_conjoined_pits, (struct trap *));
|
||||
#ifdef STEED
|
||||
STATIC_DCL int FDECL(steedintrap, (struct trap *, struct obj *));
|
||||
STATIC_DCL boolean FDECL(keep_saddle_with_steedcorpse,
|
||||
(unsigned, struct obj *, struct obj *));
|
||||
#endif
|
||||
STATIC_DCL void NDECL(maybe_finish_sokoban);
|
||||
|
||||
/* mintrap() should take a flags argument, but for time being we use this */
|
||||
@@ -651,7 +649,6 @@ boolean shatter;
|
||||
return mtmp;
|
||||
}
|
||||
|
||||
#ifdef STEED
|
||||
STATIC_OVL boolean
|
||||
keep_saddle_with_steedcorpse(steed_mid, objchn, saddle)
|
||||
unsigned steed_mid;
|
||||
@@ -679,7 +676,6 @@ struct obj *objchn, *saddle;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
#endif /*STEED*/
|
||||
|
||||
void
|
||||
dotrap(trap, trflags)
|
||||
@@ -695,9 +691,7 @@ unsigned trflags;
|
||||
plunged = (trflags & TOOKPLUNGE) != 0,
|
||||
adj_pit = conjoined_pits(trap, t_at(u.ux0,u.uy0), TRUE);
|
||||
int oldumort;
|
||||
#ifdef STEED
|
||||
int steed_article = ARTICLE_THE;
|
||||
#endif
|
||||
|
||||
nomul(0);
|
||||
|
||||
@@ -736,7 +730,6 @@ unsigned trflags;
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef STEED
|
||||
if (u.usteed) {
|
||||
u.usteed->mtrapseen |= (1 << (ttype - 1));
|
||||
/* suppress article in various steed messages when using its
|
||||
@@ -744,7 +737,6 @@ unsigned trflags;
|
||||
if (has_mname(u.usteed) && !Hallucination)
|
||||
steed_article = ARTICLE_NONE;
|
||||
}
|
||||
#endif
|
||||
|
||||
switch(ttype) {
|
||||
case ARROW_TRAP:
|
||||
@@ -761,11 +753,8 @@ unsigned trflags;
|
||||
otmp->quan = 1L;
|
||||
otmp->owt = weight(otmp);
|
||||
otmp->opoisoned = 0;
|
||||
#ifdef STEED
|
||||
if (u.usteed && !rn2(2) && steedintrap(trap, otmp)) /* nothing */;
|
||||
else
|
||||
#endif
|
||||
if (thitu(8, dmgval(otmp, &youmonst), otmp, "arrow")) {
|
||||
else if (thitu(8, dmgval(otmp, &youmonst), otmp, "arrow")) {
|
||||
obfree(otmp, (struct obj *)0);
|
||||
} else {
|
||||
place_object(otmp, u.ux, u.uy);
|
||||
@@ -789,11 +778,8 @@ unsigned trflags;
|
||||
otmp->owt = weight(otmp);
|
||||
if (!rn2(6)) otmp->opoisoned = 1;
|
||||
oldumort = u.umortality;
|
||||
#ifdef STEED
|
||||
if (u.usteed && !rn2(2) && steedintrap(trap, otmp)) /* nothing */;
|
||||
else
|
||||
#endif
|
||||
if (thitu(7, dmgval(otmp, &youmonst), otmp, "little dart")) {
|
||||
else if (thitu(7, dmgval(otmp, &youmonst), otmp, "little dart")) {
|
||||
if (otmp->opoisoned)
|
||||
poisoned("dart", A_CON, "little dart",
|
||||
/* if damage triggered life-saving,
|
||||
@@ -876,27 +862,20 @@ unsigned trflags;
|
||||
A_Your[trap->madeby_u]);
|
||||
break;
|
||||
}
|
||||
if(
|
||||
#ifdef STEED
|
||||
!u.usteed &&
|
||||
#endif
|
||||
youmonst.data->msize <= MZ_SMALL) {
|
||||
if( !u.usteed && youmonst.data->msize <= MZ_SMALL) {
|
||||
pline("%s bear trap closes harmlessly over you.",
|
||||
A_Your[trap->madeby_u]);
|
||||
break;
|
||||
}
|
||||
u.utrap = rn1(4, 4);
|
||||
u.utraptype = TT_BEARTRAP;
|
||||
#ifdef STEED
|
||||
if (u.usteed) {
|
||||
pline("%s bear trap closes on %s %s!",
|
||||
A_Your[trap->madeby_u], s_suffix(mon_nam(u.usteed)),
|
||||
mbodypart(u.usteed, FOOT));
|
||||
if (thitm(0, u.usteed, (struct obj *)0, dmg, FALSE))
|
||||
u.utrap = 0; /* steed died, hero not trapped */
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
} else {
|
||||
pline("%s bear trap closes on your %s!",
|
||||
A_Your[trap->madeby_u], body_part(FOOT));
|
||||
if(u.umonnum == PM_OWLBEAR || u.umonnum == PM_BUGBEAR)
|
||||
@@ -915,9 +894,7 @@ unsigned trflags;
|
||||
pline("A cloud of gas puts you to sleep!");
|
||||
fall_asleep(-rnd(25), TRUE);
|
||||
}
|
||||
#ifdef STEED
|
||||
(void) steedintrap(trap, (struct obj *)0);
|
||||
#endif
|
||||
break;
|
||||
|
||||
case RUST_TRAP:
|
||||
@@ -1008,7 +985,6 @@ glovecheck: (void) rust_dmg(uarmg, "gauntlets", 1, TRUE, &youmonst);
|
||||
}
|
||||
if (!Sokoban) {
|
||||
char verbbuf[BUFSZ];
|
||||
#ifdef STEED
|
||||
if (u.usteed) {
|
||||
if ((trflags & RECURSIVETRAP) != 0)
|
||||
Sprintf(verbbuf, "and %s fall",
|
||||
@@ -1018,9 +994,7 @@ glovecheck: (void) rust_dmg(uarmg, "gauntlets", 1, TRUE, &youmonst);
|
||||
Sprintf(verbbuf, "lead %s",
|
||||
x_monnam(u.usteed, steed_article,
|
||||
"poor", SUPPRESS_SADDLE, FALSE));
|
||||
} else
|
||||
#endif
|
||||
if (adj_pit) {
|
||||
} else if (adj_pit) {
|
||||
You("move into an adjacent pit.");
|
||||
} else {
|
||||
Strcpy(verbbuf, !plunged ? "fall" :
|
||||
@@ -1038,7 +1012,6 @@ glovecheck: (void) rust_dmg(uarmg, "gauntlets", 1, TRUE, &youmonst);
|
||||
pline("How pitiful. Isn't that the pits?");
|
||||
if (ttype == SPIKED_PIT) {
|
||||
const char *predicament = "on a set of sharp iron spikes";
|
||||
#ifdef STEED
|
||||
if (u.usteed) {
|
||||
pline("%s %s %s!",
|
||||
upstart(x_monnam(u.usteed, steed_article,
|
||||
@@ -1046,14 +1019,11 @@ glovecheck: (void) rust_dmg(uarmg, "gauntlets", 1, TRUE, &youmonst);
|
||||
adj_pit ? "steps" : "lands",
|
||||
predicament);
|
||||
} else
|
||||
#endif
|
||||
You("%s %s!", adj_pit ? "step" : "land", predicament);
|
||||
You("%s %s!", adj_pit ? "step" : "land", predicament);
|
||||
}
|
||||
u.utrap = rn1(6,2);
|
||||
u.utraptype = TT_PIT;
|
||||
#ifdef STEED
|
||||
if (!steedintrap(trap, (struct obj *)0)) {
|
||||
#endif
|
||||
if (ttype == SPIKED_PIT) {
|
||||
oldumort = u.umortality;
|
||||
losehp(Maybe_Half_Phys(rnd(adj_pit ? 6 : 10)),
|
||||
@@ -1086,9 +1056,7 @@ glovecheck: (void) rust_dmg(uarmg, "gauntlets", 1, TRUE, &youmonst);
|
||||
vision_full_recalc = 1; /* vision limits change */
|
||||
exercise(A_STR, FALSE);
|
||||
exercise(A_DEX, FALSE);
|
||||
#ifdef STEED
|
||||
}
|
||||
#endif
|
||||
break;
|
||||
case HOLE:
|
||||
case TRAPDOOR:
|
||||
@@ -1139,12 +1107,10 @@ glovecheck: (void) rust_dmg(uarmg, "gauntlets", 1, TRUE, &youmonst);
|
||||
|
||||
if (forcetrap) {
|
||||
Strcpy(verbbuf, "are caught by");
|
||||
#ifdef STEED
|
||||
} else if (u.usteed) {
|
||||
Sprintf(verbbuf, "lead %s into",
|
||||
x_monnam(u.usteed, steed_article,
|
||||
"poor", SUPPRESS_SADDLE, FALSE));
|
||||
#endif
|
||||
} else {
|
||||
Sprintf(verbbuf, "%s into",
|
||||
Levitation ? (const char *)"float" :
|
||||
@@ -1158,7 +1124,6 @@ glovecheck: (void) rust_dmg(uarmg, "gauntlets", 1, TRUE, &youmonst);
|
||||
{
|
||||
register int str = ACURR(A_STR);
|
||||
|
||||
#ifdef STEED
|
||||
/* If mounted, the steed gets trapped. Use mintrap
|
||||
* to do all the work. If mtrapped is set as a result,
|
||||
* unset it and set utrap instead. In the case of a
|
||||
@@ -1183,7 +1148,6 @@ glovecheck: (void) rust_dmg(uarmg, "gauntlets", 1, TRUE, &youmonst);
|
||||
|
||||
webmsgok = FALSE; /* mintrap printed the messages */
|
||||
}
|
||||
#endif
|
||||
if (str <= 3) u.utrap = rn1(6,6);
|
||||
else if (str < 6) u.utrap = rn1(6,4);
|
||||
else if (str < 9) u.utrap = rn1(4,4);
|
||||
@@ -1216,9 +1180,7 @@ glovecheck: (void) rust_dmg(uarmg, "gauntlets", 1, TRUE, &youmonst);
|
||||
u.uen = (u.uenmax += 2);
|
||||
break;
|
||||
} else domagictrap();
|
||||
#ifdef STEED
|
||||
(void) steedintrap(trap, (struct obj *)0);
|
||||
#endif
|
||||
break;
|
||||
|
||||
case ANTI_MAGIC:
|
||||
@@ -1258,13 +1220,11 @@ glovecheck: (void) rust_dmg(uarmg, "gauntlets", 1, TRUE, &youmonst);
|
||||
case POLY_TRAP: {
|
||||
char verbbuf[BUFSZ];
|
||||
seetrap(trap);
|
||||
#ifdef STEED
|
||||
if (u.usteed)
|
||||
Sprintf(verbbuf, "lead %s",
|
||||
x_monnam(u.usteed, steed_article,
|
||||
(char *)0, SUPPRESS_SADDLE, FALSE));
|
||||
else
|
||||
#endif
|
||||
Sprintf(verbbuf,"%s",
|
||||
Levitation ? (const char *)"float" :
|
||||
locomotion(youmonst.data, "step"));
|
||||
@@ -1274,9 +1234,7 @@ glovecheck: (void) rust_dmg(uarmg, "gauntlets", 1, TRUE, &youmonst);
|
||||
You_feel("momentarily different.");
|
||||
/* Trap did nothing; don't remove it --KAA */
|
||||
} else {
|
||||
#ifdef STEED
|
||||
(void) steedintrap(trap, (struct obj *)0);
|
||||
#endif
|
||||
deltrap(trap); /* delete trap before polymorph */
|
||||
newsym(u.ux,u.uy); /* get rid of trap symbol */
|
||||
You_feel("a change coming over you.");
|
||||
@@ -1285,10 +1243,8 @@ glovecheck: (void) rust_dmg(uarmg, "gauntlets", 1, TRUE, &youmonst);
|
||||
break;
|
||||
}
|
||||
case LANDMINE: {
|
||||
#ifdef STEED
|
||||
unsigned steed_mid = 0;
|
||||
struct obj *saddle = 0;
|
||||
#endif
|
||||
if ((Levitation || Flying) && !forcetrap) {
|
||||
if (!already_seen && rn2(3)) break;
|
||||
feeltrap(trap);
|
||||
@@ -1303,7 +1259,6 @@ glovecheck: (void) rust_dmg(uarmg, "gauntlets", 1, TRUE, &youmonst);
|
||||
already_seen ? a_your[trap->madeby_u] : "",
|
||||
already_seen ? " land mine" : "it");
|
||||
} else {
|
||||
#ifdef STEED
|
||||
/* prevent landmine from killing steed, throwing you to
|
||||
* the ground, and you being affected again by the same
|
||||
* mine because it hasn't been deleted yet
|
||||
@@ -1311,26 +1266,21 @@ glovecheck: (void) rust_dmg(uarmg, "gauntlets", 1, TRUE, &youmonst);
|
||||
static boolean recursive_mine = FALSE;
|
||||
|
||||
if (recursive_mine) break;
|
||||
#endif
|
||||
feeltrap(trap);
|
||||
pline("KAABLAMM!!! You triggered %s land mine!",
|
||||
a_your[trap->madeby_u]);
|
||||
#ifdef STEED
|
||||
if (u.usteed) steed_mid = u.usteed->m_id;
|
||||
recursive_mine = TRUE;
|
||||
(void) steedintrap(trap, (struct obj *)0);
|
||||
recursive_mine = FALSE;
|
||||
saddle = sobj_at(SADDLE,u.ux, u.uy);
|
||||
#endif
|
||||
set_wounded_legs(LEFT_SIDE, rn1(35, 41));
|
||||
set_wounded_legs(RIGHT_SIDE, rn1(35, 41));
|
||||
exercise(A_DEX, FALSE);
|
||||
}
|
||||
blow_up_landmine(trap);
|
||||
#ifdef STEED
|
||||
if (steed_mid && saddle && !u.usteed)
|
||||
(void)keep_saddle_with_steedcorpse(steed_mid, fobj, saddle);
|
||||
#endif
|
||||
newsym(u.ux,u.uy); /* update trap symbol */
|
||||
losehp(Maybe_Half_Phys(rnd(16)), "land mine", KILLED_BY_AN);
|
||||
/* fall recursively into the pit... */
|
||||
@@ -1383,7 +1333,6 @@ boolean noprefix;
|
||||
return tnbuf;
|
||||
}
|
||||
|
||||
#ifdef STEED
|
||||
STATIC_OVL int
|
||||
steedintrap(trap, otmp)
|
||||
struct trap *trap;
|
||||
@@ -1460,7 +1409,6 @@ struct obj *otmp;
|
||||
}
|
||||
return steedhit ? 1 : 0;
|
||||
}
|
||||
#endif /*STEED*/
|
||||
|
||||
/* some actions common to both player and monsters for triggered landmine */
|
||||
void
|
||||
@@ -1964,10 +1912,8 @@ register struct monst *mtmp;
|
||||
Sokoban && !trap->madeby_u);
|
||||
const char *fallverb;
|
||||
|
||||
#ifdef STEED
|
||||
/* true when called from dotrap, inescapable is not an option */
|
||||
if (mtmp == u.usteed) inescapable = TRUE;
|
||||
#endif
|
||||
if (!inescapable &&
|
||||
((mtmp->mtrapseen & (1 << (tt-1))) != 0 ||
|
||||
(tt == HOLE && !mindless(mptr)))) {
|
||||
@@ -1983,10 +1929,8 @@ register struct monst *mtmp;
|
||||
|
||||
in_sight = canseemon(mtmp);
|
||||
see_it = cansee(mtmp->mx, mtmp->my);
|
||||
#ifdef STEED
|
||||
/* assume hero can tell what's going on for the steed */
|
||||
if (mtmp == u.usteed) in_sight = TRUE;
|
||||
#endif
|
||||
switch (tt) {
|
||||
case ARROW_TRAP:
|
||||
if (trap->once && trap->tseen && !rn2(15)) {
|
||||
@@ -2633,7 +2577,6 @@ float_up()
|
||||
You("gain control over your movements.");
|
||||
else
|
||||
You("start to float in the air!");
|
||||
#ifdef STEED
|
||||
if (u.usteed && !is_floater(u.usteed->data) &&
|
||||
!is_flyer(u.usteed->data)) {
|
||||
if (Lev_at_will)
|
||||
@@ -2643,7 +2586,6 @@ float_up()
|
||||
dismount_steed(DISMOUNT_GENERIC);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
if (Flying) You("are no longer able to control your flight.");
|
||||
BFlying |= I_SPECIAL;
|
||||
return;
|
||||
@@ -2744,10 +2686,7 @@ long hmask, emask; /* might cancel timeout */
|
||||
You_feel("heavier.");
|
||||
/* u.uinwater msgs already in spoteffects()/drown() */
|
||||
else if (!u.uinwater && !no_msg) {
|
||||
#ifdef STEED
|
||||
if (!(emask & W_SADDLE))
|
||||
#endif
|
||||
{
|
||||
if (!(emask & W_SADDLE)) {
|
||||
if (Sokoban && trap) {
|
||||
/* Justification elsewhere for Sokoban traps
|
||||
* is based on air currents. This is
|
||||
@@ -2761,15 +2700,11 @@ long hmask, emask; /* might cancel timeout */
|
||||
else
|
||||
You("fall over.");
|
||||
losehp(rnd(2), "dangerous winds", KILLED_BY);
|
||||
#ifdef STEED
|
||||
if (u.usteed) dismount_steed(DISMOUNT_FELL);
|
||||
#endif
|
||||
selftouch("As you fall, you");
|
||||
#ifdef STEED
|
||||
} else if (u.usteed && (is_floater(u.usteed->data) ||
|
||||
is_flyer(u.usteed->data))) {
|
||||
You("settle more firmly in the saddle.");
|
||||
#endif
|
||||
} else if (Hallucination)
|
||||
pline("Bummer! You've %s.",
|
||||
is_pool(u.ux,u.uy) ? "splashed down" :
|
||||
@@ -2834,19 +2769,15 @@ climb_pit()
|
||||
You("%s to the edge of the pit.",
|
||||
(Sokoban && Levitation) ?
|
||||
"struggle against the air currents and float" :
|
||||
#ifdef STEED
|
||||
u.usteed ? "ride" :
|
||||
#endif
|
||||
"crawl");
|
||||
fill_pit(u.ux, u.uy);
|
||||
vision_full_recalc = 1; /* vision limits change */
|
||||
} else if (u.dz || flags.verbose) {
|
||||
#ifdef STEED
|
||||
if (u.usteed)
|
||||
Norep("%s is still in a pit.",
|
||||
upstart(y_monnam(u.usteed)));
|
||||
else
|
||||
#endif
|
||||
Norep((Hallucination && !rn2(5)) ?
|
||||
"You've fallen, and you can't get up." :
|
||||
"You are still in a pit.");
|
||||
@@ -3361,13 +3292,11 @@ drown()
|
||||
return(TRUE);
|
||||
} else pline_The("attempted teleport spell fails.");
|
||||
}
|
||||
#ifdef STEED
|
||||
if (u.usteed) {
|
||||
dismount_steed(DISMOUNT_GENERIC);
|
||||
if(!is_pool(u.ux,u.uy))
|
||||
return(TRUE);
|
||||
}
|
||||
#endif
|
||||
crawl_ok = FALSE;
|
||||
x = y = 0; /* lint suppression */
|
||||
/* if sleeping, wake up now so that we don't crawl out of water
|
||||
@@ -3603,11 +3532,9 @@ boolean force_failure;
|
||||
}
|
||||
/* untrappable traps are located on the ground. */
|
||||
if (!can_reach_floor(TRUE)) {
|
||||
#ifdef STEED
|
||||
if (u.usteed && P_SKILL(P_RIDING) < P_BASIC)
|
||||
rider_cant_reach();
|
||||
else
|
||||
#endif
|
||||
You("are unable to reach the %s!",
|
||||
defsyms[trap_to_defsym(ttype)].explanation);
|
||||
return 0;
|
||||
@@ -3627,12 +3554,10 @@ boolean force_failure;
|
||||
if (ttmp2) {
|
||||
pline_The("webbing sticks to you. You're caught too!");
|
||||
dotrap(ttmp2, NOWEBMSG);
|
||||
#ifdef STEED
|
||||
if (u.usteed && u.utrap) {
|
||||
/* you, not steed, are trapped */
|
||||
dismount_steed(DISMOUNT_FELL);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
} else
|
||||
pline("%s remains entangled.", Monnam(mtmp));
|
||||
@@ -3937,9 +3862,7 @@ boolean force;
|
||||
useplural ? "are" : "is",
|
||||
the_trap, here ? "here" : "there",
|
||||
useplural ? "them" : "it",
|
||||
#ifdef STEED
|
||||
u.usteed ? " while mounted" :
|
||||
#endif
|
||||
"");
|
||||
trap_skipped = (ttmp != 0);
|
||||
} else { /* deal_with_floor_trap */
|
||||
@@ -4131,9 +4054,7 @@ boolean *noticed; /* set to true iff hero notices the effect; */
|
||||
const char *trapdescr, *which;
|
||||
boolean ishero = (mon == &youmonst);
|
||||
|
||||
#ifdef STEED
|
||||
if (mon == u.usteed) ishero = TRUE;
|
||||
#endif
|
||||
t = t_at(ishero ? u.ux : mon->mx, ishero ? u.uy : mon->my);
|
||||
/* if no trap here or it's not a holding trap, we're done */
|
||||
if (!t || (t->ttyp != BEAR_TRAP && t->ttyp != WEB)) return FALSE;
|
||||
@@ -4148,11 +4069,9 @@ boolean *noticed; /* set to true iff hero notices the effect; */
|
||||
*noticed = TRUE;
|
||||
/* give message only if trap was the expected type */
|
||||
if (u.utraptype == TT_BEARTRAP || u.utraptype == TT_WEB) {
|
||||
#ifdef STEED
|
||||
if (u.usteed)
|
||||
Sprintf(buf, "%s is", noit_Monnam(u.usteed));
|
||||
else
|
||||
#endif
|
||||
Strcpy(buf, "You are");
|
||||
pline("%s released from %s %s.", buf, which, trapdescr);
|
||||
}
|
||||
@@ -4188,9 +4107,7 @@ boolean *noticed; /* set to true iff hero notices the effect; */
|
||||
unsigned dotrapflags;
|
||||
boolean ishero = (mon == &youmonst), result;
|
||||
|
||||
#ifdef STEED
|
||||
if (mon == u.usteed) ishero = TRUE;
|
||||
#endif
|
||||
t = t_at(ishero ? u.ux : mon->mx, ishero ? u.uy : mon->my);
|
||||
/* if no trap here or it's not a holding trap, we're done */
|
||||
if (!t || (t->ttyp != BEAR_TRAP && t->ttyp != WEB)) return FALSE;
|
||||
@@ -4199,10 +4116,8 @@ boolean *noticed; /* set to true iff hero notices the effect; */
|
||||
if (u.utrap) return FALSE; /* already trapped */
|
||||
*noticed = TRUE;
|
||||
dotrapflags = FORCETRAP;
|
||||
#ifdef STEED
|
||||
/* dotrap calls mintrap when mounted hero encounters a web */
|
||||
if (u.usteed) dotrapflags |= NOWEBMSG;
|
||||
#endif
|
||||
++force_mintrap;
|
||||
dotrap(t, dotrapflags);
|
||||
--force_mintrap;
|
||||
@@ -4230,9 +4145,7 @@ boolean *noticed; /* set to true iff hero notices the effect; */
|
||||
struct trap *t;
|
||||
boolean ishero = (mon == &youmonst), result;
|
||||
|
||||
#ifdef STEED
|
||||
if (mon == u.usteed) ishero = TRUE;
|
||||
#endif
|
||||
t = t_at(ishero ? u.ux : mon->mx, ishero ? u.uy : mon->my);
|
||||
/* if no trap here or it's not a falling trap, we're done
|
||||
(note: falling rock traps have a trapdoor in the ceiling) */
|
||||
|
||||
@@ -262,9 +262,7 @@ static const struct def_skill Skill_A[] = {
|
||||
{ P_UNICORN_HORN, P_SKILLED },
|
||||
{ P_ATTACK_SPELL, P_BASIC }, { P_HEALING_SPELL, P_BASIC },
|
||||
{ P_DIVINATION_SPELL, P_EXPERT}, { P_MATTER_SPELL, P_BASIC},
|
||||
#ifdef STEED
|
||||
{ P_RIDING, P_BASIC },
|
||||
#endif
|
||||
{ P_TWO_WEAPON_COMBAT, P_BASIC },
|
||||
{ P_BARE_HANDED_COMBAT, P_EXPERT },
|
||||
{ P_NONE, 0 }
|
||||
@@ -281,9 +279,7 @@ static const struct def_skill Skill_B[] = {
|
||||
{ P_QUARTERSTAFF, P_BASIC }, { P_SPEAR, P_SKILLED },
|
||||
{ P_TRIDENT, P_SKILLED }, { P_BOW, P_BASIC },
|
||||
{ P_ATTACK_SPELL, P_SKILLED },
|
||||
#ifdef STEED
|
||||
{ P_RIDING, P_BASIC },
|
||||
#endif
|
||||
{ P_TWO_WEAPON_COMBAT, P_BASIC },
|
||||
{ P_BARE_HANDED_COMBAT, P_MASTER },
|
||||
{ P_NONE, 0 }
|
||||
@@ -332,9 +328,7 @@ static const struct def_skill Skill_K[] = {
|
||||
{ P_BOW, P_BASIC }, { P_CROSSBOW, P_SKILLED },
|
||||
{ P_ATTACK_SPELL, P_SKILLED }, { P_HEALING_SPELL, P_SKILLED },
|
||||
{ P_CLERIC_SPELL, P_SKILLED },
|
||||
#ifdef STEED
|
||||
{ P_RIDING, P_EXPERT },
|
||||
#endif
|
||||
{ P_TWO_WEAPON_COMBAT, P_SKILLED },
|
||||
{ P_BARE_HANDED_COMBAT, P_EXPERT },
|
||||
{ P_NONE, 0 }
|
||||
@@ -379,9 +373,7 @@ static const struct def_skill Skill_R[] = {
|
||||
{ P_DART, P_EXPERT }, { P_SHURIKEN, P_SKILLED },
|
||||
{ P_DIVINATION_SPELL, P_SKILLED }, { P_ESCAPE_SPELL, P_SKILLED },
|
||||
{ P_MATTER_SPELL, P_SKILLED },
|
||||
#ifdef STEED
|
||||
{ P_RIDING, P_BASIC },
|
||||
#endif
|
||||
{ P_TWO_WEAPON_COMBAT, P_EXPERT },
|
||||
{ P_BARE_HANDED_COMBAT, P_EXPERT },
|
||||
{ P_NONE, 0 }
|
||||
@@ -401,9 +393,7 @@ static const struct def_skill Skill_Ran[] = {
|
||||
{ P_HEALING_SPELL, P_BASIC },
|
||||
{ P_DIVINATION_SPELL, P_EXPERT },
|
||||
{ P_ESCAPE_SPELL, P_BASIC },
|
||||
#ifdef STEED
|
||||
{ P_RIDING, P_BASIC },
|
||||
#endif
|
||||
{ P_BARE_HANDED_COMBAT, P_BASIC },
|
||||
{ P_NONE, 0 }
|
||||
};
|
||||
@@ -418,9 +408,7 @@ static const struct def_skill Skill_S[] = {
|
||||
{ P_LANCE, P_SKILLED },
|
||||
{ P_BOW, P_EXPERT }, { P_SHURIKEN, P_EXPERT },
|
||||
{ P_ATTACK_SPELL, P_SKILLED }, { P_CLERIC_SPELL, P_SKILLED },
|
||||
#ifdef STEED
|
||||
{ P_RIDING, P_SKILLED },
|
||||
#endif
|
||||
{ P_TWO_WEAPON_COMBAT, P_EXPERT },
|
||||
{ P_MARTIAL_ARTS, P_MASTER },
|
||||
{ P_NONE, 0 }
|
||||
@@ -444,9 +432,7 @@ static const struct def_skill Skill_T[] = {
|
||||
{ P_WHIP, P_BASIC }, { P_UNICORN_HORN, P_SKILLED },
|
||||
{ P_DIVINATION_SPELL, P_BASIC }, { P_ENCHANTMENT_SPELL, P_BASIC },
|
||||
{ P_ESCAPE_SPELL, P_SKILLED },
|
||||
#ifdef STEED
|
||||
{ P_RIDING, P_BASIC },
|
||||
#endif
|
||||
{ P_TWO_WEAPON_COMBAT, P_SKILLED },
|
||||
{ P_BARE_HANDED_COMBAT, P_SKILLED },
|
||||
{ P_NONE, 0 }
|
||||
@@ -464,9 +450,7 @@ static const struct def_skill Skill_V[] = {
|
||||
{ P_TRIDENT, P_BASIC }, { P_LANCE, P_SKILLED },
|
||||
{ P_SLING, P_BASIC },
|
||||
{ P_ATTACK_SPELL, P_BASIC }, { P_ESCAPE_SPELL, P_BASIC },
|
||||
#ifdef STEED
|
||||
{ P_RIDING, P_SKILLED },
|
||||
#endif
|
||||
{ P_TWO_WEAPON_COMBAT, P_SKILLED },
|
||||
{ P_BARE_HANDED_COMBAT, P_EXPERT },
|
||||
{ P_NONE, 0 }
|
||||
@@ -484,9 +468,7 @@ static const struct def_skill Skill_W[] = {
|
||||
{ P_DIVINATION_SPELL, P_EXPERT }, { P_ENCHANTMENT_SPELL, P_SKILLED },
|
||||
{ P_CLERIC_SPELL, P_SKILLED }, { P_ESCAPE_SPELL, P_EXPERT },
|
||||
{ P_MATTER_SPELL, P_EXPERT },
|
||||
#ifdef STEED
|
||||
{ P_RIDING, P_BASIC },
|
||||
#endif
|
||||
{ P_BARE_HANDED_COMBAT, P_BASIC },
|
||||
{ P_NONE, 0 }
|
||||
};
|
||||
|
||||
+3
-17
@@ -11,9 +11,7 @@ STATIC_DCL boolean FDECL(theft_petrifies, (struct obj *));
|
||||
STATIC_DCL void FDECL(steal_it, (struct monst *, struct attack *));
|
||||
STATIC_DCL boolean FDECL(hitum, (struct monst *,struct attack *));
|
||||
STATIC_DCL boolean FDECL(hmon_hitmon, (struct monst *,struct obj *,int));
|
||||
#ifdef STEED
|
||||
STATIC_DCL int FDECL(joust, (struct monst *,struct obj *));
|
||||
#endif
|
||||
STATIC_DCL void NDECL(demonpet);
|
||||
STATIC_DCL boolean FDECL(m_slips_free, (struct monst *mtmp,struct attack *mattk));
|
||||
STATIC_DCL int FDECL(explum, (struct monst *,struct attack *));
|
||||
@@ -559,9 +557,7 @@ int thrown; /* HMON_xxx (0 => hand-to-hand, other => ranged) */
|
||||
boolean hand_to_hand = (thrown == HMON_MELEE ||
|
||||
/* not grapnels; applied implies uwep */
|
||||
(thrown == HMON_APPLIED && is_pole(uwep)));
|
||||
#ifdef STEED
|
||||
int jousting = 0;
|
||||
#endif
|
||||
int wtype;
|
||||
struct obj *monwep;
|
||||
char unconventional[BUFSZ]; /* substituted for word "attack" in msg */
|
||||
@@ -607,11 +603,7 @@ int thrown; /* HMON_xxx (0 => hand-to-hand, other => ranged) */
|
||||
/* or strike with a missile in your hand... */
|
||||
(!thrown && (is_missile(obj) || is_ammo(obj))) ||
|
||||
/* or use a pole at short range and not mounted... */
|
||||
(!thrown &&
|
||||
#ifdef STEED
|
||||
!u.usteed &&
|
||||
#endif
|
||||
is_pole(obj)) ||
|
||||
(!thrown && !u.usteed && is_pole(obj)) ||
|
||||
/* or throw a missile without the proper bow... */
|
||||
(is_ammo(obj) && (thrown != HMON_THROWN ||
|
||||
!ammo_and_launcher(obj, uwep)))) {
|
||||
@@ -693,14 +685,12 @@ int thrown; /* HMON_xxx (0 => hand-to-hand, other => ranged) */
|
||||
&& mon_hates_silver(mon)) {
|
||||
silvermsg = TRUE; silverobj = TRUE;
|
||||
}
|
||||
#ifdef STEED
|
||||
if (u.usteed && !thrown && tmp > 0 &&
|
||||
weapon_type(obj) == P_LANCE && mon != u.ustuck) {
|
||||
jousting = joust(mon, obj);
|
||||
/* exercise skill even for minimal damage hits */
|
||||
if (jousting) valid_weapon_attack = TRUE;
|
||||
}
|
||||
#endif
|
||||
if (thrown == HMON_THROWN &&
|
||||
(is_ammo(obj) || is_missile(obj))) {
|
||||
if (ammo_and_launcher(obj, uwep)) {
|
||||
@@ -991,7 +981,6 @@ int thrown; /* HMON_xxx (0 => hand-to-hand, other => ranged) */
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef STEED
|
||||
if (jousting) {
|
||||
tmp += d(2, (obj == uwep) ? 10 : 2); /* [was in dmgval()] */
|
||||
You("joust %s%s",
|
||||
@@ -1012,11 +1001,8 @@ int thrown; /* HMON_xxx (0 => hand-to-hand, other => ranged) */
|
||||
if (DEADMONSTER(mon)) already_killed = TRUE;
|
||||
}
|
||||
hittxt = TRUE;
|
||||
} else
|
||||
#endif
|
||||
|
||||
/* VERY small chance of stunning opponent if unarmed. */
|
||||
if (unarmed && tmp > 1 && !thrown && !obj && !Upolyd) {
|
||||
} else if (unarmed && tmp > 1 && !thrown && !obj && !Upolyd) {
|
||||
/* VERY small chance of stunning opponent if unarmed. */
|
||||
if (rnd(100) < P_SKILL(P_BARE_HANDED_COMBAT) &&
|
||||
!bigmonst(mdat) && !thick_skinned(mdat)) {
|
||||
if (canspotmon(mon))
|
||||
|
||||
@@ -43,9 +43,7 @@ STATIC_VAR NEARDATA const short skill_names_indices[P_NUM_SKILLS] = {
|
||||
PN_CLERIC_SPELL, PN_ESCAPE_SPELL,
|
||||
PN_MATTER_SPELL,
|
||||
PN_BARE_HANDED, PN_TWO_WEAPONS,
|
||||
#ifdef STEED
|
||||
PN_RIDING
|
||||
#endif
|
||||
};
|
||||
|
||||
/* note: entry [0] isn't used */
|
||||
@@ -1184,7 +1182,6 @@ struct obj *weapon;
|
||||
bonus = ((bonus + 2) * (martial_bonus() ? 2 : 1)) / 2;
|
||||
}
|
||||
|
||||
#ifdef STEED
|
||||
/* KMH -- It's harder to hit while you are riding */
|
||||
if (u.usteed) {
|
||||
switch (P_SKILL(P_RIDING)) {
|
||||
@@ -1196,7 +1193,6 @@ struct obj *weapon;
|
||||
}
|
||||
if (u.twoweap) bonus -= 2;
|
||||
}
|
||||
#endif
|
||||
|
||||
return bonus;
|
||||
}
|
||||
@@ -1253,7 +1249,6 @@ struct obj *weapon;
|
||||
bonus = ((bonus + 1) * (martial_bonus() ? 3 : 1)) / 2;
|
||||
}
|
||||
|
||||
#ifdef STEED
|
||||
/* KMH -- Riding gives some thrusting damage */
|
||||
if (u.usteed && type != P_TWO_WEAPON_COMBAT) {
|
||||
switch (P_SKILL(P_RIDING)) {
|
||||
@@ -1264,7 +1259,6 @@ struct obj *weapon;
|
||||
case P_EXPERT: bonus += 2; break;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
return bonus;
|
||||
}
|
||||
@@ -1326,10 +1320,8 @@ const struct def_skill *class_skill;
|
||||
P_SKILL(P_BARE_HANDED_COMBAT) = P_BASIC;
|
||||
|
||||
/* Roles that start with a horse know how to ride it */
|
||||
#ifdef STEED
|
||||
if (urole.petnum == PM_PONY)
|
||||
P_SKILL(P_RIDING) = P_BASIC;
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Make sure we haven't missed setting the max on a skill
|
||||
|
||||
+3
-13
@@ -106,10 +106,7 @@ register struct obj *obj;
|
||||
unweapon = (obj->oclass == WEAPON_CLASS) ?
|
||||
is_launcher(obj) || is_ammo(obj) ||
|
||||
is_missile(obj) || (is_pole(obj)
|
||||
#ifdef STEED
|
||||
&& !u.usteed
|
||||
#endif
|
||||
) : !is_weptool(obj);
|
||||
&& !u.usteed) : !is_weptool(obj);
|
||||
} else
|
||||
unweapon = TRUE; /* for "bare hands" message */
|
||||
update_inventory();
|
||||
@@ -288,11 +285,7 @@ dowield()
|
||||
return (doswapweapon());
|
||||
else if (wep == uquiver)
|
||||
setuqwep((struct obj *) 0);
|
||||
else if (wep->owornmask & (W_ARMOR | W_RING | W_AMUL | W_TOOL
|
||||
#ifdef STEED
|
||||
| W_SADDLE
|
||||
#endif
|
||||
)) {
|
||||
else if (wep->owornmask & (W_ARMOR | W_RING | W_AMUL | W_TOOL | W_SADDLE)) {
|
||||
You("cannot wield that!");
|
||||
return (0);
|
||||
}
|
||||
@@ -392,10 +385,7 @@ dowieldquiver()
|
||||
!is_plural(uwep) ? "That is" : "They are");
|
||||
return(0);
|
||||
} else if (newquiver->owornmask & (W_ARMOR | W_RING | W_AMUL | W_TOOL
|
||||
#ifdef STEED
|
||||
| W_SADDLE
|
||||
#endif
|
||||
)) {
|
||||
| W_SADDLE)) {
|
||||
You("cannot ready that!");
|
||||
return (0);
|
||||
} else {
|
||||
|
||||
@@ -169,10 +169,8 @@ struct obj *obj;
|
||||
res = W_TOOL; /* WORN_BLINDF */
|
||||
else if (is_weptool(obj) || otyp == TIN_OPENER)
|
||||
res = W_WEP|W_SWAPWEP;
|
||||
#ifdef STEED
|
||||
else if (otyp == SADDLE)
|
||||
res = W_SADDLE;
|
||||
#endif
|
||||
break;
|
||||
case FOOD_CLASS:
|
||||
if (obj->otyp == MEAT_RING) res = W_RINGL|W_RINGR;
|
||||
@@ -382,10 +380,8 @@ boolean on, silently;
|
||||
break;
|
||||
}
|
||||
|
||||
#ifdef STEED
|
||||
if (!on && mon == u.usteed && obj->otyp == SADDLE)
|
||||
dismount_steed(DISMOUNT_FELL);
|
||||
#endif
|
||||
|
||||
/* if couldn't see it but now can, or vice versa, update display */
|
||||
if (!silently && (unseen ^ !canseemon(mon)))
|
||||
@@ -837,7 +833,6 @@ boolean polyspot;
|
||||
m_lose_armor(mon, otmp);
|
||||
}
|
||||
}
|
||||
#ifdef STEED
|
||||
if (!can_saddle(mon)) {
|
||||
if ((otmp = which_armor(mon, W_SADDLE)) != 0) {
|
||||
if (polyspot) bypass_obj(otmp);
|
||||
@@ -861,7 +856,6 @@ boolean polyspot;
|
||||
}
|
||||
dismount_steed(DISMOUNT_FELL);
|
||||
}
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -26,9 +26,7 @@ STATIC_DCL int FDECL(stone_to_flesh_obj, (struct obj *));
|
||||
STATIC_DCL boolean FDECL(zap_updown, (struct obj *));
|
||||
STATIC_DCL void FDECL(zhitu, (int,int,const char *,XCHAR_P,XCHAR_P));
|
||||
STATIC_DCL void FDECL(revive_egg, (struct obj *));
|
||||
#ifdef STEED
|
||||
STATIC_DCL boolean FDECL(zap_steed, (struct obj *));
|
||||
#endif
|
||||
STATIC_DCL void FDECL(skiprange, (int,int *,int *));
|
||||
|
||||
STATIC_DCL int FDECL(zap_hit, (int,int));
|
||||
@@ -300,7 +298,6 @@ struct obj *otmp;
|
||||
} else if (openfallingtrap(mtmp, TRUE, &learn_it)) {
|
||||
/* mtmp might now be on the migrating monsters list */
|
||||
break;
|
||||
#ifdef STEED
|
||||
} else if ((obj = which_armor(mtmp, W_SADDLE)) != 0) {
|
||||
char buf[BUFSZ];
|
||||
|
||||
@@ -316,7 +313,6 @@ struct obj *otmp;
|
||||
}
|
||||
obj_extract_self(obj);
|
||||
mdrop_obj(mtmp, obj, FALSE);
|
||||
#endif /* STEED */
|
||||
}
|
||||
break;
|
||||
case SPE_HEALING:
|
||||
@@ -2433,7 +2429,6 @@ long duration;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
#ifdef STEED
|
||||
/* you've zapped a wand downwards while riding
|
||||
* Return TRUE if the steed was hit by the wand.
|
||||
* Return FALSE if the steed was not hit by the wand.
|
||||
@@ -2495,7 +2490,6 @@ struct obj *obj; /* wand or spell */
|
||||
}
|
||||
return steedhit;
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* cancel a monster (possibly the hero). inventory is cancelled only
|
||||
@@ -2772,13 +2766,10 @@ struct obj *obj;
|
||||
boolean disclose = FALSE, was_unkn = !objects[otyp].oc_name_known;
|
||||
|
||||
exercise(A_WIS, TRUE);
|
||||
#ifdef STEED
|
||||
if (u.usteed && (objects[otyp].oc_dir != NODIR) &&
|
||||
!u.dx && !u.dy && (u.dz > 0) && zap_steed(obj)) {
|
||||
disclose = TRUE;
|
||||
} else
|
||||
#endif
|
||||
if (objects[otyp].oc_dir == IMMEDIATE) {
|
||||
} else if (objects[otyp].oc_dir == IMMEDIATE) {
|
||||
zapsetup(); /* reset obj_zapped */
|
||||
if (u.uswallow) {
|
||||
(void) bhitm(u.ustuck, obj);
|
||||
@@ -3769,9 +3760,7 @@ register int dx,dy;
|
||||
if (mon) {
|
||||
if (type == ZT_SPELL(ZT_FIRE)) break;
|
||||
if (type >= 0) mon->mstrategy &= ~STRAT_WAITMASK;
|
||||
#ifdef STEED
|
||||
buzzmonst:
|
||||
#endif
|
||||
if (zap_hit(find_mac(mon), spell_type)) {
|
||||
if (mon_reflects(mon, (char *)0)) {
|
||||
if(cansee(mon->mx,mon->my)) {
|
||||
@@ -3838,13 +3827,10 @@ register int dx,dy;
|
||||
}
|
||||
} else if (sx == u.ux && sy == u.uy && range >= 0) {
|
||||
nomul(0);
|
||||
#ifdef STEED
|
||||
if (u.usteed && !rn2(3) && !mon_reflects(u.usteed, (char *)0)) {
|
||||
mon = u.usteed;
|
||||
goto buzzmonst;
|
||||
} else
|
||||
#endif
|
||||
if (zap_hit((int) u.uac, 0)) {
|
||||
} else if (zap_hit((int) u.uac, 0)) {
|
||||
range -= 2;
|
||||
pline("%s hits you!", The(fltxt));
|
||||
if (Reflecting) {
|
||||
|
||||
Reference in New Issue
Block a user