Bleed.lua 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. --[[
  2. Script Name : Spells/Scout/Predator/Bleed.lua
  3. Script Author : LordPazuzu
  4. Script Date : 3/29/2023
  5. Script Purpose :
  6. :
  7. --]]
  8. -- Inflicts 4 - 6 melee damage on target
  9. -- Inflicts 8 - 14 piercing damage on target instantly and every 4 seconds
  10. -- If facing target
  11. function cast(Caster, Target, DmgType, MinVal, MaxVal, TickType, TickMin, TickMax)
  12. Say(Caster, "Facing Target not implemented")
  13. Level = GetLevel(Caster)
  14. SpellLevel = 12
  15. Mastery = SpellLevel + 10
  16. StatBonus = GetStr(Caster) / 10
  17. if Level < Mastery then
  18. LvlBonus = Level - SpellLevel
  19. else LvlBonus = Mastery - SpellLevel
  20. end
  21. DmgBonus = LvlBonus + StatBonus
  22. MaxDmg = math.floor(DmgBonus) * 2 + MaxVal
  23. MinDmg = math.floor(DmgBonus) * 2 + MaxVal
  24. SpellDamage(Target, DmgType, MinDmg, MaxDmg)
  25. end
  26. function tick(Caster, Target, DmgType, MinVal, MaxVal, TickType, TickMin, TickMax)
  27. Level = GetLevel(Caster)
  28. SpellLevel = 12
  29. Mastery = SpellLevel + 10
  30. StatBonus = GetStr(Caster) / 10
  31. if Level < Mastery then
  32. LvlBonus = Level - SpellLevel
  33. else LvlBonus = Mastery - SpellLevel
  34. end
  35. DmgBonus = LvlBonus + StatBonus
  36. MaxTick = math.floor(DmgBonus) * 2 + TickMax
  37. MinTick = math.floor(DmgBonus) * 2 + TickMin
  38. SpellDamage(Target, TickType, MinTick, MaxTick)
  39. end