FreezingWhorl.lua 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. --[[
  2. Script Name : Spells/Mage/Sorcerer/FreezingWhorl.lua
  3. Script Author : neatz09
  4. Script Date : 2020.11.05 02:11:50
  5. Script Purpose :
  6. :
  7. --]]
  8. -- Inflicts 5 - 10 cold damage on target instantly and every 4 seconds
  9. -- Decreases Mitigation of target vs elemental damage by 133
  10. function cast(Caster, Target, DmgType, MinVal, MaxVal, Mit, SpellLevel)
  11. Level = GetLevel(Caster)
  12. Mastery = SpellLevel + 10
  13. StatBonus = GetInt(Caster) / 10
  14. if Level < Mastery then
  15. LvlBonus = Level - SpellLevel
  16. else LvlBonus = Mastery - SpellLevel
  17. end
  18. DmgBonus = LvlBonus + StatBonus
  19. MaxDmg = math.floor(DmgBonus) * 2 + MaxVal
  20. MinDmg = math.floor(DmgBonus) * 2 + MinVal
  21. SpellDamage(Target, DmgType, MinDmg, MaxDmg)
  22. --AddSpellBonus(Target, 201, Mit)
  23. end
  24. function tick(Caster, Target, DmgType, MinVal, MaxVal, Mit, SpellLevel)
  25. Level = GetLevel(Caster)
  26. Mastery = SpellLevel + 10
  27. StatBonus = GetInt(Caster) / 10
  28. if Level < Mastery then
  29. LvlBonus = Level - SpellLevel
  30. else LvlBonus = Mastery - SpellLevel
  31. end
  32. DmgBonus = LvlBonus + StatBonus
  33. MaxDmg = math.floor(DmgBonus) * 2 + MaxVal
  34. MinDmg = math.floor(DmgBonus) * 2 + MinVal
  35. SpellDamage(Target, DmgType, MinDmg, MaxDmg)
  36. end
  37. function remove(Caster, Target)
  38. RemoveSpellBonus(Target)
  39. end