Viscerate.lua 899 B

1234567891011121314151617181920212223242526272829303132
  1. --[[
  2. Script Name : Spells/Scout/Rogue/Swashbuckler/Viscerate.lua
  3. Script Author : Jabantiz
  4. Script Date : 2013.12.15 08:12:23
  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. function cast(Caster, Target, BonusAmt, DmgType, MinVal, MaxVal)
  17. -- Decreases AGI of target by 5.0
  18. AddSpellBonus(Target, 2, BonusAmt)
  19. -- Inflicts 16 - 27 melee damage on target
  20. if MaxVal ~= nil and MinVal < MaxVal then
  21. SpellDamage(Target, DmgType, math.random(MinVal, MaxVal))
  22. else
  23. SpellDamage(Target, DmgType, MinVal)
  24. end
  25. end
  26. function remove(Caster, Target)
  27. RemoveSpellBonus(Target)
  28. end