9
3

DeathBlow.lua 849 B

1234567891011121314151617181920212223242526272829
  1. --[[
  2. Script Name : Spells/Scout/Predator/Assassin/DeathBlow.lua
  3. Script Author : neatz09
  4. Script Date : 2019.10.12 11:10:37
  5. Script Purpose :
  6. :
  7. --]]
  8. function precast(Caster, Target)
  9. -- Must be flanking or behind
  10. if not IsFlanking(Target, Caster) then
  11. SendMessage(Caster, "Must be flanking or behind", "yellow")
  12. return false
  13. end
  14. return true
  15. end
  16. function cast(Caster, Target, DmgType, OverMin, OverMax, DmgTyp2, UnderMin, UnderMax)
  17. -- Inflicts 685 - 1142 melee damage on target
  18. -- If over 33% Health
  19. -- Inflicts 2056 - 3426 melee damage on target
  20. -- If under 33% Health
  21. if GetHP(Target) > GetPCTOfHP(Target, 33) then
  22. SpellDamage(Target, DmgType, OverMin, OverMax)
  23. else
  24. SpellDamage(Target, DmgType, UnderMin, UnderMax)
  25. end
  26. end