consistent level change messages

From a bug report: #M30: 3.4.2 bugs and ideas); describe
flyers (poly'd hero or riding flying steed) as flying when they use ladders
or jump down holes.  This also gives feedback when using the stairs in the
ordinary up or down case, where no message was previously given.
This commit is contained in:
nethack.rankin
2005-09-03 05:36:40 +00:00
parent 545239f4b1
commit e3f1716da9
2 changed files with 27 additions and 16 deletions

View File

@@ -1,4 +1,4 @@
/* SCCS Id: @(#)do.c 3.5 2005/06/22 */
/* SCCS Id: @(#)do.c 3.5 2005/09/02 */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */
@@ -835,7 +835,7 @@ dodown()
}
if (trap)
You("%s %s.", locomotion(youmonst.data, "jump"),
You("%s %s.", Flying ? "fly" : locomotion(youmonst.data, "jump"),
trap->ttyp == HOLE ? "down the hole" : "through the trap door");
if (trap && Is_stronghold(&u.uz)) {
@@ -1172,12 +1172,14 @@ boolean at_stairs, falling, portal;
} else u_on_sstairs();
} else u_on_dnstairs();
}
/* Remove bug which crashes with levitation/punishment KAA */
if (Punished && !Levitation) {
pline("With great effort you climb the %s.",
at_ladder ? "ladder" : "stairs");
} else if (at_ladder)
You("climb up the ladder.");
/* you climb up the {stairs|ladder};
fly up the stairs; fly up along the ladder */
pline("%s %s up%s the %s.",
(Punished && !Levitation) ? "With great effort you" :
"You",
Flying ? "fly" : "climb",
(Flying && at_ladder) ? " along" : "",
at_ladder ? "ladder" : "stairs");
} else { /* down */
if (at_ladder) {
u_on_newpos(xupladder, yupladder);
@@ -1185,11 +1187,14 @@ boolean at_stairs, falling, portal;
if (newdungeon) u_on_sstairs();
else u_on_upstairs();
}
if (u.dz && Flying)
You("fly down along the %s.",
at_ladder ? "ladder" : "stairs");
else if (u.dz &&
(near_capacity() > UNENCUMBERED || Punished || Fumbling)) {
if (!u.dz) {
; /* stayed on same level? (no transit effects) */
} else if (Flying) {
if (flags.verbose)
You("fly down %s.",
at_ladder ? "along the ladder" : "the stairs");
} else if (near_capacity() > UNENCUMBERED ||
Punished || Fumbling) {
You("fall down the %s.", at_ladder ? "ladder" : "stairs");
if (Punished) {
drag_down();
@@ -1210,10 +1215,15 @@ boolean at_stairs, falling, portal;
else
#endif
losehp(Maybe_Half_Phys(rnd(3)),
"falling downstairs", KILLED_BY);
at_ladder ? "falling off a ladder" :
"tumbling down a flight of stairs",
KILLED_BY);
selftouch("Falling, you");
} else if (u.dz && at_ladder)
You("climb down the ladder.");
} else { /* ordinary descent */
if (flags.verbose)
You("%s.", at_ladder ? "climb down the ladder" :
"descend the stairs");
}
}
} else { /* trap door or level_tele or In_endgame */
if (was_in_W_tower && On_W_tower_level(&u.uz))