summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--crawl-ref/source/dungeon.cc28
-rw-r--r--crawl-ref/source/it_use2.cc8
-rw-r--r--crawl-ref/source/spells1.cc19
-rw-r--r--crawl-ref/source/spells3.cc2
-rw-r--r--crawl-ref/source/spells4.cc2
5 files changed, 28 insertions, 31 deletions
diff --git a/crawl-ref/source/dungeon.cc b/crawl-ref/source/dungeon.cc
index 517c5cf10d..1fd256c3fa 100644
--- a/crawl-ref/source/dungeon.cc
+++ b/crawl-ref/source/dungeon.cc
@@ -3662,7 +3662,7 @@ static void _specr_2(spec_room &sr)
return;
bool is_ok = false;
- for ( int tries = 0; tries < 100 && !is_ok; ++tries )
+ for (int tries = 0; tries < 100 && !is_ok; ++tries)
{
is_ok = true;
@@ -3671,23 +3671,23 @@ static void _specr_2(spec_room &sr)
{
case 0:
// go up from north edge
- c.set( random_range(sr.tl.x, sr.br.x - 1), sr.tl.y );
+ c.set(random_range(sr.tl.x, sr.br.x - 1), sr.tl.y);
delta.set(0, -1);
break;
case 1:
// go down from south edge
- c.set( random_range(sr.tl.x, sr.br.x - 1), sr.br.y );
- delta.set(0, 1);
+ c.set(random_range(sr.tl.x, sr.br.x - 1), sr.br.y);
+ delta.set(0, 1);
break;
case 2:
// go left from west edge
- c.set( sr.tl.x, random_range(sr.tl.y, sr.br.y - 1) );
+ c.set(sr.tl.x, random_range(sr.tl.y, sr.br.y - 1));
delta.set(-1, 0);
break;
case 3:
// go right from east edge
- c.set( sr.br.x, random_range(sr.tl.y, sr.br.y - 1) );
- delta.set( 1, 0);
+ c.set(sr.br.x, random_range(sr.tl.y, sr.br.y - 1));
+ delta.set(1, 0);
break;
}
@@ -6217,8 +6217,8 @@ static char _plan_4(char forbid_x1, char forbid_y1, char forbid_x2,
if (forbid_x1 == 0 && one_chance_in(4)) // a market square
{
spec_room sr;
- sr.tl.set(25,25);
- sr.br.set(55,45);
+ sr.tl.set(25, 25);
+ sr.br.set(55, 45);
int oblique_max = 0;
if (!one_chance_in(4))
@@ -7179,22 +7179,22 @@ static void _diamond_rooms(int level_number)
type_floor = DNGN_LAVA;
if (level_number > 10 && one_chance_in(15))
- type_floor = (coinflip()? DNGN_STONE_WALL : DNGN_ROCK_WALL);
+ type_floor = (coinflip() ? DNGN_STONE_WALL : DNGN_ROCK_WALL);
if (level_number > 12 && one_chance_in(20))
type_floor = DNGN_METAL_WALL;
- if (player_in_branch( BRANCH_GEHENNA ))
+ if (player_in_branch(BRANCH_GEHENNA))
type_floor = DNGN_LAVA;
- else if (player_in_branch( BRANCH_COCYTUS ))
+ else if (player_in_branch(BRANCH_COCYTUS))
type_floor = DNGN_DEEP_WATER;
for (i = 0; i < numb_diam; i++)
{
spec_room sr;
- sr.tl.set(8 + random2(43), 8 + random2(35) );
- sr.br.set(5 + random2(15), 5 + random2(10) );
+ sr.tl.set(8 + random2(43), 8 + random2(35));
+ sr.br.set(5 + random2(15), 5 + random2(10));
sr.br += sr.tl;
oblique_max = (sr.br.x - sr.tl.x) / 2;
diff --git a/crawl-ref/source/it_use2.cc b/crawl-ref/source/it_use2.cc
index 5d3f4e795b..b3d296d6a5 100644
--- a/crawl-ref/source/it_use2.cc
+++ b/crawl-ref/source/it_use2.cc
@@ -1,6 +1,6 @@
/*
* File: it_use2.cc
- * Summary: Functions for using wands, potions, and weapon/armour removal.4\3
+ * Summary: Functions for using wands, potions, and weapon/armour removal.
* Written by: Linley Henzell
*/
@@ -245,9 +245,9 @@ bool potion_effect(potion_type pot_eff, int pow, bool drank_it, bool was_known)
}
}
- // Merfolk boots unmeld if levitation takes us out of water
- if(!player_is_airborne() && you.species == SP_MERFOLK
- && grid_is_water(grd(you.pos())))
+ // Merfolk boots unmeld if levitation takes us out of water.
+ if (!player_is_airborne() && you.species == SP_MERFOLK
+ && grid_is_water(grd(you.pos())))
{
unmeld_one_equip(EQ_BOOTS);
}
diff --git a/crawl-ref/source/spells1.cc b/crawl-ref/source/spells1.cc
index e400801e37..4d0389e9eb 100644
--- a/crawl-ref/source/spells1.cc
+++ b/crawl-ref/source/spells1.cc
@@ -234,15 +234,15 @@ void random_blink(bool allow_partial_control, bool override_abyss)
#endif
else
{
- // Going to assume that move_player_to_grid works, (it should
- // because terrain type etc. was already checked). could result
- // in awkward messaging if it cancels for some reason but it's
- // probably better than getting the blink message after any Mf
- // transform messages all the time -cao
+ // Going to assume that move_player_to_grid() works. (It should
+ // because terrain type, etc. was already checked.) This could
+ // result in awkward messaging if it cancels for some reason,
+ // but it's probably better than getting the blink message after
+ // any Mf transform messages all the time. -cao
mpr("You blink.");
coord_def origin = you.pos();
success = move_player_to_grid(target, false, true, true);
- if(success)
+ if (success)
{
// Leave a purple cloud.
place_cloud(CLOUD_PURP_SMOKE, origin, 1 + random2(3), KC_YOU);
@@ -1445,12 +1445,9 @@ void cast_fly(int power)
else
mpr("You fly up into the air.");
- // Merfolk boots unmeld if flight takes us out of water
- if(you.species == SP_MERFOLK && grid_is_water(grd(you.pos())))
- {
+ // Merfolk boots unmeld if flight takes us out of water.
+ if (you.species == SP_MERFOLK && grid_is_water(grd(you.pos())))
unmeld_one_equip(EQ_BOOTS);
- }
-
}
else
mpr("You feel more buoyant.");
diff --git a/crawl-ref/source/spells3.cc b/crawl-ref/source/spells3.cc
index 5ec06009a8..0f431e3aff 100644
--- a/crawl-ref/source/spells3.cc
+++ b/crawl-ref/source/spells3.cc
@@ -1503,7 +1503,7 @@ static bool _teleport_player(bool allow_control, bool new_abyss_area)
#if DEBUG_DIAGNOSTICS
mprf(MSGCH_DIAGNOSTICS,
- "Scattered target square (%d,%d)", pos.x, pos.y );
+ "Scattered target square (%d, %d)", pos.x, pos.y);
#endif
if (is_controlled)
diff --git a/crawl-ref/source/spells4.cc b/crawl-ref/source/spells4.cc
index 3c10f9385a..3f6f187090 100644
--- a/crawl-ref/source/spells4.cc
+++ b/crawl-ref/source/spells4.cc
@@ -1982,7 +1982,7 @@ static int _quadrant_blink(coord_def where, int pow, int, actor *)
coord_def origin = you.pos();
int res = move_player_to_grid(target, false, true, true);
- if(res)
+ if (res)
{
// Leave a purple cloud.
place_cloud(CLOUD_PURP_SMOKE, origin, 1 + random2(3), KC_YOU);