HatefulSlam.lua 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. --[[
  2. Script Name : Spells/Fighter/Crusader/Shadowknight/HatefulSlam.lua
  3. Script Author : Jabantiz
  4. Script Date : 2014.01.11 05:01:41
  5. Script Purpose :
  6. :
  7. --]]
  8. function cast(Caster, Target, DmgType, MinVal, MaxVal, HateAmt, TickHateAmt)
  9. -- Inflicts 23 - 39 disease damage on target
  10. if MaxVal ~= nil and MinVal < MaxVal then
  11. SpellDamage(Target, DmgType, math.random(MinVal, MaxVal))
  12. else
  13. SpellDamage(Target, DmgType, MinVal)
  14. end
  15. -- Increases Threat to target by 181 instantly ...
  16. AddHate(Caster, Target, MinVal, 1)
  17. -- Applies Knockdown. Lasts for 2.5 seconds.
  18. -- Blurs vision of target
  19. -- Throws target back
  20. -- Stuns target
  21. -- Does not affect Epic targets
  22. if not IsEpic(Target) then
  23. Knockback(Caster, Target, 2500)
  24. AddControlEffect(Target, 4)
  25. BlurVision(Target, 1.0)
  26. AddSpellTimer(2500, "RemoveKnockback")
  27. end
  28. end
  29. function tick(Caster, Target, DmgType, MinVal, MaxVal, HateAmt, TickHateAmt)
  30. -- ... and by 79 every 3 seconds thereafter
  31. AddHate(Caster, Target, TickHateAmt, 1)
  32. end
  33. function RemoveKnockback(Caster, Target)
  34. RemoveControlEffect(Target, 4)
  35. BlurVision(Target, 0.0)
  36. end