diff options
Diffstat (limited to 'crawl-ref/source/mon-util.cc')
-rw-r--r-- | crawl-ref/source/mon-util.cc | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/crawl-ref/source/mon-util.cc b/crawl-ref/source/mon-util.cc index ac913ded54..e6c1ac97d6 100644 --- a/crawl-ref/source/mon-util.cc +++ b/crawl-ref/source/mon-util.cc @@ -3933,34 +3933,34 @@ int monsters::total_weight() const return (body_weight() + burden); } -int monsters::damage_type(int which_attack) +int monsters::damage_brand(int which_attack) { const item_def *mweap = weapon(which_attack); if (!mweap) { - const mon_attack_def atk = mons_attack_spec(this, which_attack); - return ((atk.type == AT_CLAW) ? DVORP_CLAWING : - (atk.type == AT_TENTACLE_SLAP) ? DVORP_TENTACLE - : DVORP_CRUSHING); + if (mons_is_ghost_demon(type)) + return (ghost->brand); + + return (SPWPN_NORMAL); } - return (get_vorpal_type(*mweap)); + return (!is_range_weapon(*mweap) ? get_weapon_brand(*mweap) : SPWPN_NORMAL); } -int monsters::damage_brand(int which_attack) +int monsters::damage_type(int which_attack) { const item_def *mweap = weapon(which_attack); if (!mweap) { - if (mons_is_ghost_demon(type)) - return (ghost->brand); - - return (SPWPN_NORMAL); + const mon_attack_def atk = mons_attack_spec(this, which_attack); + return ((atk.type == AT_CLAW) ? DVORP_CLAWING : + (atk.type == AT_TENTACLE_SLAP) ? DVORP_TENTACLE + : DVORP_CRUSHING); } - return (!is_range_weapon(*mweap) ? get_weapon_brand(*mweap) : SPWPN_NORMAL); + return (get_vorpal_type(*mweap)); } item_def *monsters::missiles() |