Impale.lua 1.5 KB

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