summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/religion.cc
diff options
context:
space:
mode:
authordolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-03-22 15:45:39 +0000
committerdolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-03-22 15:45:39 +0000
commit79ab3930c258a9ca66b834c8196227d595e45815 (patch)
treecf8f2de0adec8b2065dad9c4072d3324780b7357 /crawl-ref/source/religion.cc
parent2392b1199ce22c975a49d2aed8cb528277fd3a46 (diff)
downloadcrawl-ref-79ab3930c258a9ca66b834c8196227d595e45815.tar.gz
crawl-ref-79ab3930c258a9ca66b834c8196227d595e45815.zip
Fix blessing percentage checks.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3807 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/religion.cc')
-rw-r--r--crawl-ref/source/religion.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/crawl-ref/source/religion.cc b/crawl-ref/source/religion.cc
index f640274130..81d5b2f784 100644
--- a/crawl-ref/source/religion.cc
+++ b/crawl-ref/source/religion.cc
@@ -822,9 +822,11 @@ void bless_follower(god_type god,
const char *blessed = mon->name(DESC_NOCAP_A).c_str();
const char *result;
+ int chance = random2(20);
+
// 5% chance: Turn a monster into a priestly monster, if possible.
// This is currently only used for Beogh and ordinary orcs.
- if (one_chance_in(20))
+ if (chance == 0)
{
if (god == GOD_BEOGH && mon->type == MONS_ORC
&& blessing_priesthood(mon))
@@ -837,7 +839,7 @@ void bless_follower(god_type god,
// 5% chance: Enchant a monster's armour or shield by one or two
// points, or at least uncurse it, if possible. The message doesn't
// make a distinction.
- if (one_chance_in(20))
+ if (chance <= 1)
{
bool ac_effect = blessing_ac(mon);