summaryrefslogtreecommitdiffstats
path: root/crawl-ref
diff options
context:
space:
mode:
authordshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2007-03-05 17:38:50 +0000
committerdshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2007-03-05 17:38:50 +0000
commitac070947b0015988e4dd98ddbea2cf5aedbc71b6 (patch)
tree1e957c630ae8c46afc36e2e8276311ecd61ef303 /crawl-ref
parentbea81c5e9f1672797459f48245e37122c90bb4b6 (diff)
downloadcrawl-ref-ac070947b0015988e4dd98ddbea2cf5aedbc71b6.tar.gz
crawl-ref-ac070947b0015988e4dd98ddbea2cf5aedbc71b6.zip
Retune monster abjuration.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@981 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref')
-rw-r--r--crawl-ref/source/mstuff2.cc16
1 files changed, 10 insertions, 6 deletions
diff --git a/crawl-ref/source/mstuff2.cc b/crawl-ref/source/mstuff2.cc
index f354c50d69..b41c4a02ed 100644
--- a/crawl-ref/source/mstuff2.cc
+++ b/crawl-ref/source/mstuff2.cc
@@ -1871,7 +1871,14 @@ static unsigned char monster_abjuration(int pow, bool test)
if (!test)
mpr("Send 'em back where they came from!");
- for (int ab = 0; ab < MAX_MONSTERS; ab++)
+ if (pow > 60)
+ pow = 60;
+
+ int abjure_str = 1 + (random2(pow / 3));
+ if (abjure_str > 6)
+ abjure_str = 6;
+
+ for (int ab = 0; ab < MAX_MONSTERS && abjure_str; ab++)
{
int abjLevel;
@@ -1892,10 +1899,7 @@ static unsigned char monster_abjuration(int pow, bool test)
if (test)
continue;
- if (pow > 60)
- pow = 60;
-
- abjLevel -= 1 + (random2(pow / 3) * 60 / 100);
+ abjLevel -= abjure_str;
if (abjLevel < ENCH_ABJ_I)
monster_die(monster, KILL_RESET, 0);
@@ -1906,7 +1910,7 @@ static unsigned char monster_abjuration(int pow, bool test)
mons_add_ench(monster, abjLevel);
}
- if (!(pow = 2 * pow / 3))
+ if (!(abjure_str = div_rand_round(abjure_str, 2)))
break;
}