9
3

RighteousAnger.lua 793 B

1234567891011121314151617181920212223242526272829
  1. --[[
  2. Script Name : Spells/Fighter/Crusader/RighteousAnger.lua
  3. Script Author : LordPazuzu
  4. Script Date : 3/17/2023
  5. Script Purpose :
  6. :
  7. --]]
  8. -- Interrupts target
  9. -- Inflicts 25 - 41 divine damage on target
  10. function cast(Caster, Target, DmgType, MinVal, MaxVal)
  11. Level = GetLevel(Caster)
  12. SpellLevel = 13
  13. Mastery = SpellLevel + 10
  14. StatBonus = GetInt(Caster) / 10
  15. if Level < Mastery then
  16. LvlBonus = Level - SpellLevel
  17. else LvlBonus = Mastery - SpellLevel
  18. end
  19. DmgBonus = LvlBonus + StatBonus
  20. MaxDmg = math.floor(DmgBonus) * 2 + MaxVal
  21. MinDmg = math.floor(DmgBonus) * 2 + MinVal
  22. Interrupt(Caster, Target)
  23. SpellDamage(Target, DmgType, MinDmg, MaxDmg)
  24. end