summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/monstuff.cc
diff options
context:
space:
mode:
authordolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2009-01-25 00:26:35 +0000
committerdolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2009-01-25 00:26:35 +0000
commitb23105c93ac09dd7616f25465105c795185753a5 (patch)
tree939eb9d1d6f9e60854755699ab453025ea123e3b /crawl-ref/source/monstuff.cc
parent258aca6995ae3953586d7a17b98d3c01c7c95a79 (diff)
downloadcrawl-ref-b23105c93ac09dd7616f25465105c795185753a5.tar.gz
crawl-ref-b23105c93ac09dd7616f25465105c795185753a5.zip
Add more miscellaneous minor cleanups.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8725 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/monstuff.cc')
-rw-r--r--crawl-ref/source/monstuff.cc41
1 files changed, 21 insertions, 20 deletions
diff --git a/crawl-ref/source/monstuff.cc b/crawl-ref/source/monstuff.cc
index 5a35149b4a..2e8037ef84 100644
--- a/crawl-ref/source/monstuff.cc
+++ b/crawl-ref/source/monstuff.cc
@@ -681,14 +681,14 @@ static bool _monster_avoided_death(monsters *monster, killer_type killer, int i)
return (true);
// Beogh special
- bool convert = false;
-
if (you.religion == GOD_BEOGH
&& mons_species(monster->type) == MONS_ORC
&& !mons_is_summoned(monster) && !mons_is_shapeshifter(monster)
&& !player_under_penance() && you.piety >= piety_breakpoint(2)
&& mons_near(monster))
{
+ bool convert = false;
+
if (YOU_KILL(killer))
convert = true;
else if (MON_KILL(killer) && !invalid_monster_index(i))
@@ -697,27 +697,28 @@ static bool _monster_avoided_death(monsters *monster, killer_type killer, int i)
if (is_follower(mon) && !one_chance_in(3))
convert = true;
}
- }
- // Orcs may convert to Beogh under threat of death, either from you
- // or, less often, your followers. In both cases, the checks are
- // made against your stats. You're the potential messiah, after all.
- if (convert)
- {
+ // Orcs may convert to Beogh under threat of death, either from
+ // you or, less often, your followers. In both cases, the
+ // checks are made against your stats. You're the potential
+ // messiah, after all.
+ if (convert)
+ {
#ifdef DEBUG_DIAGNOSTICS
- mprf(MSGCH_DIAGNOSTICS, "Death convert attempt on %s, HD: %d, "
- "your xl: %d",
- monster->name(DESC_PLAIN).c_str(),
- monster->hit_dice,
- you.experience_level);
+ mprf(MSGCH_DIAGNOSTICS, "Death convert attempt on %s, HD: %d, "
+ "your xl: %d",
+ monster->name(DESC_PLAIN).c_str(),
+ monster->hit_dice,
+ you.experience_level);
#endif
- if (random2(you.piety) >= piety_breakpoint(0)
- && random2(you.experience_level) >= random2(monster->hit_dice)
- // Bias beaten-up-conversion towards the stronger orcs.
- && random2(monster->hit_dice) > 2)
- {
- beogh_convert_orc(monster, true, MON_KILL(killer));
- return (true);
+ if (random2(you.piety) >= piety_breakpoint(0)
+ && random2(you.experience_level) >= random2(monster->hit_dice)
+ // Bias beaten-up-conversion towards the stronger orcs.
+ && random2(monster->hit_dice) > 2)
+ {
+ beogh_convert_orc(monster, true, MON_KILL(killer));
+ return (true);
+ }
}
}