SpectralWard.lua 760 B

12345678910111213141516171819202122232425262728293031323334
  1. --[[
  2. Script Name : Spells/Priest/Shaman/SpectralWard.lua
  3. Script Author : LordPazuzu
  4. Script Date : 2023.03.02 09:03:17
  5. Script Purpose :
  6. :
  7. --]]
  8. function cast(Caster, Target, BaseWard)
  9. Level = GetLevel(Caster)
  10. SpellLevel = 12
  11. Mastery = SpellLevel + 10
  12. StatBonus = GetWis(Caster) / 10
  13. if Level < Mastery then
  14. LvlBonus = Level - SpellLevel
  15. else LvlBonus = Mastery - SpellLevel
  16. end
  17. WardBonus = LvlBonus + StatBonus
  18. TotalWard = BaseWard + math.floor(WardBonus * 2)
  19. AddWard(TotalWard)
  20. end
  21. function remove(Caster, Target)
  22. local heal = GetWardAmountLeft(Target)
  23. SpellHeal("Heal", heal, heal)
  24. RemoveWard(Caster)
  25. end