From f3b1762e5a7ce54cb41729e3d4cedf482c4a42e9 Mon Sep 17 00:00:00 2001 From: j-p-e-g Date: Thu, 26 Mar 2009 23:24:34 +0000 Subject: * Fix Xom's interest wrapping around from 0 to 255. (!!!) * In xom_acts, if Xom was bored (and now did something bad) reroll interest. * Greatly decrease amusement derived from the player entering a new level. (However, entering a new level via escape hatch or shaft is REALLY amusing, more so the deeper the shaft.) * Xom may be amused if you are caught in a net and there are hostile monsters around. * Fix draconian tiles not showing up correctly for Detect Creatures. * Improve card descriptions output for Triple Draw/Stack Five. * In inventory, add '&' hotkey for useless (== inedible) chunks. Still needs documentation. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9557 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/misc.cc | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) (limited to 'crawl-ref/source/misc.cc') diff --git a/crawl-ref/source/misc.cc b/crawl-ref/source/misc.cc index 0c78d07da5..36d1bd7b08 100644 --- a/crawl-ref/source/misc.cc +++ b/crawl-ref/source/misc.cc @@ -1928,12 +1928,11 @@ static void _mark_portal_return_point(const coord_def &pos) // All changes to you.level_type, you.where_are_you and you.your_level // for descending stairs should happen here. -static void _player_change_level_downstairs( - dungeon_feature_type stair_find, - const level_id &place_override, - bool shaft, - int shaft_level, - const level_id &shaft_dest) +static void _player_change_level_downstairs(dungeon_feature_type stair_find, + const level_id &place_override, + bool shaft, + int shaft_level, + const level_id &shaft_dest) { if (_stair_force_destination(place_override)) return; @@ -1999,8 +1998,8 @@ void down_stairs( int old_level, dungeon_feature_type force_stair, branch_type old_where = you.where_are_you; const bool shaft = (!force_stair - && get_trap_type(you.pos()) == TRAP_SHAFT - || force_stair == DNGN_TRAP_NATURAL); + && get_trap_type(you.pos()) == TRAP_SHAFT + || force_stair == DNGN_TRAP_NATURAL); level_id shaft_dest; int shaft_level = -1; @@ -2136,9 +2135,9 @@ void down_stairs( int old_level, dungeon_feature_type force_stair, // Interlevel travel data. const bool collect_travel_data = can_travel_interlevel(); - const level_id old_level_id = level_id::current(); - LevelInfo &old_level_info = travel_cache.get_level_info(old_level_id); - const coord_def stair_pos = you.pos(); + const level_id old_level_id = level_id::current(); + LevelInfo &old_level_info = travel_cache.get_level_info(old_level_id); + const coord_def stair_pos = you.pos(); if (collect_travel_data) old_level_info.update(); @@ -2155,6 +2154,7 @@ void down_stairs( int old_level, dungeon_feature_type force_stair, _mark_portal_return_point(you.pos()); } + const int shaft_depth = (shaft ? shaft_level - you.your_level : 1); _player_change_level_reset(); _player_change_level_downstairs(stair_find, destination_override, shaft, shaft_level, shaft_dest); @@ -2288,7 +2288,12 @@ void down_stairs( int old_level, dungeon_feature_type force_stair, switch (you.level_type) { case LEVEL_DUNGEON: - xom_is_stimulated(49); + // Xom thinks it's funny if you enter a new level via shaft + // or escape hatch, for shafts it's funnier the deeper you fell. + if (shaft || grid_is_escape_hatch(stair_find)) + xom_is_stimulated(shaft_depth * 50); + else + xom_is_stimulated(14); break; case LEVEL_PORTAL_VAULT: -- cgit v1.2.3-54-g00ecf