ShroudedStrike.lua 980 B

12345678910111213141516171819202122232425262728293031323334353637
  1. --[[
  2. Script Name : Spells/Scout/Predator/ShroudedStrike.lua
  3. Script Author : LordPazuzu
  4. Script Date : 2023.03.31 07:03:01
  5. Script Purpose :
  6. :
  7. --]]
  8. function precast(Caster,Target)
  9. if not IsFlanking(Caster, Target) and not IsBehind(Caster, Target) then
  10. SendMessage(Caster, "Must be flanking or behind", "yellow")
  11. return false
  12. end
  13. return true
  14. end
  15. function cast(Caster, Target, DmgType, MinVal, MaxVal)
  16. Level = GetLevel(Caster)
  17. SpellLevel = 19
  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 + MaxVal
  27. SpellDamage(Target, DmgType, MinDmg, MaxDmg)
  28. CastSpell(Caster, 2550398, 1)
  29. end