diff options
author | Steve Melenchuk <smelenchuk@gmail.com> | 2014-05-01 12:16:33 -0600 |
---|---|---|
committer | Steve Melenchuk <smelenchuk@gmail.com> | 2014-05-01 12:19:44 -0600 |
commit | 1a861e913fb6b33403774dd522a4d80cf7aac5b4 (patch) | |
tree | 4e36e2db05a85c12b6943771aa5af95533b06f97 /crawl-ref/source/attack.cc | |
parent | 7fa0871e93e2dd8f5e213ac01fc7066d562fc02c (diff) | |
download | crawl-ref-1a861e913fb6b33403774dd522a4d80cf7aac5b4.tar.gz crawl-ref-1a861e913fb6b33403774dd522a4d80cf7aac5b4.zip |
Fix some invalid assumptions regarding throwing attacks.
Namely, it was using unarmed combat skill for to-hit calculations, and
even then only if you weren't wielding anything.
Diffstat (limited to 'crawl-ref/source/attack.cc')
-rw-r--r-- | crawl-ref/source/attack.cc | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/crawl-ref/source/attack.cc b/crawl-ref/source/attack.cc index 9cad104e6f..73b46ec496 100644 --- a/crawl-ref/source/attack.cc +++ b/crawl-ref/source/attack.cc @@ -172,7 +172,7 @@ int attack::calc_to_hit(bool random) mhit += maybe_random_div(you.skill(SK_FIGHTING, 100), 100, random); // weapon skill contribution - if (weapon) + if (using_weapon()) { if (wpn_skill != SK_FIGHTING) { @@ -186,14 +186,15 @@ int attack::calc_to_hit(bool random) else if (you.form_uses_xl()) mhit += maybe_random_div(you.experience_level * 100, 100, random); else - { // ...you must be unarmed + { // ...you must be unarmed or throwing // Members of clawed species have presumably been using the claws, // making them more practiced and thus more accurate in unarmed // combat. They keep this benefit even when the claws are covered // (or missing because of a change in form). - mhit += species_has_claws(you.species) ? 4 : 2; + mhit += species_has_claws(you.species) + && wpn_skill == SK_UNARMED_COMBAT ? 4 : 2; - mhit += maybe_random_div(you.skill(SK_UNARMED_COMBAT, 100), 100, + mhit += maybe_random_div(you.skill(wpn_skill, 100), 100, random); } |