summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/misc.cc
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-06-02 16:52:40 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-06-02 16:52:40 +0000
commit0a4efdf86b33220269f7439aeb5952a88d50efa7 (patch)
treefb0826c6072cd6f598ed9e905dea8faa4fd30601 /crawl-ref/source/misc.cc
parentb50eafe8de72cbcc4431813934695c22642cdd46 (diff)
downloadcrawl-ref-0a4efdf86b33220269f7439aeb5952a88d50efa7.tar.gz
crawl-ref-0a4efdf86b33220269f7439aeb5952a88d50efa7.zip
Fix a stupid bug I'd introduced when fixing another one.
Fix 1939901: Weapon listing not updated right away after being cursed. Put the code to colour arbitrary substrings of a message according to the menu_colour settings into a function of its own, and use it for pick up and eating prompts (currently from floor only) as well as for the "Things that are here" listing. Could be overly spammy, thus needs testing. If all works well, we can remove the "msg =" settings in food_colouring.txt that currently don't do anything anyway, or reuse them for non-prompt messages like "You see here a green rat corpse." git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5436 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/misc.cc')
-rw-r--r--crawl-ref/source/misc.cc16
1 files changed, 14 insertions, 2 deletions
diff --git a/crawl-ref/source/misc.cc b/crawl-ref/source/misc.cc
index 1ce293a3e6..ddd1a0c1cb 100644
--- a/crawl-ref/source/misc.cc
+++ b/crawl-ref/source/misc.cc
@@ -2124,9 +2124,21 @@ void down_stairs( int old_level, dungeon_feature_type force_stair,
if (!player_is_airborne()
&& you.duration[DUR_CONF]
&& !grid_is_escape_hatch(stair_find)
- && random2(100) > you.dex)
+ && force_stair != DNGN_ENTER_ABYSS
+ /*&& random2(100) > you.dex*/)
{
- mpr("In your confused state, you trip and fall down the stairs.");
+ std::string fall_where = "down the stairs";
+
+ if (stair_find == DNGN_ENTER_ABYSS
+ || stair_find == DNGN_ENTER_PANDEMONIUM
+ || stair_find == DNGN_TRANSIT_PANDEMONIUM
+ || stair_find == DNGN_ENTER_PORTAL_VAULT)
+ {
+ fall_where = "through the gate";
+ }
+
+ mprf("In your confused state, you trip and fall %s.",
+ fall_where.c_str());
// Nastier than when climbing stairs, but you'll aways get to
// your destination. -- bwr