Pounce.lua 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. --[[
  2. Script Name : Spells/Scout/Predator/Pounce.lua
  3. Script Author : LordPazuzu
  4. Script Date : 2023.03.31 04:03:26
  5. Script Purpose :
  6. :
  7. --]]
  8. --[[ Info from spell_display_effects (remove from script when done)
  9. *Inflicts 115 - 192 melee damage on targets in Area of Effect
  10. *You must be in stealth to use this!
  11. --]]
  12. function precast(Caster, Target)
  13. -- You must be sneaking to use this ability.
  14. if IsStealthed(Caster) then
  15. return true
  16. end
  17. SendMessage(Caster, "You must be sneaking to use this ability.", "yellow")
  18. return false
  19. end
  20. function cast(Caster, Target, DmgType, MinVal, MaxVal)
  21. Level = GetLevel(Caster)
  22. SpellLevel = 19
  23. Mastery = SpellLevel + 10
  24. StatBonus = GetStr(Caster) / 10
  25. if Level < Mastery then
  26. LvlBonus = Level - SpellLevel
  27. else LvlBonus = Mastery - SpellLevel
  28. end
  29. DmgBonus = LvlBonus + StatBonus
  30. MaxDmg = math.floor(DmgBonus) * 2 + MaxVal
  31. MinDmg = math.floor(DmgBonus) * 2 + MaxVal
  32. SpellDamage(Target, DmgType, MinDmg, MaxDmg)
  33. end