9
3

Mangle.lua 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. --[[
  2. Script Name : Spells/Fighter/Warrior/Mangle.lua
  3. Script Author : LordPazuzu
  4. Script Date : 3/28/2023
  5. Script Purpose :
  6. :
  7. --]]
  8. function cast(Caster, Target, MinVal, MaxVal, SkillAmt, SpellLevel)
  9. Level = GetLevel(Caster)
  10. Mastery = SpellLevel + 10
  11. StatBonus = GetStr(Caster) / 10
  12. if Level < Mastery then
  13. LvlBonus = Level - SpellLevel
  14. else LvlBonus = Mastery - SpellLevel
  15. end
  16. DmgBonus = LvlBonus + StatBonus
  17. MaxDmg = math.floor(DmgBonus) * 2 + MaxVal
  18. MinDmg = math.floor(DmgBonus) * 2 + MinVal
  19. SpellDamage(Target, 0, MinDmg, MaxDmg)
  20. -- Decreases Slashing, Crushing and Piercing of target by 1.5
  21. if LastSpellAttackHit() then
  22. AddSkillBonus(Target, GetSkillIDByName("Slashing"), SkillAmt)
  23. AddSkillBonus(Target, GetSkillIDByName("Crushing"), SkillAmt)
  24. AddSkillBonus(Target, GetSkillIDByName("Piercing"), SkillAmt)
  25. end
  26. end
  27. function remove(Caster, Target)
  28. RemoveSkillBonus(Target)
  29. end