- Joined
- Aug 11, 2009
- Messages
- 22
Is there a way to detect the amount of damage that a spell or attack does beyond the lethal part?
Example: Spell does 300 damage. Target has 100 life and no damage reduction towards spell damage. Difference is 200, this is what I need.
In a scenario where units have different damage reductions this will be kind of complicated.
I was thinking about dealing a little damage (A), getting the actual damage done (B) and calculating the reduction from the quotient (A-B) / A. Then one could calculate the damage needed to kill this unit and thus get the difference. I wonder if there's a more efficient way though, because these seems rather complicated. Help please
Example: Spell does 300 damage. Target has 100 life and no damage reduction towards spell damage. Difference is 200, this is what I need.
In a scenario where units have different damage reductions this will be kind of complicated.
I was thinking about dealing a little damage (A), getting the actual damage done (B) and calculating the reduction from the quotient (A-B) / A. Then one could calculate the damage needed to kill this unit and thus get the difference. I wonder if there's a more efficient way though, because these seems rather complicated. Help please