diff options
author | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-06-23 20:02:57 +0000 |
---|---|---|
committer | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-06-23 20:02:57 +0000 |
commit | 5ab24723edffd09f81cbfb6634fa1b175ed9d054 (patch) | |
tree | 06171fd9d5105fbc6529f9c9379234dd882d0a37 /crawl-ref/source/misc.cc | |
parent | 549d9a53c2f7e7c08f717de066ee56efe0b67fb4 (diff) | |
download | crawl-ref-5ab24723edffd09f81cbfb6634fa1b175ed9d054.tar.gz crawl-ref-5ab24723edffd09f81cbfb6634fa1b175ed9d054.zip |
Move the prompt on entering a level that is marked as dangerous via
annotation or exclusion *before* the delay is started, so it doesn't
cost a turn.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6087 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/misc.cc')
-rw-r--r-- | crawl-ref/source/misc.cc | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/crawl-ref/source/misc.cc b/crawl-ref/source/misc.cc index c975143f50..542a912c17 100644 --- a/crawl-ref/source/misc.cc +++ b/crawl-ref/source/misc.cc @@ -1438,7 +1438,7 @@ static int runes_in_pack() return num_runes; } -static bool _check_annotation_exclusion_warning() +bool check_annotation_exclusion_warning() { coord_def pos(you.x_pos, you.y_pos); level_id next_level_id = level_id::get_next_level_id(pos); @@ -1467,9 +1467,9 @@ static bool _check_annotation_exclusion_warning() canned_msg(MSG_OK); interrupt_activity( AI_FORCE_INTERRUPT ); crawl_state.level_annotation_shown = false; - return false; + return (false); } - return true; + return (true); } void up_stairs(dungeon_feature_type force_stair, @@ -1500,8 +1500,8 @@ void up_stairs(dungeon_feature_type force_stair, LevelInfo &old_level_info = travel_cache.get_level_info(old_level_id); // Does the next level have a warning annotation? - if (!force_stair && !_check_annotation_exclusion_warning()) - return; +// if (!force_stair && !check_annotation_exclusion_warning()) +// return; // Since the overloaded message set turn_is_over, I'm assuming that // the overloaded character makes an attempt... so we're doing this @@ -1814,6 +1814,10 @@ void down_stairs( int old_level, dungeon_feature_type force_stair, mpr("You fall through a shaft!"); } + // Does the next level have a warning annotation? +// if (!force_stair && !check_annotation_exclusion_warning()) +// return; + // All checks are done, the player is on the move now. // Fire level-leaving trigger. @@ -1858,10 +1862,6 @@ void down_stairs( int old_level, dungeon_feature_type force_stair, } } - // Does the next level have a warning annotation? - if (!force_stair && !_check_annotation_exclusion_warning()) - return; - // Interlevel travel data. bool collect_travel_data = can_travel_interlevel(); |