9
3

RazorEdge.lua 784 B

1234567891011121314151617181920212223242526272829
  1. --[[
  2. Script Name : Spells/Scout/Rogue/Swashbuckler/RazorEdge.lua
  3. Script Author : Jabantiz
  4. Script Date : 2013.12.16 01:12:44
  5. Script Purpose :
  6. :
  7. --]]
  8. function precast(Caster, Target)
  9. -- Must be in front of or flanking
  10. return (not IsBehind(Target, Caster))
  11. end
  12. function cast(Caster, Target, DmgType, MinVal, MaxVal, SkillAmt)
  13. -- Inflicts 98 - 163 melee damage on target
  14. if MaxVal ~= nil and MinVal < MaxVal then
  15. SpellDamage(Target, DmgType, math.random(MinVal, MaxVal))
  16. else
  17. SpellDamage(Target, DmgType, MinVal)
  18. end
  19. -- Decreases Parry of target by 8.1
  20. if LastSpellAttackHit() then
  21. AddSkillBonus(Target, GetSkillIDByName("Parry"), SkillAmt)
  22. end
  23. end