Dispatch.lua 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. --[[
  2. Script Name : Spells/Scout/Rogue/Brigand/Dispatch.lua
  3. Script Author : neatz09
  4. Script Date : 2019.10.07 02:10:30
  5. Script Purpose :
  6. :
  7. --]]
  8. function precast(Caster, Target)
  9. if IsFlanking(Caster, Target) then
  10. return true
  11. else
  12. SendMessage(Caster, "You must be flanking or behind your target to use this ability!", "yellow")
  13. return false
  14. end
  15. end
  16. -- Inflicts 541 - 903 melee damage on target
  17. function cast(Caster, Target, DmgType, MinVal, MaxVal, Debuff)
  18. if MaxVal ~= nil and MinVal < MaxVal then
  19. SpellDamage(Target, DmgType, math.random(MinVal, MaxVal))
  20. else
  21. SpellDamage(Target, DmgType, MinVal)
  22. end
  23. -- Decreases Mitigation of target vs physical damage by 4061
  24. -- Decreases Mitigation of target vs elemental damage by 4061
  25. -- Decreases Mitigation of target vs noxious damage by 4061
  26. -- Decreases Mitigation of target vs arcane damage by 4061
  27. AddSpellBonus(Target, 200, Debuff)
  28. AddSpellBonus(Target, 201, Debuff)
  29. AddSpellBonus(Target, 202, Debuff)
  30. AddSpellBonus(Target, 203, Debuff)
  31. end
  32. function remove(Caster, Target)
  33. RemoveSpellBonus(Caster, Target)
  34. end