9
3

Soulrend.lua 1.1 KB

12345678910111213141516171819202122232425262728293031323334
  1. --[[
  2. Script Name : Spells/Fighter/Crusader/Shadowknight/Soulrend.lua
  3. Script Author : Jabantiz
  4. Script Date : 2014.01.08 03:01:53
  5. Script Purpose :
  6. :
  7. --]]
  8. function cast(Caster, Target, DmgType, MinVal, MaxVal)
  9. local damageInflicted = false;
  10. -- Inflicts 12 - 20 piercing damage on target
  11. if MaxVal ~= nil and MinVal < MaxVal then
  12. damageInflicted = SpellDamage(Target, DmgType, math.random(MinVal, MaxVal))
  13. else
  14. damageInflicted = SpellDamage(Target, DmgType, MinVal)
  15. end
  16. -- Applies Knockdown on termination. Lasts for 1.5 seconds.
  17. -- Throws target back
  18. -- Stuns target
  19. -- Blurs vision of target
  20. -- Does not affect Epic targets
  21. if damageInflicted and not IsEpic(Target) then
  22. AddControlEffect(Target, 4)
  23. BlurVision(Target, 1.0)
  24. AddSpellTimer(1500, "RemoveStunBlur")
  25. end
  26. end
  27. function RemoveStunBlur(Caster, Target)
  28. RemoveControlEffect(Target, 4)
  29. BlurVision(Target, 0)
  30. end