9
3

KidneyStab.lua 861 B

12345678910111213141516171819202122232425262728293031
  1. --[[
  2. Script Name : Spells/Scout/Rogue/Swashbuckler/KidneyStab.lua
  3. Script Author : Jabantiz
  4. Script Date : 2013.12.15 08:12:55
  5. Script Purpose :
  6. :
  7. --]]
  8. function precast(Caster, Target)
  9. if not IsFlanking(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, BonusAmt)
  16. -- Inflicts 29 - 36 melee damage on target
  17. if MaxVal ~= nil and MinVal < MaxVal then
  18. SpellDamage(Target, DmgType, math.random(MinVal, MaxVal))
  19. else
  20. SpellDamage(Target, DmgType, MinVal)
  21. end
  22. -- Decreases Mitigation of target vs physical damage by 54
  23. AddSpellBonus(Target, 200, BonusAmt)
  24. end
  25. function remove(Caster, Target)
  26. RemoveSpellBonus(Target)
  27. end