summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/stairs.cc
diff options
context:
space:
mode:
authorDavid Ploog <dploog@users.sourceforge.net>2013-11-02 11:38:51 +0100
committerDavid Ploog <dploog@users.sourceforge.net>2013-11-02 11:38:51 +0100
commit5befbcee019236b16f922e9ac8b40f29b22437eb (patch)
tree31daae9b64b3b71691d0d7f77b9a4cac4ef0ea7b /crawl-ref/source/stairs.cc
parentd5b0bda862199d2cad8c3e576462981ef5bbe55d (diff)
downloadcrawl-ref-5befbcee019236b16f922e9ac8b40f29b22437eb.tar.gz
crawl-ref-5befbcee019236b16f922e9ac8b40f29b22437eb.zip
Also require a rune to go from D:15 to D:14.
In case you somehow ended up there (for example early portal to Hell).
Diffstat (limited to 'crawl-ref/source/stairs.cc')
-rw-r--r--crawl-ref/source/stairs.cc19
1 files changed, 19 insertions, 0 deletions
diff --git a/crawl-ref/source/stairs.cc b/crawl-ref/source/stairs.cc
index 8032a8e3ab..db17108349 100644
--- a/crawl-ref/source/stairs.cc
+++ b/crawl-ref/source/stairs.cc
@@ -352,6 +352,25 @@ void up_stairs(dungeon_feature_type force_stair)
return down_stairs(force_stair);
}
+ if (player_in_branch(BRANCH_MAIN_DUNGEON)
+ && you.depth == RUNE_LOCK_DEPTH + 1
+ && (feat_is_stone_stair(stair_find) || feat_is_escape_hatch(stair_find)))
+ {
+ bool has_rune = false;
+ for (int i = 0; i < NUM_RUNE_TYPES; i++)
+ if (you.runes[i])
+ {
+ has_rune = true;
+ break;
+ }
+
+ if (!has_rune)
+ {
+ mpr("You need a rune to go back up.");
+ return;
+ }
+ }
+
// Only check the current position for a legal stair traverse.
if (!force_stair && !_check_stairs(stair_find))
return;