summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/terrain.cc
diff options
context:
space:
mode:
Diffstat (limited to 'crawl-ref/source/terrain.cc')
-rw-r--r--crawl-ref/source/terrain.cc19
1 files changed, 17 insertions, 2 deletions
diff --git a/crawl-ref/source/terrain.cc b/crawl-ref/source/terrain.cc
index 53cc4b97f3..4c470000eb 100644
--- a/crawl-ref/source/terrain.cc
+++ b/crawl-ref/source/terrain.cc
@@ -68,15 +68,30 @@ bool grid_is_stone_stair(dungeon_feature_type grid)
bool grid_is_staircase(dungeon_feature_type grid)
{
if (grid_is_stone_stair(grid))
+ {
+ // Make up staircases in hell appear as gates.
+ if (player_in_hell())
+ {
+ switch (grid)
+ {
+ case DNGN_STONE_STAIRS_UP_I:
+ case DNGN_STONE_STAIRS_UP_II:
+ case DNGN_STONE_STAIRS_UP_III:
+ return (false);
+ default:
+ return (true);
+ }
+ }
return (true);
+ }
// All branch entries/exits are staircases, except for Zot.
if (grid == DNGN_ENTER_ZOT || grid == DNGN_RETURN_FROM_ZOT)
return (false);
return (grid >= DNGN_ENTER_FIRST_BRANCH && grid <= DNGN_ENTER_LAST_BRANCH
- || grid >= DNGN_RETURN_FROM_FIRST_BRANCH
- && grid <= DNGN_RETURN_FROM_LAST_BRANCH);
+ || grid >= DNGN_RETURN_FROM_FIRST_BRANCH
+ && grid <= DNGN_RETURN_FROM_LAST_BRANCH);
}
bool grid_is_escape_hatch(dungeon_feature_type grid)