summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--crawl-ref/source/monstuff.cc6
-rw-r--r--crawl-ref/source/travel.cc13
-rw-r--r--crawl-ref/source/travel.h1
3 files changed, 18 insertions, 2 deletions
diff --git a/crawl-ref/source/monstuff.cc b/crawl-ref/source/monstuff.cc
index 9f5da46605..ccec24b804 100644
--- a/crawl-ref/source/monstuff.cc
+++ b/crawl-ref/source/monstuff.cc
@@ -3300,10 +3300,12 @@ static void _mons_indicate_level_exit(const monsters *mon)
{
command_type dir = grid_stair_direction(gridc);
simple_monster_message(mon,
- make_stringf(" %s the stairs.",
+ make_stringf(" %s the %s.",
dir == CMD_GO_UPSTAIRS ? "goes up" :
dir == CMD_GO_DOWNSTAIRS ? "goes down"
- : "takes").c_str());
+ : "takes",
+ is_escape_hatch(gridc) ? "escape hatch"
+ : "stairs").c_str());
}
else if (is_shaft)
{
diff --git a/crawl-ref/source/travel.cc b/crawl-ref/source/travel.cc
index 9a424a9e47..2b169fba98 100644
--- a/crawl-ref/source/travel.cc
+++ b/crawl-ref/source/travel.cc
@@ -794,6 +794,19 @@ bool is_travelable_stair(dungeon_feature_type gridc)
}
}
+// Returns true if the given dungeon feature is an escape hatch.
+bool is_escape_hatch(dungeon_feature_type gridc)
+{
+ switch (gridc)
+ {
+ case DNGN_ESCAPE_HATCH_DOWN:
+ case DNGN_ESCAPE_HATCH_UP:
+ return (true);
+ default:
+ return (false);
+ }
+}
+
// Returns true if the given dungeon feature can be considered a gate.
bool is_gate(dungeon_feature_type gridc)
{
diff --git a/crawl-ref/source/travel.h b/crawl-ref/source/travel.h
index 30e104f8f8..e584bc3057 100644
--- a/crawl-ref/source/travel.h
+++ b/crawl-ref/source/travel.h
@@ -67,6 +67,7 @@ unsigned char is_waypoint(const coord_def &p);
bool is_exclude_root(const coord_def &p);
bool is_stair(dungeon_feature_type gridc);
bool is_travelable_stair(dungeon_feature_type gridc);
+bool is_escape_hatch(dungeon_feature_type gridc);
bool is_gate(dungeon_feature_type gridc);
command_type direction_to_command( char x, char y );
bool is_altar(dungeon_feature_type gridc);