MaskedStrike.lua 983 B

123456789101112131415161718192021222324252627282930313233
  1. --[[
  2. Script Name : Spells/Scout/Predator/Assassin/MaskedStrike.lua
  3. Script Author : Jabantiz
  4. Script Date : 2014.04.17 03:04:29
  5. Script Purpose :
  6. :
  7. --]]
  8. function precast(Caster, Target)
  9. -- Must be flanking or behind
  10. if not IsFlanking(Caster, Target) then
  11. SendMessage(Caster, "Must be flanking or behind", "yellow")
  12. return false
  13. end
  14. return true
  15. end
  16. function cast(Caster, Target, DmgType, MinVal, MaxVal)
  17. -- Inflicts 24 - 41 melee damage on target
  18. if MaxVal ~= nil and MinVal < MaxVal then
  19. SpellDamage(Target, DmgType, math.random(MinVal, MaxVal))
  20. else
  21. SpellDamage(Target, DmgType, MinVal)
  22. end
  23. end
  24. function remove(Caster, Target)
  25. -- Applies Shroud on termination. Lasts for 36.0 seconds.
  26. -- Grants stealth to caster
  27. -- Suspends caster's movement speed enhancements
  28. Say(Caster, "Not Implemented: Stealth after attack")
  29. end