1. Animals
  2. Abilities
  3. Conditions
  4. Tool/Weapon
  5. Equipped
  6. Food/Medicine
  7. Items
  8. Attributes
  9. Creatures
  10. Blocks
  11. Props
  12. API Types
  13. API Functions


void LTH_damage_final(string fn)

This hook expects functions of the form:

damage fn(entity attacker,entity defender,damage damage)

SERVER This has no effect if performed on the client (but will work in single player)

Sets the function that will modify final results from all damage calculations. The hook function will be called after all variance, resistances, weakness, etc. are calculated. This represents the final, actual damage the target will take. The attacker is specified as the first enemy, and the defender is the second. The function will return a possibly modified damage report which will be used as the result of calculation.