DancingBlade.lua 931 B

12345678910111213141516171819202122232425262728293031
  1. --[[
  2. Script Name : Spells/Scout/Bard/Troubadour/DancingBlade.lua
  3. Script Author : Zcoretri
  4. Script Date : 17.March.2014
  5. Script Purpose :
  6. :
  7. --]]
  8. function precast(Caster, Target)
  9. -- Must be flanking or behind
  10. if IsFlanking(Caster, Target) then
  11. return true
  12. else
  13. SendMessage(Caster, "You need to be flanking or behind your target to use this ability!", "yellow")
  14. return false, 0
  15. end
  16. end
  17. function cast(Caster, Target, DmgType, MinDmg, MaxDmg, Mitigation)
  18. -- Inflicts melee damage on target
  19. SpellDamage(Target, DmgType, MinDmg, MaxDmg)
  20. -- Decreases Mitigation of target vs elemental, noxious and arcane damage
  21. AddSpellBonus(Target, 201, Mitigation)
  22. AddSpellBonus(Target, 202, Mitigation)
  23. AddSpellBonus(Target, 203, Mitigation)
  24. end
  25. function remove(Caster, Target)
  26. RemoveSpellBonus(Target)
  27. end