RapidSwings.lua 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. --[[
  2. Script Name : Spells/Fighter/Brawler/RapidSwings.lua
  3. Script Author : LordPazuzu
  4. Script Date : 9/29/2023
  5. Script Purpose :
  6. :
  7. --]]
  8. -- Inflicts 19 - 32 melee damage on target
  9. -- Inflicts 19 - 32 melee damage on target
  10. -- Inflicts 19 - 32 melee damage on target
  11. -- Inflicts 19 - 32 melee damage on target
  12. -- If facing target
  13. function cast(Caster, Target, DmgType, MinVal, MaxVal)
  14. Level = GetLevel(Caster)
  15. SpellLevel = 19
  16. Mastery = SpellLevel + 10
  17. StatBonus = GetStr(Caster) / 10
  18. if Level < Mastery then
  19. LvlBonus = Level - SpellLevel
  20. else LvlBonus = Mastery - SpellLevel
  21. end
  22. DmgBonus = LvlBonus + StatBonus
  23. MaxDmg = math.floor(DmgBonus) * 2 + MaxVal
  24. MinDmg = math.floor(DmgBonus) * 2 + MinVal
  25. SpellDamage(Target, DmgType, MinDmg, MaxDmg)
  26. if LastSpellAttackHit() then
  27. SpellDamage(Target, DmgType, MinDmg, MaxDmg)
  28. SpellDamage(Target, DmgType, MinDmg, MaxDmg)
  29. SpellDamage(Target, DmgType, MinDmg, MaxDmg)
  30. end
  31. end