summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/arena.cc
diff options
context:
space:
mode:
authorNeil Moore <neil@s-z.org>2012-08-01 16:09:16 -0400
committerNeil Moore <neil@s-z.org>2012-08-01 17:08:37 -0400
commit1cc90225baf47270bbe2a22c1ecbbc839eaa2b90 (patch)
treebd8816720989c3d2193ccaa82cbca5f7b6f2deca /crawl-ref/source/arena.cc
parenta0a9240421e89e77aac6011671931521d7e60f0a (diff)
downloadcrawl-ref-1cc90225baf47270bbe2a22c1ecbbc839eaa2b90.tar.gz
crawl-ref-1cc90225baf47270bbe2a22c1ecbbc839eaa2b90.zip
Massive style fix (braces, indentation, etc.)
Diffstat (limited to 'crawl-ref/source/arena.cc')
-rw-r--r--crawl-ref/source/arena.cc12
1 files changed, 12 insertions, 0 deletions
diff --git a/crawl-ref/source/arena.cc b/crawl-ref/source/arena.cc
index c51b7810b3..b7a8147480 100644
--- a/crawl-ref/source/arena.cc
+++ b/crawl-ref/source/arena.cc
@@ -265,8 +265,10 @@ namespace arena
ASSERT(map);
bool success = dgn_place_map(map, false, true);
if (!success)
+ {
throw make_stringf("Failed to create arena named \"%s\"",
arena_type.c_str());
+ }
link_items();
if (!env.rock_colour)
@@ -324,8 +326,10 @@ namespace arena
summon_throttle = strip_number_tag(spec, "summon_throttle:");
if (real_summons && respawn)
+ {
throw (std::string("Can't set real_summons and respawn at "
"same time."));
+ }
if (summon_throttle <= 0)
summon_throttle = INT_MAX;
@@ -337,7 +341,9 @@ namespace arena
const int ntrials = strip_number_tag(spec, "t:");
if (ntrials != TAG_UNFOUND && ntrials >= 1 && ntrials <= 99
&& !total_trials)
+ {
total_trials = ntrials;
+ }
arena_type = strip_tag_prefix(spec, "arena:");
@@ -374,8 +380,10 @@ namespace arena
factions = split_string(" vs ", spec);
if (factions.size() != 2)
+ {
throw make_stringf("Expected arena monster spec \"xxx v yyy\", "
"but got \"%s\"", spec.c_str());
+ }
try
{
@@ -524,12 +532,16 @@ namespace arena
int orig_b = faction_b.active_members;
if (orig_a < 0)
+ {
mpr("Book-keeping says faction_a has negative active members.",
MSGCH_ERROR);
+ }
if (orig_b < 0)
+ {
mpr("Book-keeping says faction_b has negative active members.",
MSGCH_ERROR);
+ }
faction_a.active_members = 0;
faction_b.active_members = 0;