summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/spl-cast.cc
diff options
context:
space:
mode:
authordshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2007-04-13 14:08:38 +0000
committerdshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2007-04-13 14:08:38 +0000
commit3719e3c8c35ad7bd924373512c25ce7828d62a03 (patch)
treeb9c4436ae2d9046a45ccba1a2b7ff2d93a56b405 /crawl-ref/source/spl-cast.cc
parentc92159fe7f003977dee3ea4d16a18176f6435435 (diff)
downloadcrawl-ref-3719e3c8c35ad7bd924373512c25ce7828d62a03.tar.gz
crawl-ref-3719e3c8c35ad7bd924373512c25ce7828d62a03.zip
Fixed bad grammar on shield block messages in melee.
Split up Abyss/Pan/Labyrinth save files. The only practical use right now is to be able to correctly place Abyss and Pan ghosts. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1295 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/spl-cast.cc')
-rw-r--r--crawl-ref/source/spl-cast.cc8
1 files changed, 3 insertions, 5 deletions
diff --git a/crawl-ref/source/spl-cast.cc b/crawl-ref/source/spl-cast.cc
index 20616b4801..76ea339b12 100644
--- a/crawl-ref/source/spl-cast.cc
+++ b/crawl-ref/source/spl-cast.cc
@@ -957,14 +957,12 @@ spret_type your_spells( spell_type spc2, int powc, bool allow_fail )
int nastiness = spell_mana(spc2) * spell_mana(spc2)
* (spell_fail(spc2) - spfl) + 250;
- int cont_points = nastiness / 500;
- // handle fraction
- if (random2(500) < (nastiness % 500))
- cont_points++;
+ const int cont_points = div_rand_round(nastiness, 500);
contaminate_player( cont_points );
- miscast_effect( sptype, spell_mana(spc2), spell_fail(spc2) - spfl, 100 );
+ miscast_effect( sptype, spell_mana(spc2),
+ spell_fail(spc2) - spfl, 100 );
if (you.religion == GOD_XOM && random2(75) < spell_mana(spc2))
Xom_acts(coinflip(), spell_mana(spc2), false);