if (trap) {
const char *down_or_thru = trap->ttyp == HOLE ? "down" : "through";
- const char *actn = Flying ? "fly"
- : locomotion(g.youmonst.data, "jump");
+ const char *actn = u_locomotion("jump");
if (g.youmonst.data->msize >= MZ_HUGE) {
char qbuf[QBUFSZ];
if (flags.verbose || great_effort)
pline("%s %s up%s the %s.",
great_effort ? "With great effort, you" : "You",
- Levitation ? "float" : Flying ? "fly" : "climb",
+ u_locomotion("climb"),
(Flying && g.at_ladder) ? " along" : "",
g.at_ladder ? "ladder" : "stairs");
} else { /* down */
spot without pushing it; hero is poly'd into a giant,
so exotic forms of locomotion are out, but might be
levitating (ring, potion, spell) or flying (amulet) */
- You("%s over a boulder here.",
- Levitation ? "float" : Flying ? "fly" : "step");
+ You("%s over a boulder here.", u_locomotion("step"));
/* ["over" seems weird on air level but what else to say?] */
sokoban_guilt();
res = 0; /* move to <sx,sy> */
}
}
+/* return an appropriate locomotion word for hero */
const char *
u_locomotion(const char *def)
{
- return Levitation ? "levitate"
- : Flying ? "fly"
+ boolean capitalize = (*def == highc(*def));
+
+ return Levitation ? (capitalize ? "Float" : "float")
+ : Flying ? (capitalize ? "Fly" : "fly")
: locomotion(g.youmonst.data, def);
}
break;
case MORGUE:
if (midnight()) {
- const char *run = locomotion(g.youmonst.data, "Run");
+ const char *run = u_locomotion("Run");
pline("%s away! %s away!", run, run);
} else
if (wasinside) {
if (is_animal(mdef->data))
You("%s through an opening in the new %s.",
- locomotion(g.youmonst.data, "jump"), xname(otmp));
+ u_locomotion("jump"), xname(otmp));
}
}
case DISMOUNT_THROWN:
case DISMOUNT_FELL:
verb = (reason == DISMOUNT_THROWN) ? "are thrown"
- : ulev ? "float" : ufly ? "fly" : "fall";
+ : u_locomotion("fall");
You("%s off of %s!", verb, mon_nam(mtmp));
if (!have_spot)
have_spot = landing_spot(&cc, reason, 1);
}
}
if (trap)
- You("%s onto the teleportation trap.",
- locomotion(g.youmonst.data, "jump"));
+ You("%s onto the teleportation trap.", u_locomotion("jump"));
} else
trap = 0;
}
Strcpy(verbbuf, "trigger"); /* follows "You sit down." */
intentional = TRUE;
} else
- Sprintf(verbbuf, "%s onto",
- Levitation ? (const char *) "float"
- : locomotion(g.youmonst.data, "step"));
+ Sprintf(verbbuf, "%s onto", u_locomotion("step"));
You("%s a level teleport trap!", verbbuf);
if (Antimagic && !intentional) {
x_monnam(u.usteed, steed_article, "poor",
SUPPRESS_SADDLE, FALSE));
} else {
- Sprintf(verbbuf, "%s into",
- Levitation ? (const char *) "float"
- : locomotion(g.youmonst.data, "stumble"));
+ Sprintf(verbbuf, "%s into", u_locomotion("stumble"));
}
You("%s %s spider web!", verbbuf, a_your[trap->madeby_u]);
}
x_monnam(u.usteed, steed_article, (char *) 0,
SUPPRESS_SADDLE, FALSE));
else
- Sprintf(verbbuf, "%s onto",
- Levitation ? (const char *) "float"
- : locomotion(g.youmonst.data, "step"));
+ Sprintf(verbbuf, "%s onto", u_locomotion("step"));
You("%s a polymorph trap!", verbbuf);
if (Antimagic || Unchanging) {
shieldeff(u.ux, u.uy);
} else if (!forcetrap) {
if (floor_trigger(ttype) && check_in_air(&g.youmonst, trflags)) {
if (already_seen) {
- You("%s over %s %s.", Levitation ? "float" : "fly",
+ You("%s over %s %s.", u_locomotion("step"),
(ttype == ARROW_TRAP && !trap->madeby_u)
? "an" : a_your[trap->madeby_u],
trapname(ttype, FALSE));
} else if ((Flying || is_clinger(g.youmonst.data)) && !Sokoban) {
/* eg fell in pit, then poly'd to a flying monster;
or used '>' to deliberately enter it */
- You("%s from the %s.", Flying ? "fly" : "climb", pitname);
+ You("%s from the %s.", u_locomotion("climb"), pitname);
reset_utrap(FALSE);
fill_pit(u.ux, u.uy);
g.vision_full_recalc = 1; /* vision limits change */