summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/stairs.cc
diff options
context:
space:
mode:
authorSamuel Bronson <naesten@gmail.com>2013-11-17 23:40:21 -0500
committerSamuel Bronson <naesten@gmail.com>2013-11-17 23:40:21 -0500
commite3c4986a8911f9f682d2c8e54151dce074e3cb9b (patch)
tree0d0096b70b4d58124cdc1344249b6b2f3578668f /crawl-ref/source/stairs.cc
parentb240ed31784fcee02c061640f8add81f8226d594 (diff)
downloadcrawl-ref-e3c4986a8911f9f682d2c8e54151dce074e3cb9b.tar.gz
crawl-ref-e3c4986a8911f9f682d2c8e54151dce074e3cb9b.zip
Indicate how far players get shafted on-screen (and in notes)
Diffstat (limited to 'crawl-ref/source/stairs.cc')
-rw-r--r--crawl-ref/source/stairs.cc11
1 files changed, 9 insertions, 2 deletions
diff --git a/crawl-ref/source/stairs.cc b/crawl-ref/source/stairs.cc
index 304da0c01b..e3b42ef647 100644
--- a/crawl-ref/source/stairs.cc
+++ b/crawl-ref/source/stairs.cc
@@ -680,6 +680,10 @@ void down_stairs(dungeon_feature_type force_stair)
}
shaft_dest = you.shaft_dest(known_shaft);
+ }
+ const int shaft_depth = (shaft ? shaft_dest.depth - you.depth : 1);
+ if (shaft)
+ {
if (shaft_dest == level_id::current())
{
if (known_shaft)
@@ -700,8 +704,12 @@ void down_stairs(dungeon_feature_type force_stair)
handle_items_on_shaft(you.pos(), false);
+ string howfar;
+ if (force_stair && (shaft_depth > 1))
+ howfar = make_stringf(" for %d floors", shaft_depth);
+
if (!you.flight_mode() || force_stair)
- mpr("You fall through a shaft!");
+ mpr("You fall through a shaft" + howfar + "!");
else
mpr("You dive down through the shaft.");
@@ -847,7 +855,6 @@ void down_stairs(dungeon_feature_type force_stair)
you.level_stack.push_back(level_pos::current());
}
- const int shaft_depth = (shaft ? shaft_dest.depth - you.depth : 1);
_player_change_level_reset();
if (shaft)
you.depth = shaft_dest.depth;