9
3

Concussion.lua 800 B

1234567891011121314151617181920212223242526272829303132
  1. --[[
  2. Script Name : Spells/Fighter/Warrior/Concussion.lua
  3. Script Author : LordPazuzu
  4. Script Date : 3/28/2023
  5. Script Purpose :
  6. :
  7. --]]
  8. function cast(Caster, Target, DmgType, MinVal, MaxVal, PwrMin, PwrMax)
  9. Level = GetLevel(Caster)
  10. SpellLevel = 17
  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. -- Decreases power of target by 23 - 38
  22. SpellHeal("Power", PwrMin, PwrMax)
  23. end