CripplingStrike.lua 1003 B

12345678910111213141516171819202122232425262728293031323334
  1. --[[
  2. Script Name : Spells/Scout/Predator/Assassin/CripplingStrike.lua
  3. Script Author : neatz09
  4. Script Date : 2019.09.23 03:09:37
  5. Script Purpose :
  6. :
  7. --]]
  8. -- Must be flanking or behind
  9. function precast(Caster, Target)
  10. -- Must be flanking or behind
  11. if not IsFlanking(Caster, Target) then
  12. SendMessage(Caster, "Must be flanking or behind", "yellow")
  13. return false
  14. end
  15. end
  16. -- Inflicts 386 - 643 melee damage on target
  17. function cast(Caster, Target, DmgType, MinVal, MaxVal, SkillAmt)
  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. Say(Caster, "need to add IfLastHit to debuff portion")
  24. -- Decreases Defense of target by 23.5
  25. AddSkillBonus(Target, GetSkillIDByName("Defense"), SkillAmt)
  26. end
  27. function remove(Caster, Target, SkillAmt)
  28. RemoveSkillBonus(Target)
  29. end