IceStorm.lua 602 B

123456789101112131415161718192021222324
  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)
  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. local slow = 100.0 - SnareAmount
  16. SetSpeedMultiplier(Target, slow)
  17. end
  18. function remove(Caster, Target)
  19. SetSpeedMultiplier(Target, 1.0)
  20. end