summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/monstuff.cc
diff options
context:
space:
mode:
authordolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-03-17 21:06:17 +0000
committerdolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-03-17 21:06:17 +0000
commit14691be53b491ee45ffc822d51a4aa742667696d (patch)
tree89374d1cafd881cfbc890d91568e5d306bba0312 /crawl-ref/source/monstuff.cc
parent567d279f099afe79a81f6ec39754703222280c8c (diff)
downloadcrawl-ref-14691be53b491ee45ffc822d51a4aa742667696d.tar.gz
crawl-ref-14691be53b491ee45ffc822d51a4aa742667696d.zip
For Beoghites, give orcish followers as well as players a chance to
forcibly convert orcs. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3692 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/monstuff.cc')
-rw-r--r--crawl-ref/source/monstuff.cc30
1 files changed, 24 insertions, 6 deletions
diff --git a/crawl-ref/source/monstuff.cc b/crawl-ref/source/monstuff.cc
index 757a4ecb26..1b79f65338 100644
--- a/crawl-ref/source/monstuff.cc
+++ b/crawl-ref/source/monstuff.cc
@@ -470,13 +470,31 @@ static bool monster_avoided_death(monsters *monster, killer_type killer, int i)
|| monster->hit_dice < 1)
return (false);
- // Orcs may convert to Beogh under threat of death.
- if (YOU_KILL(killer)
- && mons_near(monster)
- && !mons_friendly(monster)
- && you.religion == GOD_BEOGH
+ bool convert = false;
+
+ if (you.religion == GOD_BEOGH
&& mons_species(monster->type) == MONS_ORC
- && !player_under_penance() && you.piety >= piety_breakpoint(2))
+ && !player_under_penance() && you.piety >= piety_breakpoint(2)
+ && mons_near(monster))
+ {
+ if (YOU_KILL(killer))
+ convert = true;
+ else if (MON_KILL(killer))
+ {
+ monsters *mon = &menv[i];
+ if (mons_species(mon->type) == MONS_ORC && mons_friendly(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)
{
#ifdef DEBUG_DIAGNOSTICS
mprf(MSGCH_DIAGNOSTICS, "Death convert attempt on %s, HD: %d, "