PowerStrike.lua 857 B

12345678910111213141516171819202122232425262728293031323334
  1. --[[
  2. Script Name : Spells/Fighter/Brawler/PowerStrike.lua
  3. Script Author : LordPazuzu
  4. Script Date : 9/2/2023
  5. Script Purpose :
  6. :
  7. --]]
  8. -- Inflicts 28 - 46 melee damage on target
  9. -- If facing target
  10. function cast(Caster, Target, DmgType, DmgLow, DmgHigh)
  11. Say(Caster, "facing target not implemented.")
  12. Level = GetLevel(Caster)
  13. SpellLevel = 10
  14. Mastery = SpellLevel + 10
  15. StatBonus = GetStr(Caster) / 10
  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 + DmgHigh
  22. MinDmg = math.floor(DmgBonus) * 2 + DmgLow
  23. SpellDamage(Target, DmgType, MinDmg, MaxDmg)
  24. Interrupt(Caster, Target)
  25. end