summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/melee_attack.cc
diff options
context:
space:
mode:
authorNeil Moore <neil@s-z.org>2014-07-12 15:16:37 -0400
committerNeil Moore <neil@s-z.org>2014-07-12 15:16:37 -0400
commit18de428f80c0bf591b9d075288a7e3f1d35b774f (patch)
tree0828efce2833d0d28af24e1649117041db225777 /crawl-ref/source/melee_attack.cc
parent53f97d336ffa310c8bd12848e9375c45e308c028 (diff)
downloadcrawl-ref-18de428f80c0bf591b9d075288a7e3f1d35b774f.tar.gz
crawl-ref-18de428f80c0bf591b9d075288a7e3f1d35b774f.zip
Make boots block the effects of hooves.
But not centaur bardings, since those don't cover the feet. This applies to both the kick attack and the stealth penalty.
Diffstat (limited to 'crawl-ref/source/melee_attack.cc')
-rw-r--r--crawl-ref/source/melee_attack.cc9
1 files changed, 4 insertions, 5 deletions
diff --git a/crawl-ref/source/melee_attack.cc b/crawl-ref/source/melee_attack.cc
index 95c596508d..8b37adaf45 100644
--- a/crawl-ref/source/melee_attack.cc
+++ b/crawl-ref/source/melee_attack.cc
@@ -1017,7 +1017,7 @@ void melee_attack::player_aux_setup(unarmed_attack_type atk)
aux_attack = aux_verb = "kick";
aux_damage = 5;
- if (player_mutation_level(MUT_HOOVES))
+ if (you.has_usable_hooves())
{
// Max hoof damage: 10.
aux_damage += player_mutation_level(MUT_HOOVES) * 5 / 3;
@@ -1327,10 +1327,9 @@ bool melee_attack::player_aux_apply(unarmed_attack_type atk)
case UNAT_KICK:
{
- const int hooves = player_mutation_level(MUT_HOOVES);
-
- if (hooves && pre_ac_dmg > post_ac_dmg)
+ if (you.has_usable_hooves() && pre_ac_dmg > post_ac_dmg)
{
+ const int hooves = player_mutation_level(MUT_HOOVES);
const int dmg = bestroll(pre_ac_dmg - post_ac_dmg, hooves);
// do some of the previously ignored damage in extra-damage
damage_done += inflict_damage(dmg, BEAM_MISSILE);
@@ -3854,7 +3853,7 @@ bool melee_attack::_extra_aux_attack(unarmed_attack_type atk, bool is_uc)
{
case UNAT_KICK:
return is_uc
- || player_mutation_level(MUT_HOOVES)
+ || you.has_usable_hooves()
|| you.has_usable_talons()
|| player_mutation_level(MUT_TENTACLE_SPIKE);