diff options
author | megamage <none@none> | 2008-11-22 14:28:11 -0600 |
---|---|---|
committer | megamage <none@none> | 2008-11-22 14:28:11 -0600 |
commit | e2b90f8dc0b312d3ba31c2a1f6c62d92d55e3fb8 (patch) | |
tree | be82e730a471681b8417e7d0eda0dc26f0549826 /src/game/StatSystem.cpp | |
parent | f064caa5cb66cb712dc4a971c7632f253cd7a748 (diff) |
*Make disarm also works on creatures. (Please check if visual effect is correct, i.e., equipments are removed, if not, please report)
--HG--
branch : trunk
Diffstat (limited to 'src/game/StatSystem.cpp')
-rw-r--r-- | src/game/StatSystem.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/game/StatSystem.cpp b/src/game/StatSystem.cpp index 84e49485e5e..64bad232994 100644 --- a/src/game/StatSystem.cpp +++ b/src/game/StatSystem.cpp @@ -752,7 +752,13 @@ void Creature::UpdateDamagePhysical(WeaponAttackType attType) float base_pct = GetModifierValue(unitMod, BASE_PCT); float total_value = GetModifierValue(unitMod, TOTAL_VALUE); float total_pct = GetModifierValue(unitMod, TOTAL_PCT); - + + if(attType == BASE_ATTACK && HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_DISARMED)) + { + weapon_mindamage = 0; + weapon_maxdamage = 0; + } + float mindamage = ((base_value + weapon_mindamage) * base_pct + total_value) * total_pct ; float maxdamage = ((base_value + weapon_maxdamage) * base_pct + total_value) * total_pct ; |