9
3

PeltingEarth.lua 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. --[[
  2. Script Name : Spells/Mage/Summoner/PeltingEarth.lua
  3. Script Author : LordPazuzu
  4. Script Date : 2-16-2023
  5. Script Purpose : -
  6. - :
  7. --]]
  8. -- Inflicts 22 - 34 magic damage on target
  9. -- Inflicts 5 - 8 magic damage on target every 4 seconds
  10. function cast(Caster, Target, DmgType, MinVal, MaxVal, TickType, TickMin, TickMax)
  11. Level = GetLevel(Caster)
  12. SpellLevel = 10
  13. Mastery = SpellLevel + 10
  14. StatBonus = GetInt(Caster) / 10
  15. if Level < Mastery then
  16. LvlBonus = Level - SpellLevel
  17. else LvlBonus = Mastery - SpellLevel
  18. end
  19. DmgBonus = LvlBonus + StatBonus
  20. MaxDmg = MaxVal + math.floor(DmgBonus)
  21. MinDmg = MinVal + math.floor(DmgBonus)
  22. SpellDamage(Target, DmgType, MinDmg, MaxDmg)
  23. end
  24. function tick(Caster, Target, DmgType, MinVal, MaxVal, TickType, TickMin, TickMax)
  25. Level = GetLevel(Caster)
  26. SpellLevel = 10
  27. Mastery = SpellLevel + 10
  28. StatBonus = GetInt(Caster) / 10
  29. if Level < Mastery then
  30. LvlBonus = Level - SpellLevel
  31. else LvlBonus = Mastery - SpellLevel
  32. end
  33. DmgBonus = LvlBonus + StatBonus
  34. TickMaxDmg = TickMax + math.floor(DmgBonus)
  35. TickMinDmg = TickMin + math.floor(DmgBonus)
  36. SpellDamage(Target, TickType, TickMinDmg, TickMaxDmg)
  37. end