Encase.lua 738 B

123456789101112131415161718192021222324252627
  1. --[[
  2. Script Name : Spells/Mage/Sorcerer/Warlock/Encase.lua
  3. Script Author : Jabantiz
  4. Script Date : 2014.03.07 07:03:41
  5. Script Purpose :
  6. :
  7. --]]
  8. function cast(Caster, Target, DmgType, MinVal, MaxVal)
  9. -- Inflicts 197 - 328 cold 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. -- Stuns target
  16. -- If Target is not Epic
  17. -- Resistibility increases against targets higher than level 29.
  18. if not IsEpic(Target) then
  19. AddControlEffect(Target, 4)
  20. end
  21. end
  22. function remove(Caster, Target)
  23. RemoveControlEffect(Target, 4)
  24. end