From ee2afdbd1610f7a204808056bf1a5826085b89c8 Mon Sep 17 00:00:00 2001 From: j-p-e-g Date: Wed, 14 May 2008 15:00:11 +0000 Subject: FR 1962016: Make hydra headedness more obvious. You now get messages like "The seven-headed hydra bites." and "You slice the 12-headed hydra." FR 1963606: Take a note when you pick up a rune (or the Orb!) for the first time. There are a couple of other files I changed, but I can't remember any big stuff, so it was probably just cleanup. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5029 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/misc.cc | 35 ++++++++++++++--------------------- 1 file changed, 14 insertions(+), 21 deletions(-) (limited to 'crawl-ref/source/misc.cc') diff --git a/crawl-ref/source/misc.cc b/crawl-ref/source/misc.cc index b5d5eb23e7..6c2ecfa7cd 100644 --- a/crawl-ref/source/misc.cc +++ b/crawl-ref/source/misc.cc @@ -1160,12 +1160,11 @@ void search_around( bool only_adjacent ) if ( max_dist < 1 ) max_dist = 1; - for ( int srx = you.x_pos - max_dist; srx <= you.x_pos + max_dist; ++srx ) - { - for ( int sry=you.y_pos - max_dist; sry<=you.y_pos + max_dist; ++sry ) + for (int srx = you.x_pos - max_dist; srx <= you.x_pos + max_dist; ++srx) + for (int sry = you.y_pos - max_dist; sry <= you.y_pos + max_dist; ++sry) { // must have LOS, with no translucent walls in the way. - if ( see_grid_no_trans(srx,sry) ) + if (see_grid_no_trans(srx, sry)) { // maybe we want distance() instead of grid_distance()? int dist = grid_distance(srx, sry, you.x_pos, you.y_pos); @@ -1177,16 +1176,15 @@ void search_around( bool only_adjacent ) // making this harsher by removing the old +1 int effective = you.skills[SK_TRAPS_DOORS] / (2*dist - 1); - if (grd[srx][sry] == DNGN_SECRET_DOOR && - random2(17) <= effective) + if (grd[srx][sry] == DNGN_SECRET_DOOR + && random2(17) <= effective) { reveal_secret_door(srx, sry); mpr("You found a secret door!"); - exercise(SK_TRAPS_DOORS, ((coinflip()) ? 2 : 1)); + exercise(SK_TRAPS_DOORS, (coinflip() ? 2 : 1)); } - - if (grd[srx][sry] == DNGN_UNDISCOVERED_TRAP && - random2(17) <= effective) + else if (grd[srx][sry] == DNGN_UNDISCOVERED_TRAP + && random2(17) <= effective) { i = trap_at_xy(srx, sry); @@ -1194,7 +1192,7 @@ void search_around( bool only_adjacent ) { grd[srx][sry] = trap_category(env.trap[i].type); mpr("You found a trap!"); - exercise(SK_TRAPS_DOORS, ((coinflip()) ? 2 : 1)); + exercise(SK_TRAPS_DOORS, (coinflip() ? 2 : 1)); } else { @@ -1209,7 +1207,6 @@ void search_around( bool only_adjacent ) } } } - } return; } // end search_around() @@ -1441,8 +1438,7 @@ static void climb_message(dungeon_feature_type stair, bool going_up, else { mprf("You %s downwards.", you.flight_mode() == FL_FLY? "fly" : - (player_is_airborne()? "float" : - "slide")); + (player_is_airborne()? "float" : "slide")); } } else @@ -1471,11 +1467,8 @@ static void set_entry_cause(entry_cause_type default_cause, { ASSERT(default_cause != NUM_ENTRY_CAUSE_TYPES); - if (!(old_level_type != you.level_type - || you.entry_cause == EC_UNKNOWN)) - { + if (old_level_type == you.level_type && you.entry_cause != EC_UNKNOWN) return; - } if (crawl_state.is_god_acting()) { @@ -1585,8 +1578,8 @@ void up_stairs(dungeon_feature_type force_stair, // check before that one. -- bwr if (!player_is_airborne() && you.duration[DUR_CONF] - && (stair_find >= DNGN_STONE_STAIRS_UP_I - && stair_find <= DNGN_STONE_STAIRS_UP_III) + && stair_find >= DNGN_STONE_STAIRS_UP_I + && stair_find <= DNGN_STONE_STAIRS_UP_III && random2(100) > you.dex) { mpr("In your confused state, you trip and fall back down the stairs."); @@ -2012,7 +2005,7 @@ void down_stairs( int old_level, dungeon_feature_type force_stair, { std::string lname = make_filename(you.your_name, you.your_level, you.where_are_you, - you.level_type, false ); + you.level_type, false); #if DEBUG_DIAGNOSTICS mprf( MSGCH_DIAGNOSTICS, "Deleting: %s", lname.c_str() ); #endif -- cgit v1.2.3-54-g00ecf