diff options
author | Steve Melenchuk <smelenchuk@gmail.com> | 2014-04-17 21:14:08 -0600 |
---|---|---|
committer | Steve Melenchuk <smelenchuk@gmail.com> | 2014-04-27 17:02:33 -0600 |
commit | af65ebd5ff1d82a27b1e881ec2cd63875bbbeb47 (patch) | |
tree | aacf14d183b2f641c20b83162529c34b7b357abc /crawl-ref/source/attack.cc | |
parent | a0b9eea05605c1024bf6387992650f60ee2fb501 (diff) | |
download | crawl-ref-af65ebd5ff1d82a27b1e881ec2cd63875bbbeb47.tar.gz crawl-ref-af65ebd5ff1d82a27b1e881ec2cd63875bbbeb47.zip |
Give M_ARCHER monsters their acc/dam bonuses back.
Sort of similar to how M_FIGHTER gets a melee accuracy bonus, I think
this has a place here.
The numbers are a bit complicated; the old code gave an ammoHitBonus of
random2avg(HD * 4 / 3, 2) to the beam hit which is later added to the
damage bonus. Since the randomisation here works differently the 4/3 is
straight-up added to the to_hit and randomised when added to the damage.
Diffstat (limited to 'crawl-ref/source/attack.cc')
-rw-r--r-- | crawl-ref/source/attack.cc | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/crawl-ref/source/attack.cc b/crawl-ref/source/attack.cc index 68fced277f..2324e9120e 100644 --- a/crawl-ref/source/attack.cc +++ b/crawl-ref/source/attack.cc @@ -153,12 +153,9 @@ bool attack::handle_phase_end() */ int attack::calc_to_hit(bool random) { - const bool fighter = attacker->is_monster() - && attacker->as_monster()->is_fighter(); - const int hd_mult = fighter ? 25 : 15; int mhit = attacker->is_player() ? 15 + (calc_stat_to_hit_base() / 2) - : 18 + attacker->get_experience_level() * hd_mult / 10; + : calc_mon_to_hit_base(); #ifdef DEBUG_DIAGNOSTICS const int base_hit = mhit; |