summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/spl-tornado.cc
diff options
context:
space:
mode:
authorAdam Borowski <kilobyte@angband.pl>2011-07-13 05:21:22 +0200
committerAdam Borowski <kilobyte@angband.pl>2011-07-13 20:21:41 +0200
commit087861d00825dfa27e6a7b4fbb4d9e2fc06bbddc (patch)
tree0b5c801421565c29830f380540f340382970b9b5 /crawl-ref/source/spl-tornado.cc
parent0ff316ee356eda59691ad3d918857b607a327a96 (diff)
downloadcrawl-ref-087861d00825dfa27e6a7b4fbb4d9e2fc06bbddc.tar.gz
crawl-ref-087861d00825dfa27e6a7b4fbb4d9e2fc06bbddc.zip
Tornado: make the effect of AC independent of the way damage calls are split.
It is also now fully proportional. The new formula formula gives damage reduction of: 0 AC = 0% 10 AC = 11.7% 20 AC = 22% 40 AC = 39% 80 AC = 63% The variance is woefully small, but it appears our math mavens don't remember a thing about iterated Bernoulli trials, so let's rely for the actual damage rolls to provide enough randomness.
Diffstat (limited to 'crawl-ref/source/spl-tornado.cc')
-rw-r--r--crawl-ref/source/spl-tornado.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/crawl-ref/source/spl-tornado.cc b/crawl-ref/source/spl-tornado.cc
index f91bee56c8..fcc6d00517 100644
--- a/crawl-ref/source/spl-tornado.cc
+++ b/crawl-ref/source/spl-tornado.cc
@@ -322,8 +322,9 @@ void tornado_damage(actor *caster, int dur)
if (standing)
float_player(false);
}
- int dmg = div_rand_round(roll_dice(6, rpow), 15)
- - random2(victim->armour_class() / 3 + 1);
+ int dmg = apply_chunked_AC(
+ div_rand_round(roll_dice(6, rpow), 15),
+ victim->armour_class());
if (dur < 0)
dmg = 0;
dprf("damage done: %d", dmg);