9
3

RadiantStrike.lua 992 B

1234567891011121314151617181920212223242526272829303132333435
  1. --[[
  2. Script Name : Spells/Priest/Cleric/RadiantStrike.lua
  3. Script Author : neatz09
  4. Script Date : 2020.11.10 10:11:00
  5. Script Purpose :
  6. :
  7. --]]
  8. -- Info from spell_display_effects (remove from script when done)
  9. -- Inflicts 37 - 45 divine damage on target
  10. -- Inflicts 37 - 45 divine damage on target
  11. -- If target is undead
  12. function cast(Caster, Target, DmgType, MinVal, MaxVal, SpellLevel)
  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 + MaxVal
  23. SpellDamage(Target, DmgType, MinDmg, MaxDmg)
  24. if GetRaceBaseType(Target) == 333 then
  25. SpellDamage(Target, Dmgtype, MinDmg, MaxDmg)
  26. end
  27. end