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-05-14 15:00:11 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-05-14 15:00:11 +0000
commitee2afdbd1610f7a204808056bf1a5826085b89c8 (patch)
treedebd3aee3946d707716e13b86e53d3b8539a29a0 /crawl-ref/source/misc.cc
parent4d430b2328d6922783a0dd256428de1585691eb9 (diff)
downloadcrawl-ref-ee2afdbd1610f7a204808056bf1a5826085b89c8.tar.gz
crawl-ref-ee2afdbd1610f7a204808056bf1a5826085b89c8.zip
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
Diffstat (limited to 'crawl-ref/source/misc.cc')
-rw-r--r--crawl-ref/source/misc.cc35
1 files changed, 14 insertions, 21 deletions
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