9
3

Sleet.lua 957 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. --[[
  2. Script Name : dd_snare.lua
  3. Script Purpose : Generic damage + Snare effect script
  4. Script Author : John Adams
  5. Script Date : 2008.12.04
  6. --]]
  7. function cast(Caster, Target, DDType, MinDDVal, MaxDDVal, SnareAmount, DispelChance)
  8. -- DD component
  9. if MaxDDVal ~= nil and MinDDVal < MaxDDVal then
  10. SpellDamage(Target, DDType, math.random(MinDDVal, MaxDDVal))
  11. else
  12. SpellDamage(Target, DDType, MinDDVal)
  13. end
  14. -- Snare component
  15. OriginalSpeed = GetSpeed(Target)
  16. newSpeed = OriginalSpeed - (OriginalSpeed * (SnareAmount / 100))
  17. if OriginalSpeed > newSpeed then
  18. SetSpeed(Target, newSpeed)
  19. end
  20. end
  21. function tick(Caster, Target, DDType, MinDDVal, MaxDDVal, SnareAmount, DispelChance)
  22. --[[
  23. OriginalSpeed = GetSpeed(Target)
  24. newSpeed = OriginalSpeed - (OriginalSpeed * (SnareAmount / 100))
  25. if OriginalSpeed > newSpeed then
  26. SetSpeed(Target, newSpeed)
  27. end
  28. --]]
  29. end
  30. function remove(Caster, Target)
  31. --[[
  32. SetSpeed(Target, OriginalSpeed)
  33. --]]
  34. end