Assail.lua 814 B

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