BurningRadiance.lua 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. --[[
  2. Script Name : Spells/Mage/Sorcerer/BurningRadiance.lua
  3. Script Author : LordPazuzu
  4. Script Date : 2022.11.23 09:11:13
  5. Script Purpose :
  6. :
  7. --]]
  8. function cast(Caster, Target, DmgType, MinVal, MaxVal, SpellLevel)
  9. AddProc(Target, 3, 19)
  10. end
  11. function proc(Caster, Target, Type, DmgType, MinVal, MaxVal, SpellLevel)
  12. Spell = GetSpell(5436, GetSpellTier())
  13. Level = GetLevel(Caster)
  14. Mastery = SpellLevel + 10
  15. StatBonus = GetInt(Caster) / 10
  16. if Level < Mastery then
  17. LvlBonus = Level - SpellLevel
  18. else LvlBonus = Mastery - SpellLevel
  19. end
  20. DmgBonus = LvlBonus + StatBonus
  21. MaxDmg = math.floor(DmgBonus) * 2 + MaxVal
  22. MinDmg = math.floor(DmgBonus) * 2 + MinVal
  23. if Type == 3 then
  24. SetSpellDataIndex(Spell, 0, DmgType)
  25. SetSpellDataIndex(Spell, 1, MinDmg)
  26. SetSpellDataIndex(Spell, 2, MaxDmg)
  27. CastCustomSpell(Spell, Caster, Target)
  28. end
  29. end
  30. function remove(Caster, Target)
  31. RemoveProc(Target)
  32. end