9
3

StaticPulse.lua 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. --[[
  2. Script Name : Spells/Mage/StaticPulse.lua
  3. Script Author : LordPazuzu
  4. Script Date : 12/6/2022
  5. Script Purpose :
  6. :
  7. --]]
  8. function cast(Caster, Target, DoTType, MinVal, MaxVal, SpellLevel)
  9. Level = GetLevel(Caster)
  10. Mastery = SpellLevel + 10
  11. StatBonus = GetInt(Caster) / 10
  12. if Level < Mastery then
  13. LvlBonus = Level - SpellLevel
  14. else LvlBonus = Mastery - SpellLevel
  15. end
  16. DmgBonus = LvlBonus + StatBonus
  17. MaxDmg = MaxVal + math.floor(DmgBonus)
  18. MinDmg = MinVal + math.floor(DmgBonus)
  19. SpellDamage(Target, DoTType, MinDmg, MaxDmg)
  20. end
  21. function tick(Caster, Target, DoTType, MinVal, MaxVal, SpellLevel)
  22. Level = GetLevel(Caster)
  23. Mastery = SpellLevel + 10
  24. StatBonus = GetInt(Caster) / 10
  25. SpawnSet(Target,"visual_state",626)
  26. if Level < Mastery then
  27. LvlBonus = Level - SpellLevel
  28. else LvlBonus = Mastery - SpellLevel
  29. end
  30. DmgBonus = LvlBonus + StatBonus
  31. MaxDmg = MaxVal + math.floor(DmgBonus)
  32. MinDmg = MinVal + math.floor(DmgBonus)
  33. SpellDamage(Target, DoTType, MinDmg, MaxDmg)
  34. end
  35. function remove(Caster, Target, DoTType, MinVal, MaxVal)
  36. SetInfoStructString(Target, "visual_state", "0")
  37. SpawnSet(Target,"visual_state",0)
  38. end