summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeil Moore <neil@s-z.org>2014-05-12 18:00:32 -0400
committerNeil Moore <neil@s-z.org>2014-05-12 18:11:14 -0400
commit9bc6d1f085097d001f0ff31f9bb900bb71957212 (patch)
treeca6c52fa82eac19c98baec7ce93b557e4d5be22e
parentbca6d2d0ab66b008f7f1664769ba4a3a655a3444 (diff)
downloadcrawl-ref-9bc6d1f085097d001f0ff31f9bb900bb71957212.tar.gz
crawl-ref-9bc6d1f085097d001f0ff31f9bb900bb71957212.zip
Formatting fixes (add braces).
This fixes all the instances caught by unbrace.
-rw-r--r--crawl-ref/source/ability.cc10
-rw-r--r--crawl-ref/source/art-func.h2
-rw-r--r--crawl-ref/source/attitude-change.cc2
-rw-r--r--crawl-ref/source/beam.cc12
-rw-r--r--crawl-ref/source/branch.cc2
-rw-r--r--crawl-ref/source/cloud.cc2
-rw-r--r--crawl-ref/source/command.cc2
-rw-r--r--crawl-ref/source/ctest.cc2
-rw-r--r--crawl-ref/source/dbg-asrt.cc4
-rw-r--r--crawl-ref/source/decks.cc2
-rw-r--r--crawl-ref/source/describe.cc4
-rw-r--r--crawl-ref/source/dgn-height.cc2
-rw-r--r--crawl-ref/source/dgn-layouts.cc2
-rw-r--r--crawl-ref/source/dgn-overview.cc2
-rw-r--r--crawl-ref/source/dgn-proclayouts.cc2
-rw-r--r--crawl-ref/source/dgn-shoals.cc2
-rw-r--r--crawl-ref/source/directn.cc2
-rw-r--r--crawl-ref/source/dlua.cc2
-rw-r--r--crawl-ref/source/dungeon.cc6
-rw-r--r--crawl-ref/source/effects.cc2
-rw-r--r--crawl-ref/source/evoke.cc2
-rw-r--r--crawl-ref/source/files.cc6
-rw-r--r--crawl-ref/source/godabil.cc2
-rw-r--r--crawl-ref/source/godpassive.cc4
-rw-r--r--crawl-ref/source/initfile.cc2
-rw-r--r--crawl-ref/source/invent.cc2
-rw-r--r--crawl-ref/source/item_use.cc2
-rw-r--r--crawl-ref/source/itemname.cc4
-rw-r--r--crawl-ref/source/itemprop.cc8
-rw-r--r--crawl-ref/source/items.cc6
-rw-r--r--crawl-ref/source/l_dgn.cc6
-rw-r--r--crawl-ref/source/l_dgnmon.cc6
-rw-r--r--crawl-ref/source/lang-fake.cc4
-rw-r--r--crawl-ref/source/los.cc2
-rw-r--r--crawl-ref/source/macro.cc2
-rw-r--r--crawl-ref/source/makeitem.cc2
-rw-r--r--crawl-ref/source/mapdef.cc8
-rw-r--r--crawl-ref/source/mapdef.h2
-rw-r--r--crawl-ref/source/mapmark.cc4
-rw-r--r--crawl-ref/source/maps.cc6
-rw-r--r--crawl-ref/source/melee_attack.cc4
-rw-r--r--crawl-ref/source/menu.cc2
-rw-r--r--crawl-ref/source/mon-abil.cc4
-rw-r--r--crawl-ref/source/mon-act.cc8
-rw-r--r--crawl-ref/source/mon-cast.cc12
-rw-r--r--crawl-ref/source/mon-clone.cc4
-rw-r--r--crawl-ref/source/mon-death.cc6
-rw-r--r--crawl-ref/source/mon-ench.cc2
-rw-r--r--crawl-ref/source/mon-gear.cc2
-rw-r--r--crawl-ref/source/mon-info.cc2
-rw-r--r--crawl-ref/source/mon-pick.cc2
-rw-r--r--crawl-ref/source/mon-place.cc12
-rw-r--r--crawl-ref/source/monster.cc10
-rw-r--r--crawl-ref/source/package.cc2
-rw-r--r--crawl-ref/source/player-act.cc4
-rw-r--r--crawl-ref/source/player-equip.cc2
-rw-r--r--crawl-ref/source/player-reacts.cc4
-rw-r--r--crawl-ref/source/player.cc6
-rw-r--r--crawl-ref/source/religion.cc4
-rw-r--r--crawl-ref/source/rltiles/tool/tile_list_processor.cc2
-rw-r--r--crawl-ref/source/shout.cc4
-rw-r--r--crawl-ref/source/show.cc2
-rw-r--r--crawl-ref/source/spl-damage.cc6
-rw-r--r--crawl-ref/source/spl-monench.cc2
-rw-r--r--crawl-ref/source/spl-util.cc2
-rw-r--r--crawl-ref/source/sqldbm.cc2
-rw-r--r--crawl-ref/source/stash.cc2
-rw-r--r--crawl-ref/source/state.cc6
-rw-r--r--crawl-ref/source/tags.cc6
-rw-r--r--crawl-ref/source/target.cc8
-rw-r--r--crawl-ref/source/terrain.cc2
-rw-r--r--crawl-ref/source/traps.cc2
-rw-r--r--crawl-ref/source/wiz-item.cc2
-rw-r--r--crawl-ref/source/zotdef.cc2
74 files changed, 288 insertions, 0 deletions
diff --git a/crawl-ref/source/ability.cc b/crawl-ref/source/ability.cc
index 80b8cdf6c0..2ccdd19978 100644
--- a/crawl-ref/source/ability.cc
+++ b/crawl-ref/source/ability.cc
@@ -692,12 +692,16 @@ const string make_cost_description(ability_type ability)
const ability_def& abil = get_ability_def(ability);
string ret;
if (abil.mp_cost)
+ {
ret += make_stringf(", %d %sMP", abil.mp_cost,
abil.flags & ABFLAG_PERMANENT_MP ? "Permanent " : "");
+ }
if (abil.hp_cost)
+ {
ret += make_stringf(", %d %sHP", abil.hp_cost.cost(you.hp_max),
abil.flags & ABFLAG_PERMANENT_HP ? "Permanent " : "");
+ }
if (abil.zp_cost)
ret += make_stringf(", %d ZP", (int)_zp_cost(abil));
@@ -1473,8 +1477,10 @@ static bool _check_ability_possible(const ability_def& abil,
if (tal.is_invocation)
{
if (!quiet)
+ {
mprf("You cannot call out to %s while silenced.",
god_name(you.religion).c_str());
+ }
return false;
}
}
@@ -1484,8 +1490,10 @@ static bool _check_ability_possible(const ability_def& abil,
{
const int expected_hunger = you.hunger - abil.food_cost * 2;
if (!quiet)
+ {
dprf("hunger: %d, max. food_cost: %d, expected hunger: %d",
you.hunger, abil.food_cost * 2, expected_hunger);
+ }
// Safety margin for natural hunger, mutations etc.
if (expected_hunger <= 50)
{
@@ -3476,7 +3484,9 @@ vector<talent> your_talents(bool check_confused, bool include_unusable)
// And finally, the ability to opt-out of your faith {dlb}:
if (!you_worship(GOD_NO_GOD)
&& (include_unusable || !silenced(you.pos())))
+ {
_add_talent(talents, ABIL_RENOUNCE_RELIGION, check_confused);
+ }
if (env.level_state & LSTATE_BEOGH && can_convert_to_beogh())
_add_talent(talents, ABIL_CONVERT_TO_BEOGH, check_confused);
diff --git a/crawl-ref/source/art-func.h b/crawl-ref/source/art-func.h
index 3c2ea55b79..fcfef2d4a6 100644
--- a/crawl-ref/source/art-func.h
+++ b/crawl-ref/source/art-func.h
@@ -1012,8 +1012,10 @@ static void _SPELLBINDER_melee_effects(item_def* weapon, actor* attacker,
for (int i = 0; i <= SPTYP_LAST_EXPONENT; i++)
{
if (testbits(school, 1 << i))
+ {
schools.push_back(
static_cast<spschool_flag_type>(1 << i));
+ }
}
ASSERT(schools.size() > 0);
MiscastEffect(defender, attacker->mindex(),
diff --git a/crawl-ref/source/attitude-change.cc b/crawl-ref/source/attitude-change.cc
index 9825434052..da4fbb2857 100644
--- a/crawl-ref/source/attitude-change.cc
+++ b/crawl-ref/source/attitude-change.cc
@@ -460,7 +460,9 @@ void gozag_break_bribe(monster* victim)
&& !victim->has_ench(ENCH_PERMA_BRIBED)
&& !victim->props.exists(GOZAG_BRIBE_KEY)
&& !victim->props.exists(GOZAG_PERMABRIBE_KEY))
+ {
return;
+ }
const branch_type br = gozag_bribable_branch(victim->type);
ASSERT(br != NUM_BRANCHES);
diff --git a/crawl-ref/source/beam.cc b/crawl-ref/source/beam.cc
index 59877d9d9b..d6b68a2067 100644
--- a/crawl-ref/source/beam.cc
+++ b/crawl-ref/source/beam.cc
@@ -4565,7 +4565,9 @@ static bool _dazzle_monster(monster* mons, actor* act)
{
if (mons->holiness() == MH_UNDEAD || mons->holiness() == MH_NONLIVING
|| mons->holiness() == MH_PLANT)
+ {
return false;
+ }
if (x_chance_in_y(85 - mons->hit_dice * 3 , 100))
{
@@ -4894,8 +4896,10 @@ void bolt::affect_monster(monster* mon)
if (hit_verb.empty())
hit_verb = engulfs ? "engulfs" : "hits";
if (mons_near(mon))
+ {
mprf("The %s %s %s.", name.c_str(), hit_verb.c_str(),
mon->name(DESC_THE).c_str());
+ }
else if (heard && !noise_msg.empty())
mprf(MSGCH_SOUND, "%s", noise_msg.c_str());
}
@@ -5650,7 +5654,9 @@ mon_resist_type bolt::apply_enchantment_to_monster(monster* mon)
(mon->body_size(PSIZE_BODY) > SIZE_BIG)
? " is filled with an intense inner flame!"
: " is filled with an inner flame."))
+ {
obvious_effect = true;
+ }
}
return MON_AFFECTED;
@@ -5703,8 +5709,10 @@ mon_resist_type bolt::apply_enchantment_to_monster(monster* mon)
mon_enchant ench = mon->get_ench(ENCH_POISON);
poison_monster(mon, agent(), ench.degree, false, false);
if (you.can_see(mon))
+ {
mprf("The poison in %s body grows stronger.",
mon->name(DESC_ITS).c_str());
+ }
}
if (mon->check_res_magic(ench_power) > 0)
@@ -6272,7 +6280,9 @@ void bolt::determine_affected_cells(explosion_map& m, const coord_def& delta,
if (feat_is_solid(dngn_feat) && !feat_is_wall(dngn_feat)
&& !(delta.origin() && can_affect_wall(dngn_feat))
&& stop_at_statues)
+ {
return;
+ }
// Check if it passes the callback functions.
bool hits = true;
@@ -6540,8 +6550,10 @@ string bolt::get_short_name() const
return short_name;
if (item != NULL && item->defined())
+ {
return item->name(DESC_A, false, false, false, false,
ISFLAG_IDENT_MASK | ISFLAG_COSMETIC_MASK);
+ }
if (real_flavour == BEAM_RANDOM
|| real_flavour == BEAM_CHAOS
diff --git a/crawl-ref/source/branch.cc b/crawl-ref/source/branch.cc
index 5b324b38e4..1a3cd7180f 100644
--- a/crawl-ref/source/branch.cc
+++ b/crawl-ref/source/branch.cc
@@ -79,7 +79,9 @@ bool branch_is_unfinished(branch_type branch)
#if TAG_MAJOR_VERSION == 34
if (branch == BRANCH_DWARF
|| branch == BRANCH_FOREST)
+ {
return true;
+ }
#endif
return false;
}
diff --git a/crawl-ref/source/cloud.cc b/crawl-ref/source/cloud.cc
index 967cac2160..605d5af46a 100644
--- a/crawl-ref/source/cloud.cc
+++ b/crawl-ref/source/cloud.cc
@@ -227,7 +227,9 @@ static void _spread_fire(const cloud_struct &cloud)
if (!in_bounds(*ai)
|| env.cgrid(*ai) != EMPTY_CLOUD
|| is_sanctuary(*ai))
+ {
continue;
+ }
// burning trees produce flames all around
if (!cell_is_solid(*ai) && make_flames)
diff --git a/crawl-ref/source/command.cc b/crawl-ref/source/command.cc
index cf8a11de8a..0e609bafa1 100644
--- a/crawl-ref/source/command.cc
+++ b/crawl-ref/source/command.cc
@@ -2164,8 +2164,10 @@ static void _add_formatted_keyhelp(column_composer &cols)
#else
#ifdef USE_TILE_WEB
if (tiles.is_controlled_from_web())
+ {
cols.add_formatted(0, "<w>F12</w> : read messages (online play only)",
false);
+ }
else
#endif
_add_command(cols, 0, CMD_READ_MESSAGES, "read messages (online play only)", 2);
diff --git a/crawl-ref/source/ctest.cc b/crawl-ref/source/ctest.cc
index f95852824d..1bb18a34fc 100644
--- a/crawl-ref/source/ctest.cc
+++ b/crawl-ref/source/ctest.cc
@@ -191,6 +191,7 @@ void run_tests()
for_each(tests.begin(), tests.end(), run_test);
if (failures.empty() && !ntests && crawl_state.script)
+ {
failures.push_back(
file_error(
"Script setup",
@@ -199,6 +200,7 @@ void run_tests()
crawl_state.tests_selected.end(),
", ",
", ")));
+ }
}
if (crawl_state.test_list)
diff --git a/crawl-ref/source/dbg-asrt.cc b/crawl-ref/source/dbg-asrt.cc
index e3e4379000..90e32fff0a 100644
--- a/crawl-ref/source/dbg-asrt.cc
+++ b/crawl-ref/source/dbg-asrt.cc
@@ -248,8 +248,10 @@ static void _dump_player(FILE *file)
const unsigned int flags = get_spell_flags(spell);
if (flags & SPFLAG_MONSTER)
+ {
fprintf(file, " spell slot #%d: monster only spell %s\n",
(int)i, spell_title(spell));
+ }
else if (flags & SPFLAG_TESTING)
fprintf(file, " spell slot #%d: testing spell %s\n",
(int)i, spell_title(spell));
@@ -456,8 +458,10 @@ static void _debug_marker_scan()
}
}
if (!found)
+ {
mprf(MSGCH_ERROR, "Marker #%d, type %d at (%d, %d) unlinked",
i, (int) type, marker->pos.x, marker->pos.y);
+ }
}
const coord_def start(MAPGEN_BORDER, MAPGEN_BORDER);
diff --git a/crawl-ref/source/decks.cc b/crawl-ref/source/decks.cc
index a2f3346e80..c26a87d294 100644
--- a/crawl-ref/source/decks.cc
+++ b/crawl-ref/source/decks.cc
@@ -221,6 +221,7 @@ static void _check_odd_card(uint8_t flags)
static bool _card_forbidden(card_type card)
{
if (crawl_state.game_is_zotdef())
+ {
switch (card)
{
case CARD_TOMB:
@@ -230,6 +231,7 @@ static bool _card_forbidden(card_type card)
default:
break;
}
+ }
return false;
}
diff --git a/crawl-ref/source/describe.cc b/crawl-ref/source/describe.cc
index 1b0347d7d6..ce519e6ab2 100644
--- a/crawl-ref/source/describe.cc
+++ b/crawl-ref/source/describe.cc
@@ -3830,8 +3830,10 @@ void get_monster_db_desc(const monster_info& mi, describe_info &inf,
monster& mons = *monster_at(mi.pos);
if (mons.has_originating_map())
+ {
inf.body << make_stringf("\nPlaced by map: %s",
mons.originating_map().c_str());
+ }
inf.body << "\nMonster health: "
<< mons.hit_points << "/" << mons.max_hit_points << "\n";
@@ -3855,9 +3857,11 @@ void get_monster_db_desc(const monster_info& mi, describe_info &inf,
if (mons.wont_attack())
attitude.push_back("wont_attack");
if (!attitude.empty())
+ {
inf.body << "; " << comma_separated_line(attitude.begin(),
attitude.end(),
"; ", "; ");
+ }
if (mons.can_use_spells())
{
diff --git a/crawl-ref/source/dgn-height.cc b/crawl-ref/source/dgn-height.cc
index 6979acd308..f61f7cff1d 100644
--- a/crawl-ref/source/dgn-height.cc
+++ b/crawl-ref/source/dgn-height.cc
@@ -161,12 +161,14 @@ void dgn_island_plan::build_island()
const coord_def offsetC =
dgn_random_point_from(c, addition_offset, level_border_depth);
if (!offsetC.origin())
+ {
dgn_island_centred_at(
offsetC, resolve_range(n_island_aux_delta_points),
resolve_range(island_aux_radius_range),
island_aux_point_height_increment,
level_border_depth,
x_chance_in_y(atoll_roll, 100));
+ }
}
}
diff --git a/crawl-ref/source/dgn-layouts.cc b/crawl-ref/source/dgn-layouts.cc
index 989cb8e454..57a837966d 100644
--- a/crawl-ref/source/dgn-layouts.cc
+++ b/crawl-ref/source/dgn-layouts.cc
@@ -386,7 +386,9 @@ static void _make_trail(int xs, int xr, int ys, int yr, int corrlength,
if (dir.x == 0 && dir.y == 0
|| map_masked(pos + dir, MMT_VAULT))
+ {
continue;
+ }
// Corridor length... change only when going vertical?
if (dir.x == 0 || length == 0)
diff --git a/crawl-ref/source/dgn-overview.cc b/crawl-ref/source/dgn-overview.cc
index 840f4a54d6..e52bca3cb0 100644
--- a/crawl-ref/source/dgn-overview.cc
+++ b/crawl-ref/source/dgn-overview.cc
@@ -328,7 +328,9 @@ static string _get_unseen_branches()
&& seen_lair_branches >= 2)
|| (parent_branch((branch_type)i) == BRANCH_VAULTS)
&& seen_vaults_branches >= 1))
+ {
continue;
+ }
if (i == BRANCH_VESTIBULE || !is_connected_branch(branch))
continue;
diff --git a/crawl-ref/source/dgn-proclayouts.cc b/crawl-ref/source/dgn-proclayouts.cc
index c691145faf..9bd4b92d56 100644
--- a/crawl-ref/source/dgn-proclayouts.cc
+++ b/crawl-ref/source/dgn-proclayouts.cc
@@ -503,7 +503,9 @@ UnderworldLayout::operator()(const coord_def &p, const uint32_t offset) const
{
if ((lateral >= 0.3 && lateral < 0.4 || lateral >= 0.6 && lateral < 0.7)
|| (lateral >= 0.4 && lateral < 0.6 && city < (city_outer_limit+city_wall_width)))
+ {
feat = city_wall;
+ }
else if (lateral >= 0.4 && lateral < 0.6)
feat = DNGN_FLOOR;
}
diff --git a/crawl-ref/source/dgn-shoals.cc b/crawl-ref/source/dgn-shoals.cc
index e0f8909c8a..fb7a8b9add 100644
--- a/crawl-ref/source/dgn-shoals.cc
+++ b/crawl-ref/source/dgn-shoals.cc
@@ -527,10 +527,12 @@ static void _shoals_plant_supercluster(coord_def c,
const coord_def satellite(
dgn_random_point_from(c, random_range(2, 12), _shoals_margin));
if (!satellite.origin())
+ {
_shoals_plant_cluster(satellite, random_range(5, 12, 2),
random_range(2, 7),
favoured_feat,
verboten);
+ }
}
}
diff --git a/crawl-ref/source/directn.cc b/crawl-ref/source/directn.cc
index 8f843408a5..604db50582 100644
--- a/crawl-ref/source/directn.cc
+++ b/crawl-ref/source/directn.cc
@@ -2369,8 +2369,10 @@ static bool _want_target_monster(const monster *mon, int mode)
return mon->friendly();
if (mode == TARG_INJURED_FRIEND)
+ {
return mon->friendly() && mons_get_damage_level(mon) > MDAM_OKAY
|| !mon->wont_attack() && !mon->neutral() && is_pacifiable(mon) >= 0;
+ }
if (mode == TARG_EVOLVABLE_PLANTS)
return mons_is_evolvable(mon);
diff --git a/crawl-ref/source/dlua.cc b/crawl-ref/source/dlua.cc
index 90425abe22..d2282ac6f3 100644
--- a/crawl-ref/source/dlua.cc
+++ b/crawl-ref/source/dlua.cc
@@ -149,9 +149,11 @@ int dlua_chunk::check_op(CLua &interp, int err)
int dlua_chunk::load(CLua &interp)
{
if (!compiled.empty())
+ {
return check_op(interp,
interp.loadbuffer(compiled.c_str(), compiled.length(),
context.c_str()));
+ }
if (empty())
{
diff --git a/crawl-ref/source/dungeon.cc b/crawl-ref/source/dungeon.cc
index 8a382c322d..5453581744 100644
--- a/crawl-ref/source/dungeon.cc
+++ b/crawl-ref/source/dungeon.cc
@@ -2093,8 +2093,10 @@ static void _build_overflow_temples()
vault = random_map_for_tag(vault_tag, true);
#ifdef DEBUG_TEMPLES
if (vault == NULL)
+ {
mprf(MSGCH_DIAGNOSTICS, "Couldn't find overflow temple "
"for combination of tags %s", vault_tag.c_str());
+ }
#endif
}
@@ -3593,7 +3595,9 @@ static coord_def _dgn_random_point_in_bounds(dungeon_feature_type searchfeat,
const coord_def c = random_in_bounds();
if (_point_matches_feat(c, searchfeat, mapmask, adjacent_feat,
monster_free))
+ {
return c;
+ }
}
return coord_def(0, 0);
}
@@ -4740,7 +4744,9 @@ static void _dgn_give_mon_spec_items(mons_spec &mspec,
if (spec.base_type == OBJ_UNASSIGNED
|| (spec.base_type == OBJ_MISCELLANY && spec.sub_type == MISC_RUNE_OF_ZOT))
+ {
continue;
+ }
// Don't give monster a randart, and don't randomly give
// monster an ego item.
diff --git a/crawl-ref/source/effects.cc b/crawl-ref/source/effects.cc
index fac837c58f..75192ff8de 100644
--- a/crawl-ref/source/effects.cc
+++ b/crawl-ref/source/effects.cc
@@ -2706,9 +2706,11 @@ int place_ring(vector<coord_def> &ring_points,
prototype.pos = ring_points.at(i);
if (create_monster(prototype, false))
+ {
spawned_count++;
if (you.see_cell(ring_points.at(i)))
seen_count++;
+ }
}
return spawned_count;
diff --git a/crawl-ref/source/evoke.cc b/crawl-ref/source/evoke.cc
index 3c62bc534b..16a03a8492 100644
--- a/crawl-ref/source/evoke.cc
+++ b/crawl-ref/source/evoke.cc
@@ -874,7 +874,9 @@ static vector<coord_def> _get_jitter_path(coord_def source, coord_def target,
//Don't try to aim at targets in the opposite direction of main aim
if ((abs(aim_dir.x - delta.sgn().x) + abs(aim_dir.y - delta.sgn().y) >= 2)
&& !delta.origin())
+ {
continue;
+ }
target = trace_beam.path_taken.back();
break;
diff --git a/crawl-ref/source/files.cc b/crawl-ref/source/files.cc
index 612526e493..5d220c9688 100644
--- a/crawl-ref/source/files.cc
+++ b/crawl-ref/source/files.cc
@@ -364,8 +364,10 @@ void assert_read_safe_path(const string &path) throw (string)
#ifdef UNIX
if (!shell_safe(path.c_str()))
+ {
throw make_stringf("\"%s\" contains bad characters.",
path.c_str());
+ }
#endif
#ifdef DATA_DIR_PATH
@@ -766,8 +768,10 @@ public:
if (tmp_filename != target_filename)
{
if (rename_u(tmp_filename.c_str(), target_filename.c_str()))
+ {
end(1, true, "failed to rename %s -> %s",
tmp_filename.c_str(), target_filename.c_str());
+ }
}
}
@@ -778,11 +782,13 @@ public:
filep = (lock? lk_open(filemode, tmp_filename)
: fopen_u(tmp_filename.c_str(), filemode));
if (!filep)
+ {
end(-1, true,
"Failed to open \"%s\" (%s; locking:%s)",
tmp_filename.c_str(),
filemode,
lock? "YES" : "no");
+ }
}
return filep;
}
diff --git a/crawl-ref/source/godabil.cc b/crawl-ref/source/godabil.cc
index 50ef66b772..ab8e2e769b 100644
--- a/crawl-ref/source/godabil.cc
+++ b/crawl-ref/source/godabil.cc
@@ -4287,9 +4287,11 @@ int gozag_type_bribable(monster_type type, bool force)
for (unsigned int i = 0; i < ARRAYSZ(mons_bribability); i++)
{
if (mons_bribability[i].type == type)
+ {
return force || branch_bribe[mons_bribability[i].branch]
? mons_bribability[i].susceptibility
: 0;
+ }
}
return 0;
diff --git a/crawl-ref/source/godpassive.cc b/crawl-ref/source/godpassive.cc
index 2810956855..5c1a7d4027 100644
--- a/crawl-ref/source/godpassive.cc
+++ b/crawl-ref/source/godpassive.cc
@@ -329,16 +329,20 @@ string ash_describe_bondage(int flags, bool level)
else
{
if (flags & ETF_ARMOUR && you.bondage[ET_ARMOUR] != -1)
+ {
desc += make_stringf("You are %s bound in armour.\n",
you.bondage[ET_ARMOUR] == 0 ? "not" :
you.bondage[ET_ARMOUR] == 1 ? "partially"
: "fully");
+ }
if (flags & ETF_JEWELS && you.bondage[ET_JEWELS] != -1)
+ {
desc += make_stringf("You are %s bound in magic.\n",
you.bondage[ET_JEWELS] == 0 ? "not" :
you.bondage[ET_JEWELS] == 1 ? "partially"
: "fully");
+ }
}
if (level)
diff --git a/crawl-ref/source/initfile.cc b/crawl-ref/source/initfile.cc
index 4e9b712be7..e8796d88d5 100644
--- a/crawl-ref/source/initfile.cc
+++ b/crawl-ref/source/initfile.cc
@@ -1781,8 +1781,10 @@ void game_options::read_options(LineInput &il, bool runscript,
if (runscript)
{
if (luacode.run(clua))
+ {
mprf(MSGCH_ERROR, "Lua error: %s",
luacode.orig_error().c_str());
+ }
}
#endif
luacode.clear();
diff --git a/crawl-ref/source/invent.cc b/crawl-ref/source/invent.cc
index 56b9002023..b651fb2a75 100644
--- a/crawl-ref/source/invent.cc
+++ b/crawl-ref/source/invent.cc
@@ -1844,9 +1844,11 @@ bool check_warning_inscriptions(const item_def& item,
prompt += (in_inventory(item) ? item.name(DESC_INVENTORY)
: item.name(DESC_A));
if (_nasty_stasis(item, oper))
+ {
prompt += string(" while ")
+ (you.duration[DUR_TELEPORT] ? "about to teleport" :
you.duration[DUR_SLOW] ? "slowed" : "hasted");
+ }
prompt += "?";
return yesno(prompt.c_str(), false, 'n')
&& check_old_item_warning(item, oper);
diff --git a/crawl-ref/source/item_use.cc b/crawl-ref/source/item_use.cc
index ac667c81a2..ea2f856bbe 100644
--- a/crawl-ref/source/item_use.cc
+++ b/crawl-ref/source/item_use.cc
@@ -632,8 +632,10 @@ bool can_wear_armour(const item_def &item, bool verbose, bool ignore_temporary)
if (bad_size)
{
if (verbose)
+ {
mprf("This armour is too %s for you!",
(bad_size > 0) ? "big" : "small");
+ }
return false;
}
diff --git a/crawl-ref/source/itemname.cc b/crawl-ref/source/itemname.cc
index 57c9863a76..0c38ecffa1 100644
--- a/crawl-ref/source/itemname.cc
+++ b/crawl-ref/source/itemname.cc
@@ -3352,8 +3352,10 @@ bool is_useless_item(const item_def &item, bool temp)
case POT_GAIN_DEXTERITY:
#endif
if (you.species == SP_VAMPIRE)
+ {
return temp && you.hunger_state < HS_SATIATED
&& item.sub_type != POT_BENEFICIAL_MUTATION;
+ }
if (you.form == TRAN_LICH)
return temp;
return you.is_undead;
@@ -3646,7 +3648,9 @@ string item_prefix(const item_def &item, bool temp)
if (item.sub_type != BOOK_MANUAL
&& item.sub_type != BOOK_DESTRUCTION
&& item.sub_type != NUM_BOOKS)
+ {
prefixes.push_back("spellbook");
+ }
break;
default:
diff --git a/crawl-ref/source/itemprop.cc b/crawl-ref/source/itemprop.cc
index 3ce469a5e5..148444689d 100644
--- a/crawl-ref/source/itemprop.cc
+++ b/crawl-ref/source/itemprop.cc
@@ -504,7 +504,9 @@ bool curse_an_item(bool ignore_holy_wrath)
if (ignore_holy_wrath && you.inv[i].base_type == OBJ_WEAPONS
&& get_weapon_brand(you.inv[i]) == SPWPN_HOLY_WRATH)
+ {
continue;
+ }
// Item is valid for cursing, so we'll give it a chance.
count++;
@@ -958,7 +960,9 @@ int armour_max_enchant(const item_def &item)
if (eq_slot == EQ_BODY_ARMOUR
|| item.sub_type == ARM_CENTAUR_BARDING
|| item.sub_type == ARM_NAGA_BARDING)
+ {
max_plus = property(item, PARM_AC);
+ }
else if (eq_slot == EQ_SHIELD)
max_plus = 3;
@@ -1491,7 +1495,9 @@ bool is_brandable_weapon(const item_def &wpn, bool allow_ranged)
if (you.duration[DUR_WEAPON_BRAND] != 0
&& you.weapon() == &wpn)
+ {
return false;
+ }
return true;
}
@@ -2355,7 +2361,9 @@ bool gives_ability(const item_def &item)
if (ego == SPARM_DARKNESS || ego == SPARM_FLYING
|| ego == SPARM_JUMPING)
+ {
return true;
+ }
break;
}
default:
diff --git a/crawl-ref/source/items.cc b/crawl-ref/source/items.cc
index 9a725898a0..a1dd6b8e87 100644
--- a/crawl-ref/source/items.cc
+++ b/crawl-ref/source/items.cc
@@ -156,12 +156,16 @@ static bool _item_preferred_to_clean(int item)
if (mitm[item].base_type == OBJ_WEAPONS
&& mitm[item].plus <= 0 && mitm[item].plus2 <= 0
&& !is_artefact(mitm[item]))
+ {
return true;
+ }
if (mitm[item].base_type == OBJ_MISSILES
&& mitm[item].plus <= 0 && mitm[item].plus2 <= 0
&& !is_artefact(mitm[item]))
+ {
return true;
+ }
return false;
}
@@ -3971,9 +3975,11 @@ item_info get_item_info(const item_def& item)
else
{
if (item.sub_type >= MISC_DECK_OF_ESCAPE && item.sub_type <= MISC_DECK_OF_DEFENCE)
+ {
ii.sub_type = NUM_MISCELLANY; // Needs to be changed if we add other
// miscellaneous items that can be
// non-identified
+ }
else
ii.sub_type = item.sub_type;
}
diff --git a/crawl-ref/source/l_dgn.cc b/crawl-ref/source/l_dgn.cc
index 7cffa6474a..b820e77b01 100644
--- a/crawl-ref/source/l_dgn.cc
+++ b/crawl-ref/source/l_dgn.cc
@@ -225,9 +225,11 @@ static int dgn_change_level_flags(lua_State *ls)
static void _chance_magnitude_check(lua_State *ls, int which_par, int chance)
{
if (chance < 0 || chance > CHANCE_ROLL)
+ {
luaL_argerror(ls, which_par,
make_stringf("Chance must be in the range [0,%d]",
CHANCE_ROLL).c_str());
+ }
}
static int dgn_chance(lua_State *ls)
@@ -635,10 +637,12 @@ static int dgn_map_pathfind(lua_State *ls, int minargs,
MAP(ls, 1, map);
const int nargs = lua_gettop(ls);
if (nargs < minargs)
+ {
return luaL_error
(ls,
make_stringf("Not enough points to test connectedness "
"(need at least %d)", minargs / 2).c_str());
+ }
map_def::map_feature_finder feat_finder(*map);
map_def::map_bounds_check bounds_checker(*map);
@@ -1525,9 +1529,11 @@ LUAFN(dgn_with_map_anchors)
for (i = 1; i < top; i += 2)
{
if (lua_isnumber(ls, i) && lua_isnumber(ls, i + 1))
+ {
map_anchor_points.push_back(
coord_def(lua_tointeger(ls, i),
lua_tointeger(ls, i + 1)));
+ }
}
ASSERT(lua_isfunction(ls, -1));
diff --git a/crawl-ref/source/l_dgnmon.cc b/crawl-ref/source/l_dgnmon.cc
index 897751c9df..e8204ff01f 100644
--- a/crawl-ref/source/l_dgnmon.cc
+++ b/crawl-ref/source/l_dgnmon.cc
@@ -146,19 +146,25 @@ static int dgn_set_random_mon_list(lua_State *ls)
mons.push_back(mon);
if (mon.number != 0)
+ {
mprf(MSGCH_ERROR, "dgn.set_random_mon_list() : number for %s "
"being discarded.",
name.c_str());
+ }
if (mon.colour != BLACK)
+ {
mprf(MSGCH_ERROR, "dgn.set_random_mon_list() : colour for "
"%s being ignored.",
name.c_str());
+ }
if (!mon.items.empty())
+ {
mprf(MSGCH_ERROR, "dgn.set_random_mon_list() : items for "
"%s being ignored.",
name.c_str());
+ }
} // for (int i = 0; i < num_mons; i++)
if (mons.empty() && num_lords > 0)
diff --git a/crawl-ref/source/lang-fake.cc b/crawl-ref/source/lang-fake.cc
index 33b06f0d80..6b44d41d37 100644
--- a/crawl-ref/source/lang-fake.cc
+++ b/crawl-ref/source/lang-fake.cc
@@ -339,6 +339,7 @@ static void _german(string &txt)
*/
for (unsigned int i = 0; i < txt.length(); i++)
if (txt[i] == 'c' || txt[i] == 'C')
+ {
switch (tolower(txt[i+1]))
{
case 'h': case 'z':
@@ -349,6 +350,7 @@ static void _german(string &txt)
default:
txt[i] = isalower(txt[i]) ? 'k' : 'K';
}
+ }
/*
There will be growing publik enthusiasm in the sekond year when the
troublesome "ph" will be replaced with "f". This will make words like
@@ -381,7 +383,9 @@ static void _german(string &txt)
if (!isaalpha(txt[i-1])
|| !isaalpha(txt[i-2])
|| !isaalpha(txt[i-3]))
+ {
continue;
+ }
txt.erase(i, 1);
}
/*
diff --git a/crawl-ref/source/los.cc b/crawl-ref/source/los.cc
index 6140dadc8b..72ab83782f 100644
--- a/crawl-ref/source/los.cc
+++ b/crawl-ref/source/los.cc
@@ -422,8 +422,10 @@ static void _create_blockrays()
{
blockrays(*qi) = new bit_vector(n_min_rays);
for (int i = 0; i < n_min_rays; ++i)
+ {
blockrays(*qi)->set(i, all_blockrays(*qi)
->get(min_indices[i]));
+ }
}
// We can throw away all_blockrays now.
diff --git a/crawl-ref/source/macro.cc b/crawl-ref/source/macro.cc
index 6b87824d35..36b32045dc 100644
--- a/crawl-ref/source/macro.cc
+++ b/crawl-ref/source/macro.cc
@@ -989,9 +989,11 @@ void macro_add_query(void)
{
const bool deleted_macro = macro_del(mapref, key);
if (deleted_macro)
+ {
mprf("Deleted %s for '%s'.",
macro_type.c_str(),
vtostr(key).c_str());
+ }
else
canned_msg(MSG_OK);
}
diff --git a/crawl-ref/source/makeitem.cc b/crawl-ref/source/makeitem.cc
index 0233f7a5e3..b988853308 100644
--- a/crawl-ref/source/makeitem.cc
+++ b/crawl-ref/source/makeitem.cc
@@ -2650,7 +2650,9 @@ static void _generate_jewellery_item(item_def& item, bool allow_uniques,
if (force_type != OBJ_RANDOM
&& force_type != NUM_RINGS
&& force_type != NUM_JEWELLERY)
+ {
item.sub_type = force_type;
+ }
else
{
int tries = 500;
diff --git a/crawl-ref/source/mapdef.cc b/crawl-ref/source/mapdef.cc
index d06a882d8c..4f71a41e05 100644
--- a/crawl-ref/source/mapdef.cc
+++ b/crawl-ref/source/mapdef.cc
@@ -290,8 +290,10 @@ void level_range::set(const string &br, int s, int d) throw (string)
deepest = d;
if (deepest < shallowest || deepest <= 0)
+ {
throw make_stringf("Level-range %s:%d-%d is malformed",
br.c_str(), s, d);
+ }
}
level_range level_range::parse(string s) throw (string)
@@ -2588,9 +2590,11 @@ void map_def::copy_hooks_from(const map_def &other_map, const string &hook_name)
const dlua_set_map mset(this);
if (!dlua.callfn("dgn_map_copy_hooks_from", "ss",
other_map.name.c_str(), hook_name.c_str()))
+ {
mprf(MSGCH_ERROR, "Lua error copying hook (%s) from '%s' to '%s': %s",
hook_name.c_str(), other_map.name.c_str(),
name.c_str(), dlua.error.c_str());
+ }
}
// Runs Lua hooks registered by the map's Lua code, if any. Returns true if
@@ -2601,9 +2605,11 @@ bool map_def::run_hook(const string &hook_name, bool die_on_lua_error)
if (!dlua.callfn("dgn_map_run_hook", "s", hook_name.c_str()))
{
if (die_on_lua_error)
+ {
end(1, false, "Lua error running hook '%s' on map '%s': %s",
hook_name.c_str(), name.c_str(),
rewrite_chunk_errors(dlua.error).c_str());
+ }
else
mprf(MSGCH_ERROR, "Lua error running hook '%s' on map '%s': %s",
hook_name.c_str(), name.c_str(),
@@ -2810,9 +2816,11 @@ string map_def::validate_map_def(const depth_ranges &default_depths)
if (has_tag("abyss") || has_tag("abyss_rune"))
{
if (orient == MAP_ENCOMPASS)
+ {
return make_stringf(
"Map '%s' cannot use 'encompass' orientation in the abyss",
name.c_str());
+ }
const int max_abyss_map_width =
GXM / 2 - MAPGEN_BORDER - ABYSS_AREA_SHIFT_RADIUS;
diff --git a/crawl-ref/source/mapdef.h b/crawl-ref/source/mapdef.h
index 8a09eff37b..43e44fc568 100644
--- a/crawl-ref/source/mapdef.h
+++ b/crawl-ref/source/mapdef.h
@@ -1040,8 +1040,10 @@ public:
ranges.clear(reader_fn(inf));
const int count = unmarshallShort(inf);
for (int i = 0; i < count; ++i)
+ {
ranges.depth_range_Xs.push_back(
depth_range_X<X>::read(inf, reader_fn));
+ }
return ranges;
}
template <typename writer_fn_type>
diff --git a/crawl-ref/source/mapmark.cc b/crawl-ref/source/mapmark.cc
index c0016c1515..aec021857b 100644
--- a/crawl-ref/source/mapmark.cc
+++ b/crawl-ref/source/mapmark.cc
@@ -201,8 +201,10 @@ map_lua_marker::map_lua_marker(const string &s, const string &,
else
{
if (dlua.execstring(("return " + s).c_str(), "lua_marker_mapless", 1))
+ {
mprf(MSGCH_ERROR, "lua_marker_mapless exec error: %s",
dlua.error.c_str());
+ }
}
check_register_table();
}
@@ -1299,8 +1301,10 @@ void remove_markers_and_listeners_at(coord_def p)
for (int i = 0, size = markers.size(); i < size; ++i)
{
if (markers[i]->get_type() == MAT_LUA_MARKER)
+ {
dungeon_events.remove_listener(
dynamic_cast<map_lua_marker*>(markers[i]));
+ }
}
env.markers.remove_markers_at(p);
diff --git a/crawl-ref/source/maps.cc b/crawl-ref/source/maps.cc
index 9497ffa965..8dc9e4a185 100644
--- a/crawl-ref/source/maps.cc
+++ b/crawl-ref/source/maps.cc
@@ -492,7 +492,9 @@ static bool _connected_minivault_place(const coord_def &c,
if (_may_overwrite_feature(ci, false, false)
|| (place.map.has_tag("replace_portal")
&& _is_portal_place(ci)))
+ {
return true;
+ }
}
return false;
@@ -1503,8 +1505,10 @@ void reread_maps()
void dump_map(const map_def &map)
{
if (crawl_state.dump_maps)
+ {
fprintf(stderr, "\n----------------------------------------\n%s\n",
map.describe().c_str());
+ }
}
void add_parsed_map(const map_def &md)
@@ -1536,8 +1540,10 @@ void run_map_local_preludes()
{
string err = vdefs[i].run_lua(true);
if (!err.empty())
+ {
mprf(MSGCH_ERROR, "Lua error (map %s): %s",
vdefs[i].name.c_str(), err.c_str());
+ }
}
}
}
diff --git a/crawl-ref/source/melee_attack.cc b/crawl-ref/source/melee_attack.cc
index 9f3a72a897..10fa8ca580 100644
--- a/crawl-ref/source/melee_attack.cc
+++ b/crawl-ref/source/melee_attack.cc
@@ -307,9 +307,11 @@ bool melee_attack::handle_phase_attempted()
if (attk_flavour == AF_SHADOWSTAB && defender && !defender->can_see(attacker))
{
if (you.see_cell(attack_position))
+ {
mprf("%s strikes at %s from the darkness!",
attacker->name(DESC_THE, true).c_str(),
defender->name(DESC_THE).c_str());
+ }
to_hit = AUTOMATIC_HIT;
needs_message = false;
}
@@ -3856,9 +3858,11 @@ bool melee_attack::_extra_aux_attack(unarmed_attack_type atk, bool is_uc)
return false;
if (atk == UNAT_CONSTRICT)
+ {
return is_uc
|| you.species == SP_NAGA && you.experience_level > 12
|| you.species == SP_OCTOPODE && you.has_usable_tentacle();
+ }
if (you.strength() + you.dex() <= random2(50))
return false;
diff --git a/crawl-ref/source/menu.cc b/crawl-ref/source/menu.cc
index 2c90643ac8..1eb6164e4a 100644
--- a/crawl-ref/source/menu.cc
+++ b/crawl-ref/source/menu.cc
@@ -3312,6 +3312,7 @@ MenuObject::InputReturnValue MenuFreeform::process_input(int key)
}
if (m_active_item == NULL && m_default_item != NULL)
+ {
switch (key)
{
case CK_UP:
@@ -3322,6 +3323,7 @@ MenuObject::InputReturnValue MenuFreeform::process_input(int key)
set_active_item(m_default_item);
return MenuObject::INPUT_ACTIVE_CHANGED;
}
+ }
MenuItem* find_entry = NULL;
switch (key)
diff --git a/crawl-ref/source/mon-abil.cc b/crawl-ref/source/mon-abil.cc
index 50107b5613..3b8e0eff47 100644
--- a/crawl-ref/source/mon-abil.cc
+++ b/crawl-ref/source/mon-abil.cc
@@ -4534,9 +4534,11 @@ void mon_nearby_ability(monster* mons)
{
const bool can_see = you.can_see(mons);
if (can_see && you.can_see(foe))
+ {
mprf("%s blinks at %s.",
mons->name(DESC_THE).c_str(),
foe->name(DESC_THE).c_str());
+ }
int confuse_power = 2 + random2(3);
@@ -4571,9 +4573,11 @@ void mon_nearby_ability(monster* mons)
{
const bool can_see = you.can_see(mons);
if (can_see && you.can_see(foe))
+ {
mprf("%s stares at %s.",
mons->name(DESC_THE).c_str(),
foe->name(DESC_THE).c_str());
+ }
if (foe->is_player() && !can_see)
canned_msg(MSG_BEING_WATCHED);
diff --git a/crawl-ref/source/mon-act.cc b/crawl-ref/source/mon-act.cc
index 43e9a29d76..531ad855f5 100644
--- a/crawl-ref/source/mon-act.cc
+++ b/crawl-ref/source/mon-act.cc
@@ -1737,7 +1737,9 @@ static void _pre_monster_move(monster* mons)
{
if (mons->props["foe_pos"].get_coord().distance_from(mons->pos())
> foe->pos().distance_from(mons->pos()))
+ {
mons->props["foe_approaching"].get_bool() = true;
+ }
else
mons->props["foe_approaching"].get_bool() = false;
@@ -3344,7 +3346,9 @@ bool mon_can_move_to_pos(const monster* mons, const coord_def& delta,
if (targmonster->type == MONS_TOADSTOOL
&& mons->type == MONS_WANDERING_MUSHROOM)
+ {
return true;
+ }
// Cut down plants only when no alternative, or they're
// our target.
@@ -3702,7 +3706,9 @@ static bool _may_cutdown(monster* mons, monster* targ)
// Don't try to attack briars unless their damage will be insignificant
if (targ->type == MONS_BRIAR_PATCH && mons->type != MONS_THORN_HUNTER
&& (mons->armour_class() * mons->hit_points) < 400)
+ {
return false;
+ }
else
return true;
}
@@ -4141,9 +4147,11 @@ static void _heated_area(monster* mons)
if (final_damage > 0)
{
if (mons->observable())
+ {
mprf("%s is %s by your radiant heat.",
mons->name(DESC_THE).c_str(),
(final_damage) > 10 ? "blasted" : "burned");
+ }
behaviour_event(mons, ME_DISTURB, 0, mons->pos());
diff --git a/crawl-ref/source/mon-cast.cc b/crawl-ref/source/mon-cast.cc
index c27d21e029..f7b48dbcf8 100644
--- a/crawl-ref/source/mon-cast.cc
+++ b/crawl-ref/source/mon-cast.cc
@@ -1813,7 +1813,9 @@ static bool _ms_waste_of_time(const monster* mon, spell_type monspell)
if (mons_aligned(mon, *mi) && !mi->has_ench(ENCH_CHARM)
&& *mi != mon && mon->see_cell_no_trans(mi->pos())
&& !mi->has_ench(ENCH_INJURY_BOND))
+ {
return false; // We found at least one target; that's enough.
+ }
}
ret = true;
break;
@@ -1937,7 +1939,9 @@ static bool _ms_waste_of_time(const monster* mon, spell_type monspell)
&& !adjacent(you.pos(), mon->pos())
|| (mon->foe != MHITYOU && mon->foe != MHITNOT
&& !adjacent(menv[mon->foe].pos(), mon->pos())))
+ {
ret = true;
+ }
break;
case SPELL_PORTAL_PROJECTILE:
@@ -3307,7 +3311,9 @@ bool handle_mon_spell(monster* mons, bolt &beem)
{
if (cast_los_attack_spell(spell_cast, mons->spell_hd(spell_cast),
mons, false) != SPRET_SUCCESS)
+ {
return false;
+ }
}
else if (spell_cast == SPELL_OLGREBS_TOXIC_RADIANCE)
{
@@ -4146,7 +4152,9 @@ static coord_def _mons_fragment_target(monster *mons)
bolt beam;
if (!setup_fragmentation_beam(beam, pow, mons, *di, false, true, true,
NULL, temp, temp))
+ {
continue;
+ }
beam.range = range;
fire_tracer(mons, beam, true);
@@ -4156,7 +4164,9 @@ static coord_def _mons_fragment_target(monster *mons)
bolt beam2;
if (!setup_fragmentation_beam(beam2, pow, mons, *di, false, false, true,
NULL, temp, temp))
+ {
continue;
+ }
beam2.range = range;
fire_tracer(mons, beam2, true);
@@ -4760,8 +4770,10 @@ void mons_cast(monster* mons, bolt &pbolt, spell_type spell_cast,
case SPELL_STONESKIN:
{
if (you.can_see(mons))
+ {
mprf("%s skin hardens.",
apostrophise(mons->name(DESC_THE)).c_str());
+ }
const int power = (mons->spell_hd(spell_cast) * 15) / 10;
mons->add_ench(mon_enchant(ENCH_STONESKIN, 0, mons,
BASELINE_DELAY * (10 + (2 * random2(power)))));
diff --git a/crawl-ref/source/mon-clone.cc b/crawl-ref/source/mon-clone.cc
index dc6928338a..0f069d111a 100644
--- a/crawl-ref/source/mon-clone.cc
+++ b/crawl-ref/source/mon-clone.cc
@@ -50,7 +50,9 @@ static bool _monster_clone_exists(monster* mons)
monster* thing(*mi);
if (thing->props.exists(clone_slave_key)
&& thing->props[clone_slave_key].get_string() == clone_id)
+ {
return true;
+ }
}
return false;
}
@@ -123,9 +125,11 @@ static void _mons_summon_monster_illusion(monster* caster,
if (cloning_visible)
{
if (!you.can_see(caster))
+ {
mprf("%s seems to step out of %s!",
foe->name(DESC_THE).c_str(),
foe->pronoun(PRONOUN_REFLEXIVE).c_str());
+ }
else
mprf("%s seems to draw %s out of %s!",
caster->name(DESC_THE).c_str(),
diff --git a/crawl-ref/source/mon-death.cc b/crawl-ref/source/mon-death.cc
index bbef669d3c..a37bcf45a0 100644
--- a/crawl-ref/source/mon-death.cc
+++ b/crawl-ref/source/mon-death.cc
@@ -3053,11 +3053,15 @@ void hogs_to_humans()
if (!(mi->type == MONS_HOG
|| mi->type == MONS_HELL_HOG
|| mi->type == MONS_HOLY_SWINE))
+ {
continue;
+ }
if (!mi->props.exists("kirke_band")
&& !mi->props.exists(ORIG_MONSTER_KEY))
+ {
continue;
+ }
// Shapeshifters will stop being a hog when they feel like it.
if (mi->is_shapeshifter())
@@ -3084,8 +3088,10 @@ void hogs_to_humans()
else if (any > 1)
{
if (any == human)
+ {
final_msg = "No longer under Kirke's spell, the hogs revert to their "
"human forms!";
+ }
else
final_msg = "No longer under Kirke's spell, the hogs revert to their "
"original forms!";
diff --git a/crawl-ref/source/mon-ench.cc b/crawl-ref/source/mon-ench.cc
index ac974fb7ce..8598e5def6 100644
--- a/crawl-ref/source/mon-ench.cc
+++ b/crawl-ref/source/mon-ench.cc
@@ -1011,8 +1011,10 @@ void monster::remove_enchantment_effect(const mon_enchant &me, bool quiet)
case ENCH_BLACK_MARK:
if (!quiet)
+ {
simple_monster_message(this, " is no longer absorbing vital"
" energies.");
+ }
calc_speed();
break;
diff --git a/crawl-ref/source/mon-gear.cc b/crawl-ref/source/mon-gear.cc
index 8445e983ca..e9f59fdd78 100644
--- a/crawl-ref/source/mon-gear.cc
+++ b/crawl-ref/source/mon-gear.cc
@@ -139,7 +139,9 @@ static void _give_wand(monster* mon, int level)
{
if (!mons_is_unique(mon->type) || mons_class_flag(mon->type, M_NO_WAND)
|| !_should_give_unique_item(mon))
+ {
return;
+ }
if (!one_chance_in(5) && (mon->type != MONS_MAURICE || !one_chance_in(3)))
return;
diff --git a/crawl-ref/source/mon-info.cc b/crawl-ref/source/mon-info.cc
index 6f6ba1e515..68a1d31abb 100644
--- a/crawl-ref/source/mon-info.cc
+++ b/crawl-ref/source/mon-info.cc
@@ -45,7 +45,9 @@ static monster_info_flags ench_to_mb(const monster& mons, enchant_type ench)
|| ench == ENCH_SWIFT
|| ench == ENCH_PETRIFIED
|| ench == ENCH_PETRIFYING))
+ {
return NUM_MB_FLAGS;
+ }
if (ench == ENCH_HASTE && mons.has_ench(ENCH_SLOW))
return NUM_MB_FLAGS;
diff --git a/crawl-ref/source/mon-pick.cc b/crawl-ref/source/mon-pick.cc
index 2cc472a8e2..35ffe7e471 100644
--- a/crawl-ref/source/mon-pick.cc
+++ b/crawl-ref/source/mon-pick.cc
@@ -181,7 +181,9 @@ monster_type pick_monster_all_branches(int absdepth0, monster_picker &picker,
if (veto && (*veto)(pop->value)
|| !veto && picker.veto(pop->value))
+ {
continue;
+ }
int rar = picker.rarity_at(pop, depth);
ASSERT(rar > 0);
diff --git a/crawl-ref/source/mon-place.cc b/crawl-ref/source/mon-place.cc
index 3eedb2e16e..a44d7a11bb 100644
--- a/crawl-ref/source/mon-place.cc
+++ b/crawl-ref/source/mon-place.cc
@@ -204,6 +204,7 @@ bool monster_can_submerge(const monster* mon, dungeon_feature_type feat)
if (!mon->is_habitable_feat(feat))
return false;
if (mons_class_flag(mon->type, M_SUBMERGES))
+ {
switch (mons_habitat(mon))
{
case HT_WATER:
@@ -218,6 +219,7 @@ bool monster_can_submerge(const monster* mon, dungeon_feature_type feat)
default:
return false;
}
+ }
else
return false;
}
@@ -1105,7 +1107,9 @@ monster* place_monster(mgen_data mg, bool force_pos, bool dont_place)
if (mon->mindex() >= MAX_MONSTERS - 30
|| (mg.proximity == PROX_NEAR_STAIRS && !crawl_state.game_is_zotdef())
|| (crawl_state.game_is_zotdef() && you.num_turns < 2000))
+ {
return mon;
+ }
// Not PROX_NEAR_STAIRS, so it will be part of a band, if there is any.
if (band_size > 1)
@@ -1289,6 +1293,7 @@ static monster* _place_monster_aux(const mgen_data &mg, const monster *leader,
// Pick the correct Serpent of Hell.
if (mon->type == MONS_SERPENT_OF_HELL)
+ {
switch (place.branch)
{
case BRANCH_COCYTUS:
@@ -1302,6 +1307,7 @@ static monster* _place_monster_aux(const mgen_data &mg, const monster *leader,
break;
default: ; // if it spawns out of Hell (sprint, wizmode), use Gehenna
}
+ }
// Generate a brand shiny new monster, or zombie.
if (mons_class_is_zombified(mg.cls))
@@ -3073,9 +3079,11 @@ static monster_type _band_member(band_type band, int which)
0);
case BAND_DEEP_TROLLS:
if (one_chance_in(4))
+ {
return random_choose(MONS_DEEP_TROLL_EARTH_MAGE,
MONS_DEEP_TROLL_SHAMAN,
-1);
+ }
return MONS_DEEP_TROLL;
case BAND_HOGS:
return MONS_HOG;
@@ -3180,10 +3188,12 @@ static monster_type _band_member(band_type band, int which)
case BAND_VAULT_WARDEN:
if (which == 1 || which == 2 && coinflip())
+ {
return random_choose_weighted( 8, MONS_VAULT_SENTINEL,
12, MONS_IRONBRAND_CONVOKER,
10, MONS_IRONHEART_PRESERVER,
0);
+ }
else
return MONS_VAULT_GUARD;
@@ -3302,10 +3312,12 @@ static monster_type _band_member(band_type band, int which)
case BAND_PUTRID_DEMONSPAWN:
if (which == 1 || one_chance_in(5))
+ {
return random_choose_weighted( 2, MONS_HELLWING,
2, MONS_ORANGE_DEMON,
3, MONS_PUTRID_DEMONSPAWN,
0);
+ }
return random_demonspawn_monster_species();
case BAND_TORTUROUS_DEMONSPAWN:
diff --git a/crawl-ref/source/monster.cc b/crawl-ref/source/monster.cc
index ed10c9fd6d..0284b1c419 100644
--- a/crawl-ref/source/monster.cc
+++ b/crawl-ref/source/monster.cc
@@ -1939,7 +1939,9 @@ bool monster::pickup_armour(item_def &item, int near, bool force)
if (eq != EQ_HELMET && eq != EQ_SHIELD
&& mons_genus(type) == MONS_OCTOPODE)
+ {
return false;
+ }
}
// Bardings are only wearable by the appropriate monster.
@@ -3296,16 +3298,20 @@ bool monster::backlit(bool check_haloed, bool self_halo) const
if (has_ench(ENCH_CORONA) || has_ench(ENCH_STICKY_FLAME) || has_ench(ENCH_SILVER_CORONA))
return true;
if (check_haloed)
+ {
return !umbraed() && haloed() &&
(self_halo || halo_radius2() == -1);
+ }
return false;
}
bool monster::umbra(bool check_haloed, bool self_halo) const
{
if (check_haloed)
+ {
return umbraed() && !haloed() &&
(self_halo || umbra_radius2() == -1);
+ }
return false;
}
@@ -3502,8 +3508,10 @@ void monster::blame_damage(const actor* attacker, int amount)
ASSERT(amount >= 0);
damage_total = min<int>(MAX_DAMAGE_COUNTER, damage_total + amount);
if (attacker)
+ {
damage_friendly = min<int>(MAX_DAMAGE_COUNTER * 2,
damage_friendly + amount * exp_rate(attacker->mindex()));
+ }
}
void monster::suicide(int hp)
@@ -5842,12 +5850,14 @@ void monster::react_to_damage(const actor *oppressor, int damage,
{
hit_points = 0;
if (observable())
+ {
mprf("As %s mount dies, %s plunges down into %s!",
pronoun(PRONOUN_POSSESSIVE).c_str(),
name(DESC_THE).c_str(),
grd(pos()) == DNGN_LAVA ?
"lava and is incinerated" :
"deep water and drowns");
+ }
}
else if (fly_died && observable())
{
diff --git a/crawl-ref/source/package.cc b/crawl-ref/source/package.cc
index 7e124ca8ee..f8e5f9c53a 100644
--- a/crawl-ref/source/package.cc
+++ b/crawl-ref/source/package.cc
@@ -217,8 +217,10 @@ package::~package()
// all errors here should be cached write errors
if (fd != -1)
if (close(fd) && !aborted)
+ {
sysfail(rw ? "write error while saving"
: "can't close the save I've just read???");
+ }
dprintf("package: closed\n");
}
diff --git a/crawl-ref/source/player-act.cc b/crawl-ref/source/player-act.cc
index 384c350cc1..04c36c9d77 100644
--- a/crawl-ref/source/player-act.cc
+++ b/crawl-ref/source/player-act.cc
@@ -165,7 +165,9 @@ bool player::is_habitable_feat(dungeon_feature_type actual_grid) const
|| species == SP_DJINNI
#endif
)
+ {
return true;
+ }
if (actual_grid == DNGN_LAVA && species != SP_LAVA_ORC
|| actual_grid == DNGN_DEEP_WATER && !can_swim())
@@ -424,7 +426,9 @@ bool player::could_wield(const item_def &item, bool ignore_brand,
&& (item_mass(item) >= 500
|| item.base_type == OBJ_WEAPONS
&& item_mass(item) >= 300))
+ {
return false;
+ }
// Anybody can wield missiles to enchant, item_mass permitting
if (item.base_type == OBJ_MISSILES)
diff --git a/crawl-ref/source/player-equip.cc b/crawl-ref/source/player-equip.cc
index 0163f16666..7370320fa4 100644
--- a/crawl-ref/source/player-equip.cc
+++ b/crawl-ref/source/player-equip.cc
@@ -240,8 +240,10 @@ static void _equip_artefact_effect(item_def &item, bool *show_msgs, bool unmeld,
autotoggle_autopickup(false);
if (proprt[ARTP_MAGICAL_POWER] && !known[ARTP_MAGICAL_POWER] && msg)
+ {
canned_msg(proprt[ARTP_MAGICAL_POWER] > 0 ? MSG_MANA_INCREASE
: MSG_MANA_DECREASE);
+ }
// Modify ability scores.
notify_stat_change(STAT_STR, proprt[ARTP_STRENGTH],
diff --git a/crawl-ref/source/player-reacts.cc b/crawl-ref/source/player-reacts.cc
index ef825bea03..210fe7ef56 100644
--- a/crawl-ref/source/player-reacts.cc
+++ b/crawl-ref/source/player-reacts.cc
@@ -305,8 +305,10 @@ void player_reacts_to_monsters()
}
if (you.duration[DUR_TELEPATHY])
+ {
detect_creatures(1 + you.duration[DUR_TELEPATHY] /
(2 * BASELINE_DELAY), true);
+ }
// We have to do the messaging here, because a simple wand of flame will
// call _maybe_melt_player_enchantments twice. It also avoid duplicate
@@ -368,7 +370,9 @@ static void _handle_recitation(int step)
if (apply_area_visible(_zin_recite_to_monsters,
you.attribute[ATTR_RECITE_TYPE], &you))
+ {
viewwindow();
+ }
// Recite trains more than once per use, because it has a
// long timer in between uses and actually takes up multiple
diff --git a/crawl-ref/source/player.cc b/crawl-ref/source/player.cc
index 93cae35db1..ee4f276c2d 100644
--- a/crawl-ref/source/player.cc
+++ b/crawl-ref/source/player.cc
@@ -599,8 +599,10 @@ monster_type player_mons(bool transform)
if (mons == MONS_ORC)
{
if (you_worship(GOD_BEOGH))
+ {
mons = (you.piety >= piety_breakpoint(4)) ? MONS_ORC_HIGH_PRIEST
: MONS_ORC_PRIEST;
+ }
}
else if (mons == MONS_OGRE)
{
@@ -7689,8 +7691,10 @@ bool player::backlit(bool check_haloed, bool self_halo) const
return true;
}
if (check_haloed)
+ {
return !umbraed() && haloed()
&& (self_halo || halo_radius2() == -1);
+ }
return false;
}
@@ -7700,8 +7704,10 @@ bool player::umbra(bool check_haloed, bool self_halo) const
return false;
if (check_haloed)
+ {
return umbraed() && !haloed()
&& (self_halo || umbra_radius2() == -1);
+ }
return false;
}
diff --git a/crawl-ref/source/religion.cc b/crawl-ref/source/religion.cc
index 0da37582d7..f24f401e4b 100644
--- a/crawl-ref/source/religion.cc
+++ b/crawl-ref/source/religion.cc
@@ -2498,8 +2498,10 @@ bool do_god_gift(bool forced)
string god_name(god_type which_god, bool long_name)
{
if (which_god == GOD_JIYVA)
+ {
return god_name_jiyva(long_name) +
(long_name? " the Shapeless" : "");
+ }
if (long_name)
{
@@ -4338,6 +4340,7 @@ int elyvilon_lifesaving()
bool god_protects_from_harm()
{
if (you.duration[DUR_LIFESAVING])
+ {
switch (elyvilon_lifesaving())
{
case 1:
@@ -4349,6 +4352,7 @@ bool god_protects_from_harm()
lose_piety(21 + random2(20));
return true;
}
+ }
if (god_can_protect_from_harm(you.religion)
&& (one_chance_in(10) || x_chance_in_y(piety_scale(you.piety), 1000)))
diff --git a/crawl-ref/source/rltiles/tool/tile_list_processor.cc b/crawl-ref/source/rltiles/tool/tile_list_processor.cc
index e52b61077b..5f86ebeb94 100644
--- a/crawl-ref/source/rltiles/tool/tile_list_processor.cc
+++ b/crawl-ref/source/rltiles/tool/tile_list_processor.cc
@@ -1533,8 +1533,10 @@ bool tile_list_processor::write_data(bool image, bool code)
{
fprintf(fp, "define([");
if (m_start_value_module.size() > 0)
+ {
fprintf(fp, "\"./tileinfo-%s\"",
m_start_value_module.c_str());
+ }
fprintf(fp, "], function(m) {\n");
}
else
diff --git a/crawl-ref/source/shout.cc b/crawl-ref/source/shout.cc
index 301e0d71d3..0a2f5d80bc 100644
--- a/crawl-ref/source/shout.cc
+++ b/crawl-ref/source/shout.cc
@@ -619,7 +619,9 @@ void check_monsters_sense(sense_type sense, int range, const coord_def& where)
case SENSE_WEB_VIBRATION:
if (!mons_class_flag(mi->type, M_WEB_SENSE)
&& !mons_class_flag(get_chimera_legs(*mi), M_WEB_SENSE))
+ {
break;
+ }
if (!one_chance_in(4))
{
if (coinflip())
@@ -1037,9 +1039,11 @@ void noise_grid::write_cell(FILE *outf, coord_def p, int ch) const
{
const int intensity = min(25, cells(p).noise_intensity_millis / 1000);
if (intensity)
+ {
fprintf(outf,
"<span class='i%d'>&#%d;</span>",
intensity, ch);
+ }
else
fprintf(outf, "<span>&#%d;</span>", ch);
}
diff --git a/crawl-ref/source/show.cc b/crawl-ref/source/show.cc
index 64ff3501ab..2b393340b3 100644
--- a/crawl-ref/source/show.cc
+++ b/crawl-ref/source/show.cc
@@ -335,7 +335,9 @@ static bool _valid_invisible_spot(const coord_def &where, const monster* mons)
{
if (!you.see_cell(where) || where == you.pos()
|| env.map_knowledge(where).flags & MAP_INVISIBLE_UPDATE)
+ {
return false;
+ }
monster *mons_at = monster_at(where);
if (mons_at && mons_at != mons)
diff --git a/crawl-ref/source/spl-damage.cc b/crawl-ref/source/spl-damage.cc
index 6c22a90b47..aaf7d6e804 100644
--- a/crawl-ref/source/spl-damage.cc
+++ b/crawl-ref/source/spl-damage.cc
@@ -768,8 +768,10 @@ spret_type cast_los_attack_spell(spell_type spell, int pow, actor* agent,
if (actual)
{
if (post_hook)
+ {
(*post_hook)(agent, affects_you, affected_monsters, pow,
total_damage);
+ }
return SPRET_SUCCESS;
}
@@ -1331,8 +1333,10 @@ bool mons_shatter(monster* caster, bool actual)
if (actual)
{
if (silence)
+ {
mprf("The dungeon shakes around %s!",
caster->name(DESC_THE).c_str());
+ }
else
{
noisy(30, caster->pos(), caster->mindex());
@@ -2525,6 +2529,7 @@ void forest_damage(const actor *mon)
const int hd = mon->get_experience_level();
if (one_chance_in(4))
+ {
forest_message(pos, random_choose(
"The trees move their gnarly branches around.",
"You feel roots moving beneath the ground.",
@@ -2532,6 +2537,7 @@ void forest_damage(const actor *mon)
"Trunks creak and shift.",
"Tree limbs sway around you.",
0), MSGCH_TALK_VISUAL);
+ }
for (radius_iterator ri(pos, LOS_NO_TRANS); ri; ++ri)
{
diff --git a/crawl-ref/source/spl-monench.cc b/crawl-ref/source/spl-monench.cc
index 00aabc681a..62f653faea 100644
--- a/crawl-ref/source/spl-monench.cc
+++ b/crawl-ref/source/spl-monench.cc
@@ -52,7 +52,9 @@ int englaciate(coord_def where, int pow, int, actor *agent)
if ((!mons && player_genus(GENPC_DRACONIAN)) // res_cold() checked above
|| (mons && mons_class_flag(mons->type, M_COLD_BLOOD)))
+ {
duration *= 2;
+ }
if (!mons)
return slow_player(duration);
diff --git a/crawl-ref/source/spl-util.cc b/crawl-ref/source/spl-util.cc
index 7ae20a3e4c..74de063b41 100644
--- a/crawl-ref/source/spl-util.cc
+++ b/crawl-ref/source/spl-util.cc
@@ -1260,7 +1260,9 @@ bool spell_no_hostile_in_range(spell_type spell)
&& (!mons_class_flag(mons->type, M_NO_EXP_GAIN)
|| (mons->type == MONS_BALLISTOMYCETE
&& mons->number != 0)))
+ {
return false;
+ }
}
}
diff --git a/crawl-ref/source/sqldbm.cc b/crawl-ref/source/sqldbm.cc
index ac28635481..8f589806c4 100644
--- a/crawl-ref/source/sqldbm.cc
+++ b/crawl-ref/source/sqldbm.cc
@@ -270,8 +270,10 @@ unique_ptr<string> SQL_DBM::nextkey()
if (s_iterator)
{
if (ec(sqlite3_step(s_iterator)) == SQLITE_ROW)
+ {
result.reset(
new string((const char *) sqlite3_column_text(s_iterator, 0)));
+ }
else
sqlite3_reset(s_iterator);
}
diff --git a/crawl-ref/source/stash.cc b/crawl-ref/source/stash.cc
index ad1ca9569d..a8f0d52658 100644
--- a/crawl-ref/source/stash.cc
+++ b/crawl-ref/source/stash.cc
@@ -869,8 +869,10 @@ void ShopInfo::describe_shop_item(const shop_item &si) const
const iflags_t oldflags = si.item.flags;
if (shoptype_identifies_stock(static_cast<shop_type>(shoptype)))
+ {
const_cast<shop_item&>(si).item.flags |= ISFLAG_IDENT_MASK
| ISFLAG_NOTED_ID | ISFLAG_NOTED_GET;
+ }
item_def it = static_cast<item_def>(si.item);
describe_item(it);
diff --git a/crawl-ref/source/state.cc b/crawl-ref/source/state.cc
index a1957b0ab4..6c6119d641 100644
--- a/crawl-ref/source/state.cc
+++ b/crawl-ref/source/state.cc
@@ -477,8 +477,10 @@ void game_state::dump()
"arena_suspended: %d\n",
seen_hups, map_stat_gen, type, arena_suspended);
if (last_winch)
+ {
fprintf(stderr, "Last resize was %" PRId64" seconds ago.\n",
(int64_t)(time(0) - last_winch));
+ }
fprintf(stderr, "\n");
@@ -522,9 +524,11 @@ void game_state::dump()
{
fprintf(stderr, "Other gods acting:\n");
for (unsigned int i = 0; i < god_act_stack.size(); i++)
+ {
fprintf(stderr, "God %s with depth %d\n",
god_name(god_act_stack[i].which_god).c_str(),
god_act_stack[i].depth);
+ }
fprintf(stderr, "\n\n");
}
@@ -539,8 +543,10 @@ void game_state::dump()
{
fprintf(stderr, "Others monsters acting:\n");
for (unsigned int i = 0; i < mon_act_stack.size(); i++)
+ {
fprintf(stderr, " %s\n",
debug_mon_str(mon_act_stack[i]).c_str());
+ }
}
}
diff --git a/crawl-ref/source/tags.cc b/crawl-ref/source/tags.cc
index 38a50b28d4..6e7ab04f37 100644
--- a/crawl-ref/source/tags.cc
+++ b/crawl-ref/source/tags.cc
@@ -2118,7 +2118,9 @@ static void tag_read_you(reader &th)
#if TAG_MAJOR_VERSION == 34
if (th.getMinorVersion() >= TAG_MINOR_GARGOYLE_DR
&& th.getMinorVersion() < TAG_MINOR_RM_GARGOYLE_DR)
+ {
unmarshallInt(th); // Slough an integer.
+ }
if (th.getMinorVersion() < TAG_MINOR_AUTOMATIC_MANUALS)
{
@@ -3007,7 +3009,9 @@ static void tag_read_you_items(reader &th)
if (th.getMinorVersion() < TAG_MINOR_BOOK_ID
&& i == OBJ_BOOKS)
+ {
x = ID_UNKNOWN_TYPE;
+ }
else
x = unmarshallUByte(th);
@@ -5027,10 +5031,12 @@ static void tag_read_level_monsters(reader &th)
}
int midx = mgrd(m.pos());
if (midx != NON_MONSTER)
+ {
mprf(MSGCH_ERROR, "(%d, %d) for %s already occupied by %s",
m.pos().x, m.pos().y,
m.name(DESC_PLAIN, true).c_str(),
menv[midx].name(DESC_PLAIN, true).c_str());
+ }
#endif
mgrd(m.pos()) = i;
}
diff --git a/crawl-ref/source/target.cc b/crawl-ref/source/target.cc
index a3d0898846..6d88de947a 100644
--- a/crawl-ref/source/target.cc
+++ b/crawl-ref/source/target.cc
@@ -109,7 +109,9 @@ bool targetter_beam::set_aim(coord_def a)
{
if (cell_is_solid(*i)
&& tempbeam.affects_wall(grd(*i)) != MB_TRUE)
+ {
break;
+ }
tempbeam2.target = *i;
if (anyone_there(*i)
&& !tempbeam.ignores_monster(monster_at(*i)))
@@ -158,7 +160,9 @@ aff_type targetter_beam::is_affected(coord_def loc)
if (cell_is_solid(*i)
&& beam.affects_wall(grd(*i)) != MB_TRUE
&& max_expl_rad > 0)
+ {
break;
+ }
c = *i;
if (c == loc)
@@ -196,8 +200,10 @@ aff_type targetter_beam::is_affected(coord_def loc)
{
coord_def centre(9,9);
if (exp_map_min(loc - c + centre) < INT_MAX)
+ {
return (!cell_is_solid(loc) || aff_wall == MB_TRUE)
? AFF_YES : AFF_MAYBE;
+ }
if (exp_map_max(loc - c + centre) < INT_MAX)
return AFF_MAYBE;
}
@@ -237,7 +243,9 @@ bool targetter_imb::set_aim(coord_def a)
if (!(anyone_there(c)
&& !beam.ignores_monster((monster_at(c))))
&& c != end)
+ {
continue;
+ }
vector<coord_def> *which_splash = (first) ? &splash : &splash2;
diff --git a/crawl-ref/source/terrain.cc b/crawl-ref/source/terrain.cc
index 0440db805c..5193242418 100644
--- a/crawl-ref/source/terrain.cc
+++ b/crawl-ref/source/terrain.cc
@@ -733,7 +733,9 @@ bool is_valid_mimic_feat(dungeon_feature_type feat)
|| feat == DNGN_EXIT_PORTAL_VAULT
#endif
|| feat >= DNGN_EXIT_FIRST_PORTAL && feat <= DNGN_EXIT_LAST_PORTAL)
+ {
return false;
+ }
// There's only one branch exit.
if (you.depth == 1 && feat_is_travelable_stair(feat)
diff --git a/crawl-ref/source/traps.cc b/crawl-ref/source/traps.cc
index 216bbeb59b..c0338c27dd 100644
--- a/crawl-ref/source/traps.cc
+++ b/crawl-ref/source/traps.cc
@@ -1506,8 +1506,10 @@ void trap_def::shoot_ammo(actor& act, bool was_known)
else if (!force_hit && one_chance_in(5))
{
if (was_known && you.see_cell(pos) && you.can_see(&act))
+ {
mprf("%s avoids triggering %s trap.", act.name(DESC_THE).c_str(),
name(DESC_A).c_str());
+ }
return;
}
diff --git a/crawl-ref/source/wiz-item.cc b/crawl-ref/source/wiz-item.cc
index 32bddf2afe..c6606eaccd 100644
--- a/crawl-ref/source/wiz-item.cc
+++ b/crawl-ref/source/wiz-item.cc
@@ -1205,8 +1205,10 @@ static void _debug_acquirement_stats(FILE *ostat)
for (int i = 0; i < NUM_SPECIAL_ARMOURS; ++i)
{
if (ego_quants[i] > 0)
+ {
fprintf(ostat, "%17s: %5.2f\n", names[i],
100.0 * (float) ego_quants[i] / (float) non_art);
+ }
}
fprintf(ostat, "\n\n");
}
diff --git a/crawl-ref/source/zotdef.cc b/crawl-ref/source/zotdef.cc
index 85839d41f6..f6902db82f 100644
--- a/crawl-ref/source/zotdef.cc
+++ b/crawl-ref/source/zotdef.cc
@@ -110,8 +110,10 @@ static branch_type _zotdef_random_branch()
while (!_is_branch_fitting(pb, wavenum));
if (one_chance_in(4))
+ {
return wavenum < 15 ? BRANCH_DUNGEON : BRANCH_DEPTHS;
// strong bias to main dungeon and depths
+ }
return pb;
}