summaryrefslogtreecommitdiffstats
path: root/crawl-ref
diff options
context:
space:
mode:
authordolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2009-07-20 15:26:42 +0000
committerdolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2009-07-20 15:26:42 +0000
commit66d7b7183c339a4f0e5c05c1126e7404f66548d5 (patch)
tree183df40a25fea2cc71da7dac5399f46e4e0ba1fd /crawl-ref
parent472cb8b3bac759205c5f6cb83fc486dd98b52f41 (diff)
downloadcrawl-ref-66d7b7183c339a4f0e5c05c1126e7404f66548d5.tar.gz
crawl-ref-66d7b7183c339a4f0e5c05c1126e7404f66548d5.zip
Apply trunk r10353 to 0.5.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/branches/stone_soup-0.5@10354 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref')
-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 f185c639f2..df7a93a9d6 100644
--- a/crawl-ref/source/monstuff.cc
+++ b/crawl-ref/source/monstuff.cc
@@ -3148,10 +3148,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 90a9b33817..0683978240 100644
--- a/crawl-ref/source/travel.cc
+++ b/crawl-ref/source/travel.cc
@@ -796,6 +796,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);