9
3

RadiantStrike.lua 1001 B

123456789101112131415161718192021222324252627282930313233343536
  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)
  13. Level = GetLevel(Caster)
  14. SpellLevel = 11
  15. Mastery = SpellLevel + 10
  16. StatBonus = GetInt(Caster) / 10
  17. if Level < Mastery then
  18. LvlBonus = Level - SpellLevel
  19. else LvlBonus = Mastery - SpellLevel
  20. end
  21. DmgBonus = LvlBonus + StatBonus
  22. MaxDmg = math.floor(DmgBonus) * 2 + MaxVal
  23. MinDmg = math.floor(DmgBonus) * 2 + MaxVal
  24. SpellDamage(Target, DmgType, MinDmg, MaxDmg)
  25. if GetRaceBaseType(Target) == 333 then
  26. SpellDamage(Target, Dmgtype, MinDmg, MaxDmg)
  27. end
  28. end