From ae558c387a4ede86cffe8e4654ea6e544863abc1 Mon Sep 17 00:00:00 2001 From: j-p-e-g Date: Wed, 22 Aug 2007 07:25:57 +0000 Subject: A few small message changes and additions, mostly concerning portals. Oh, and portals will now stop travel just like other interesting features. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2025 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/misc.cc | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) (limited to 'crawl-ref/source/misc.cc') diff --git a/crawl-ref/source/misc.cc b/crawl-ref/source/misc.cc index 5cf37f0ad6..57c56cfb55 100644 --- a/crawl-ref/source/misc.cc +++ b/crawl-ref/source/misc.cc @@ -203,6 +203,10 @@ bool grid_sealable_portal(dungeon_feature_type grid) } } +bool grid_is_portal(dungeon_feature_type grid) +{ + return (grid == DNGN_ENTER_PORTAL_VAULT || grid == DNGN_EXIT_PORTAL_VAULT); +} command_type grid_stair_direction(dungeon_feature_type grid) { @@ -959,15 +963,25 @@ static void exit_stair_message(dungeon_feature_type stair, bool /* going_up */) static void climb_message(dungeon_feature_type stair, bool going_up) { - if (grid_is_rock_stair(stair)) + if (grid_is_portal(stair)) + mpr("You pass through the gateway."); + else if (grid_is_rock_stair(stair)) { if (going_up) mpr("A mysterious force pulls you upwards."); else - mpr("You slide downwards."); + { + mprf("You %s downwards.", you.flies()? "fly" : + (player_is_levitating()? "float" : + "slide")); + } } else - mpr(going_up? "You climb upwards." : "You climb downwards."); + { + mprf("You %s %swards.", you.flies()? "fly" : + (player_is_levitating()? "float" : "climb"), + going_up? "up": "down"); + } } static void leaving_level_now() -- cgit v1.2.3-54-g00ecf