FaithfulSwing.lua 905 B

1234567891011121314151617181920212223242526272829303132
  1. --[[
  2. Script Name : Spells/Fighter/Crusader/FaithfulSwing.lua
  3. Script Author : LordPazuzu
  4. Script Date : 2023.03.17 08:03:28
  5. Script Purpose :
  6. :
  7. --]]
  8. function cast(Caster, Target, DmgType, MinVal, MaxVal, HealMin, HealMax)
  9. Level = GetLevel(Caster)
  10. SpellLevel = 15
  11. Mastery = SpellLevel + 10
  12. StatBonus = GetStr(Caster) / 10
  13. MaxHealth = GetMaxHP(Caster)
  14. MinHeal = math.floor(MaxHealth * HealMin)
  15. MaxHeal = math.floor(MaxHealth * HealMax)
  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 + MinVal
  23. SpellDamage(Target, DmgType, MinDmg, MaxDmg)
  24. SpellHeal("Heal", MinHeal, MaxHeal, Caster)
  25. end