SnapoftheWrist.lua 761 B

12345678910111213141516171819202122232425
  1. --[[
  2. Script Name : Spells/Scout/Rogue/Swashbuckler/SnapoftheWrist.lua
  3. Script Author : Jabantiz
  4. Script Date : 2013.12.16 01:12:23
  5. Script Purpose :
  6. :
  7. --]]
  8. function cast(Caster, Target, DmgType, MinVal, MaxVal)
  9. -- Inflicts 43 - 72 melee damage on target
  10. if MaxVal ~= nil and MinVal < MaxVal then
  11. SpellDamage(Target, DmgType, math.random(MinVal, MaxVal))
  12. else
  13. SpellDamage(Target, DmgType, MinVal)
  14. end
  15. -- Inflicts 43 - 72 melee damage on target
  16. if LastSpellAttackHit() then
  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. end
  23. end