9
3

Gouge.lua 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. --[[
  2. Script Name : Spells/Scout/Rogue/Gouge.lua
  3. Script Author : LordPazuzu
  4. Script Date : 2023.01.04 12:01:52
  5. Script Purpose :
  6. :
  7. --]]
  8. function precast(Caster,Target)
  9. if IsBehind(Caster, Target) then
  10. SendMessage(Caster, "Must be in front or flanking.", "yellow")
  11. return false
  12. end
  13. return true
  14. end
  15. function cast(Caster, Target, DmgType, MinVal, MaxVal, Parry)
  16. Level = GetLevel(Caster)
  17. SpellLevel = 15
  18. Mastery = SpellLevel + 10
  19. StatBonus = GetStr(Caster) / 10
  20. if Level < Mastery then
  21. LvlBonus = Level - SpellLevel
  22. else LvlBonus = Mastery - SpellLevel
  23. end
  24. DmgBonus = LvlBonus + StatBonus
  25. MaxDmg = math.floor(DmgBonus) * 2 + MaxVal
  26. MinDmg = math.floor(DmgBonus) * 2 + MinVal
  27. SpellDamage(Target, DmgType, MinDmg, MaxDmg)
  28. AddSkillBonus(Target, GetSkillIDByName("Parry"), Parry)
  29. end
  30. function remove(Caster, Target)
  31. RemoveSkillBonus(Target)
  32. end