MortalBlade.lua 771 B

12345678910111213141516171819202122232425262728
  1. --[[
  2. Script Name : Spells/Scout/Predator/Assassin/MortalBlade.lua
  3. Script Author : neatz09
  4. Script Date : 2019.09.23 03:09:36
  5. Script Purpose :
  6. :
  7. --]]
  8. -- You must be in stealth.
  9. function precast(Caster, Target)
  10. -- You must be sneaking to use this ability.
  11. if IsStealthed(Caster) then
  12. return true
  13. end
  14. SendMessage(Caster, "You must be sneaking to use this ability.", "yellow")
  15. return false
  16. end
  17. -- Inflicts 400 - 666 melee damage on target
  18. function cast(Caster, Target, DmgType, MinVal, MaxVal)
  19. if MaxVal ~= nil and MinVal < MaxVal then
  20. SpellDamage(Target, DmgType, math.random(MinVal, MaxVal))
  21. else
  22. SpellDamage(Target, DmgType, MinVal)
  23. end
  24. end