/* monsters & objects */
#define KOPS /* Keystone Kops by Scott R. Turner */
#define SEDUCE /* Succubi/incubi seduction, by KAA, suggested by IM */
-#define STEED /* Riding steeds */
#define TOURIST /* Tourist players with cameras and Hawaiian shirts */
/* I/O */
#define REDO /* support for redoing last command - DGK */
* Display the hero. It is assumed that all checks necessary to determine
* _if_ the hero can be seen have already been done.
*/
-#ifdef STEED
#define maybe_display_usteed (u.usteed && mon_visible(u.usteed)) ? \
ridden_mon_to_glyph(u.usteed) :
-#else
-#define maybe_display_usteed /* empty */
-#endif
#define display_self() \
show_glyph(u.ux, u.uy, \
/* ### steed.c ### */
-#ifdef STEED
E void NDECL(rider_cant_reach);
E boolean FDECL(can_saddle, (struct monst *));
E int FDECL(use_saddle, (struct obj *));
E void FDECL(dismount_steed, (int));
E void FDECL(place_monster, (struct monst *,int,int));
E boolean FDECL(stucksteed, (BOOLEAN_P));
-#endif
/* ### teleport.c ### */
#define BY_PAPER 2
#define BY_OTHER 9
-#ifdef STEED
/* Macros for why you are no longer riding */
#define DISMOUNT_GENERIC 0
#define DISMOUNT_FELL 1
#define DISMOUNT_ENGULFED 4
#define DISMOUNT_BONES 5
#define DISMOUNT_BYCHOICE 6
-#endif
/* Special returns from mapglyph() */
#define MG_CORPSE 0x01
# define W_RINGR 0x00040000L /* Right ring */
# define W_RING (W_RINGL | W_RINGR)
# define W_TOOL 0x00080000L /* Eyewear */
-#ifdef STEED
# define W_SADDLE 0x00100000L /* KMH -- For riding monsters */
-#endif
# define W_BALL 0x00200000L /* Punishment ball */
# define W_CHAIN 0x00400000L /* Punishment chain */
!(level.monsters[x][y])->mburied)
#define MON_BURIED_AT(x,y) (level.monsters[x][y] != (struct monst *)0 && \
(level.monsters[x][y])->mburied)
-#ifndef STEED
-#define place_monster(m,x,y) ((m)->mx=(x),(m)->my=(y),\
- level.monsters[(m)->mx][(m)->my]=(m))
-#endif
#define place_worm_seg(m,x,y) level.monsters[x][y] = m
#define remove_monster(x,y) level.monsters[x][y] = (struct monst *)0
#define m_at(x,y) (MON_AT(x,y) ? level.monsters[x][y] : \
#define P_BARE_HANDED_COMBAT 36 /* actually weaponless; gloves are ok */
#define P_MARTIAL_ARTS P_BARE_HANDED_COMBAT /* Role distinguishes */
#define P_TWO_WEAPON_COMBAT 37 /* Finally implemented */
-#ifdef STEED
#define P_RIDING 38 /* How well you control your steed */
#define P_LAST_H_TO_H P_RIDING
-#else
-#define P_LAST_H_TO_H P_TWO_WEAPON_COMBAT
-#endif
#define P_FIRST_H_TO_H P_BARE_HANDED_COMBAT
#define P_NUM_SKILLS (P_LAST_H_TO_H+1)
long usleep; /* sleeping; monstermove you last started */
int uinvault;
struct monst *ustuck;
-#ifdef STEED
struct monst *usteed;
long ugallop;
int urideturns;
-#endif
int umortality; /* how many times you died */
int ugrave_arise; /* you die and become something aside from a ghost */
int weapon_slots; /* unused skill slots */
#define HFlying u.uprops[FLYING].intrinsic
#define EFlying u.uprops[FLYING].extrinsic
#define BFlying u.uprops[FLYING].blocked
-#ifdef STEED
# define Flying ((HFlying || EFlying || \
(u.usteed && is_flyer(u.usteed->data))) && \
!BFlying)
-#else
-# define Flying ((HFlying || EFlying) && !BFlying)
-#endif
/* May touch surface; does not override any others */
#define Wwalking (u.uprops[WWALKING].extrinsic && \
#define HSwimming u.uprops[SWIMMING].intrinsic
#define ESwimming u.uprops[SWIMMING].extrinsic /* [Tom] */
-#ifdef STEED
# define Swimming (HSwimming || ESwimming || \
(u.usteed && is_swimmer(u.usteed->data)))
-#else
-# define Swimming (HSwimming || ESwimming)
-#endif
/* Get wet, don't go under water unless if amphibious */
#define HMagical_breathing u.uprops[MAGICAL_BREATHING].intrinsic
(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;
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));
mstatusline(u.usteed);
return res;
} else
-#endif
if (u.uswallow && (u.dx || u.dy || u.dz)) {
mstatusline(u.ustuck);
return res;
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) */
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;
}
}
spotmon = canspotmon(mtmp);
-#ifdef STEED
got_target:
-#endif
if(!mtmp->mtame) {
if(!spotmon)
}
}
}
-#ifdef STEED
/* no pack mules for the Amulet */
if (u.usteed && mon_has_amulet(u.usteed)) return FALSE;
-#endif
return(TRUE);
}
} 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.");
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;
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;
return;
}
}
-#endif
You("begin setting %s%s.",
shk_your(buf, otmp),
defsyms[trap_to_defsym(what_trap(ttyp))].explanation);
} 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) {
case LEASH:
use_leash(obj);
break;
-#ifdef STEED
case SADDLE:
res = use_saddle(obj);
break;
-#endif
case MAGIC_WHISTLE:
use_magic_whistle(obj);
break;
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 */
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
/* 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
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].
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);
}
}
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));
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 */
(char *)0,
(SUPPRESS_SADDLE | SUPPRESS_HALLUCINATION),
FALSE);
-#endif
/*\
* Status (many are abbreviated on bottom line; others are or
/* 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) {
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)
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) {
a_monnam(u.ustuck));
you_are(buf, "");
}
-#ifdef STEED
if (Riding) {
struct obj *saddle = which_armor(u.usteed, W_SADDLE);
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 */
enl_msg(buf, " has", " had", " wounded legs", "");
}
# endif
- } else
-#endif /*STEED*/
- {
+ } else {
Sprintf(buf, "wounded %s", makeplural(body_part(LEG)));
you_have(buf, "");
}
{'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},
#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},
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));
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);
}
/*
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 */
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);
}
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) {
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) ?
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",
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
context.botl = 1;
}
-#ifdef STEED
if (!u.usteed)
-#endif
{
const char *legs = body_part(LEG);
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);
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);
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
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);
makedog()
{
register struct monst *mtmp;
-#ifdef STEED
register struct obj *otmp;
-#endif
const char *petname;
int pettype;
static int petname_used = 0;
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))
otmp->leashmon = mtmp->m_id;
update_mon_intrinsics(mtmp, otmp, TRUE, TRUE);
}
-#endif
if (!petname_used++ && *petname)
mtmp = christen_monst(mtmp, petname);
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
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),
: "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)
/* 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++;
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));
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;
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)) {
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;
} 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));
} else {
return 0;
}
-#endif
} else if (Wounded_legs) {
/* note: jump() has similar code */
long wl = (EWounded_legs & BOTH_SIDES);
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);
}
#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;
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!" :
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);
} 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;
/* 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))))
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;
}
/* 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) {
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
/* 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;
}
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;
}
/* 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);
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;
}
}
} 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");
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))) {
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);
}
{
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 */
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?] */
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.");
}
}
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,
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)
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) ?
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
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);
/* 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
return TRUE;
}
/* not mounted */
-#endif /* STEED */
/* drown(),lava_effects() return true if hero changes
location while surviving the problem */
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
}
if (Levitation || Is_airlevel(&u.uz) /* pugh@cornell */
-#ifdef STEED
|| (u.usteed && strongmonst(u.usteed->data))
-#endif
)
carrcap = MAX_CARR_CAP;
else {
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() */
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));
}
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)
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
*/
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;
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;
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 */
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);
* 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;
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
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 */
!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
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
(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
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)) {
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 */
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 */
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 */
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);
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;
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),
/* 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;
}
/* 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;
}
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)) ||
{
int c = -1;
int timepassed = 0;
-#ifdef STEED
struct obj *otmp;
char qbuf[QBUFSZ];
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;
", 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 */
} /* 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);
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)) {
}
if (!can_ride(u.usteed)) dismount_steed(DISMOUNT_POLY);
}
-#endif
if (flags.verbose) {
static const char use_thec[] = "Use the command #%s to %s.";
}
if (xtime && !old) {
if (talk) {
-#ifdef STEED
if (u.usteed)
You("wobble in the saddle.");
else
-#endif
You("%s...", stagger(youmonst.data, "stagger"));
}
}
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));
}
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;
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;
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))) &&
((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"));
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) {
}
break;
}
-#ifdef STEED
} else if (hit_saddle && saddle) {
char *mnam, buf[BUFSZ], saddle_glows[BUFSZ];
boolean affected = FALSE;
}
if (useeit && !affected)
pline("%s %s wet.", buf, aobjnam(saddle, "get"));
-#endif
} else {
boolean angermon = TRUE;
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);
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 ||
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;
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) {
}
uncurse(otmp);
break;
-#endif
}
}
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;
boolean
restgamestate(fd, stuckid, steedid)
register int fd;
-unsigned int *stuckid, *steedid; /* STEED */
+unsigned int *stuckid, *steedid;
{
struct flag newgameflags;
#ifdef SYSFLAGS
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);
*/
STATIC_OVL void
restlevelstate(stuckid, steedid)
-unsigned int stuckid, steedid; /* STEED */
+unsigned int stuckid, steedid;
{
register struct monst *mtmp;
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;
u.usteed = mtmp;
remove_monster(mtmp->mx, mtmp->my);
}
-#endif
}
/*ARGSUSED*/ /* fd used in MFLOPPY only */
* place_monster() on other levels
*/
u.ustuck = (struct monst *)0;
-#ifdef STEED
u.usteed = (struct monst *)0;
-#endif
#ifdef MICRO
# ifdef AMII_GRAPHICS
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);
* 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;
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);
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);
"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)));
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);
&& 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" : "");
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 &&
otmp->bknown = TRUE;
}
}
-#endif /*STEED*/
}
void
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");
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" */
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" */
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) &&
/* 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);
#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'
level.monsters[x][y] = mon;
}
-#endif /* STEED */
-
/*steed.c*/
* 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) {
{
register struct obj *otmp;
-#ifdef STEED
if (mtmp == u.usteed)
return (FALSE);
-#endif
if (mtmp->mleashed) {
otmp = get_mleash(mtmp);
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;
{
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))
}
}
-#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)) {
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;
}
} 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) {
break;
}
}
-#ifdef STEED
else {
switch (rn2(4)) {
case 1:
}
dismount_steed(DISMOUNT_FELL);
}
-#endif
}
}
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 */
return mtmp;
}
-#ifdef STEED
STATIC_OVL boolean
keep_saddle_with_steedcorpse(steed_mid, objchn, saddle)
unsigned steed_mid;
}
return FALSE;
}
-#endif /*STEED*/
void
dotrap(trap, 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);
}
}
-#ifdef STEED
if (u.usteed) {
u.usteed->mtrapseen |= (1 << (ttype - 1));
/* suppress article in various steed messages when using its
if (has_mname(u.usteed) && !Hallucination)
steed_article = ARTICLE_NONE;
}
-#endif
switch(ttype) {
case ARROW_TRAP:
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);
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,
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)
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:
}
if (!Sokoban) {
char verbbuf[BUFSZ];
-#ifdef STEED
if (u.usteed) {
if ((trflags & RECURSIVETRAP) != 0)
Sprintf(verbbuf, "and %s fall",
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" :
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,
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)),
vision_full_recalc = 1; /* vision limits change */
exercise(A_STR, FALSE);
exercise(A_DEX, FALSE);
-#ifdef STEED
}
-#endif
break;
case HOLE:
case TRAPDOOR:
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" :
{
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
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);
u.uen = (u.uenmax += 2);
break;
} else domagictrap();
-#ifdef STEED
(void) steedintrap(trap, (struct obj *)0);
-#endif
break;
case ANTI_MAGIC:
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"));
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.");
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);
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
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... */
return tnbuf;
}
-#ifdef STEED
STATIC_OVL int
steedintrap(trap, otmp)
struct trap *trap;
}
return steedhit ? 1 : 0;
}
-#endif /*STEED*/
/* some actions common to both player and monsters for triggered landmine */
void
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)))) {
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)) {
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)
dismount_steed(DISMOUNT_GENERIC);
}
}
-#endif
if (Flying) You("are no longer able to control your flight.");
BFlying |= I_SPECIAL;
return;
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
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" :
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.");
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
}
/* 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;
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));
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 */
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;
*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);
}
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;
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;
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) */
{ 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 }
{ 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 }
{ 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 }
{ 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 }
{ 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 }
};
{ 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 }
{ 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 }
{ 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 }
{ 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 }
};
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 *));
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 */
/* 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)))) {
&& 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)) {
}
}
-#ifdef STEED
if (jousting) {
tmp += d(2, (obj == uwep) ? 10 : 2); /* [was in dmgval()] */
You("joust %s%s",
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))
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 */
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)) {
}
if (u.twoweap) bonus -= 2;
}
-#endif
return bonus;
}
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)) {
case P_EXPERT: bonus += 2; break;
}
}
-#endif
return bonus;
}
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
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();
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);
}
!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 {
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;
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)))
m_lose_armor(mon, otmp);
}
}
-#ifdef STEED
if (!can_saddle(mon)) {
if ((otmp = which_armor(mon, W_SADDLE)) != 0) {
if (polyspot) bypass_obj(otmp);
}
dismount_steed(DISMOUNT_FELL);
}
-#endif
return;
}
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));
} 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];
}
obj_extract_self(obj);
mdrop_obj(mtmp, obj, FALSE);
-#endif /* STEED */
}
break;
case SPE_HEALING:
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.
}
return steedhit;
}
-#endif
/*
* cancel a monster (possibly the hero). inventory is cancelled only
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);
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)) {
}
} 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) {
#ifdef TOURIST
| (1L << 10)
#endif
-#ifdef STEED
- | (1L << 11)
-#endif
#ifdef GOLDOBJ
- | (1L << 12)
+ | (1L << 11)
#endif
/* flag bits and/or other global variables (15..26) */
#ifdef TEXTCOLOR
#ifdef REINCARNATION
"rogue level",
#endif
-#ifdef STEED
- "saddles and riding",
-#endif
#ifdef SCORE_ON_BOTL
"score on status line",
#endif
ghack_accelerator_selected,
GINT_TO_POINTER(M('j')), NULL, GNOME_APP_PIXMAP_NONE, NULL, 'j',GDK_MOD1_MASK
},
-#ifdef STEED
{
GNOME_APP_UI_ITEM, N_("Ride"),
N_("Ride (or stop riding) a monster"),
doride,
GINT_TO_POINTER(M('r')), NULL, GNOME_APP_PIXMAP_NONE, NULL, 'R',GDK_MOD1_MASK
},
-#endif
{
GNOME_APP_UI_ITEM, N_("Wipe face"),
N_("wipe off your face"),
{ OBJ_GLYPH, LEATHER_JACKET, "T-shirt" },
{ OBJ_GLYPH, LOCK_PICK, "credit card" },
{ OBJ_GLYPH, MAGIC_LAMP, "expensive camera" },
-#endif
-#ifndef STEED
- { OBJ_GLYPH, TOWEL, "saddle" },
#endif
/* allow slime mold to look like slice of pizza, since we
* don't know what a slime mold should look like when renamed anyway