Use more u_locomotion
... and make it autocapitalize the first letter, just like locomotion
This commit is contained in:
5
src/do.c
5
src/do.c
@@ -1097,8 +1097,7 @@ dodown(void)
|
||||
|
||||
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];
|
||||
@@ -1577,7 +1576,7 @@ goto_level(
|
||||
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 */
|
||||
|
||||
12
src/hack.c
12
src/hack.c
@@ -187,8 +187,7 @@ moverock(void)
|
||||
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> */
|
||||
@@ -1535,11 +1534,14 @@ check_buried_zombies(xchar x, xchar y)
|
||||
}
|
||||
}
|
||||
|
||||
/* 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);
|
||||
}
|
||||
|
||||
@@ -2980,7 +2982,7 @@ check_special_room(boolean newlev)
|
||||
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
|
||||
|
||||
@@ -2806,7 +2806,7 @@ monstone(struct monst* mdef)
|
||||
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));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -507,7 +507,7 @@ dismount_steed(
|
||||
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);
|
||||
|
||||
@@ -696,8 +696,7 @@ dotele(
|
||||
}
|
||||
}
|
||||
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;
|
||||
}
|
||||
@@ -1119,9 +1118,7 @@ level_tele_trap(struct trap* trap, unsigned int trflags)
|
||||
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) {
|
||||
|
||||
12
src/trap.c
12
src/trap.c
@@ -1858,9 +1858,7 @@ trapeffect_web(
|
||||
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]);
|
||||
}
|
||||
@@ -2155,9 +2153,7 @@ trapeffect_poly_trap(
|
||||
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);
|
||||
@@ -2499,7 +2495,7 @@ dotrap(struct trap *trap, unsigned trflags)
|
||||
} 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));
|
||||
@@ -3561,7 +3557,7 @@ climb_pit(void)
|
||||
} 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 */
|
||||
|
||||
Reference in New Issue
Block a user