| 07-01-2004, 07:42 PM | #1 |
Does anyone know the system used when units take damage? Like if a unit has 45-50 attack and the unit being attacked has 5 armour, how much damage does that defending unit take? I assume it is a random number between 45 and 50 but what does the armour do? I need this for a spell where if a hero takes damage it transfers it to another unit and heals himself that much damage as if he never took it, but i dont need to know how to do this part :) |
| 07-01-2004, 08:50 PM | #2 |
Have you tried using the "unit takes damage" event and "event response - damage taken" function? I'm not sure if the event response gives you the damage that was dealt or the damage that was received after the armor reduced it... Otherwise, there is a slightly complex formula for how much armor reduces damage. In effect, it means that every point of armor means +6% hp. This means that 17 armor would approximately be the same as if the unit had +100% hp, so it should reduce damage by 50%. The precise formula would then be: dealtDamage = attackerDamage/(1+(attackedArmor*0.06)) |
| 07-02-2004, 03:44 PM | #3 |
if you hold your move over the armour, it says: damage reduction ..% so... you can just calculate that.. |
| 07-02-2004, 03:50 PM | #4 |
Cool, thanks for the advice guys, i guess i dont need this thread any more then :) |
