9
3

ForcedSwing.lua 742 B

12345678910111213141516171819202122232425262728
  1. --[[
  2. Script Name : Spells/Fighter/Warrior/ForcedSwing.lua
  3. Script Author : neatz09
  4. Script Date : 2020.01.02 03:01:30
  5. Script Purpose :
  6. :
  7. --]]
  8. -- Inflicts 22 - 38 melee damage on target
  9. function cast(Caster, Target, DmgType, MinVal, MaxVal, SpellLevel)
  10. Level = GetLevel(Caster)
  11. Mastery = SpellLevel + 10
  12. StatBonus = GetStr(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. end