Compute Damage

Just prior to subtracting hitpoints from a combatant as a result of an attack, we search for scripts named ComputeDamage.

Parameters

Hook parameter 5 contains the damage as computed by the engine. If the script returns any value then that value is subtracted from the target's hitpoints.

Context


Character (attacker - $Myself)
Character (target $Target)
Item (weapon - $Item)