9
3

SuckerPunch.lua 763 B

123456789101112131415161718192021222324252627282930313233
  1. --[[
  2. Script Name : Spells/Fighter/Brawler/Bruiser/SuckerPunch.lua
  3. Script Author : Dello
  4. Script Date : 10/07/2014
  5. Script Purpose :
  6. :
  7. --]]
  8. function precast(Caster, Target)
  9. if not IsFlanking(Caster, Target) then
  10. SendMessage(Caster, "You must be flanking or behind", "yellow")
  11. return false
  12. end
  13. return true
  14. end
  15. function cast(Caster, Target, DmgType, MinVal, MaxVal)
  16. if MaxVal ~= nil and MinVal < MaxVal then
  17. SpellDamage(Target, DmgType, math.random(MinVal, MaxVal))
  18. else
  19. SpellDamage(Target, DmgType, MinVal)
  20. end
  21. if not IsEpic(Target) then
  22. AddControlEffect(Target, 3)
  23. end
  24. end
  25. function remove(Caster, Target)
  26. RemoveControlEffect(Target, 3)
  27. end