9
3

AdmonishingSmite.lua 1007 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. --[[
  2. Script Name : Spells/Priest/Cleric/AdmonishingSmite.lua
  3. Script Author : LordPazuzu
  4. Script Date : 12/1/2022
  5. Script Purpose :
  6. :
  7. --]]
  8. function cast(Caster, Target, DmgType, MinVal, MaxVal)
  9. Level = GetLevel(Caster)
  10. SpellLevel = 18
  11. Mastery = SpellLevel + 10
  12. StatBonus = GetInt(Caster) / 10
  13. if Level < Mastery then
  14. LvlBonus = Level - SpellLevel
  15. else LvlBonus = Mastery - SpellLevel
  16. end
  17. DmgBonus = LvlBonus + StatBonus
  18. MaxDmg = math.floor(DmgBonus) * 2 + MaxVal
  19. MinDmg = math.floor(DmgBonus) * 2 + MinVal
  20. SpellDamage(Target, DmgType, MinDmg, MaxDmg)
  21. if not IsEpic() then
  22. AddControlEffect(Target, 3)
  23. end
  24. AddProc(Target, 15, 100)
  25. end
  26. function proc(Caster, Target, Type, DmgType, MinVal)
  27. if Type == 15 then
  28. RemoveControlEffect(Target, 3)
  29. CancelSpell()
  30. end
  31. end
  32. function remove(Caster, Target)
  33. RemoveControlEffect(Target, 3)
  34. end