DepressingChant.lua 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. --[[
  2. Script Name : Spells/Scout/Bard/Troubador/DepressingChant.lua
  3. Script Author : neatz09
  4. Script Date : 2020.09.19 03:09:13
  5. Script Purpose :
  6. :
  7. --]]
  8. -- Applies Snare. Lasts for 24.0 seconds.
  9. -- Slows target by 28.3%
  10. -- 5% chance to dispel when target receives hostile action
  11. -- 5% chance to dispel when target takes damage
  12. -- Decreases Mitigation of target vs arcane damage by 197
  13. function cast(Caster, Target, SlowAmt, HostileChance, DmgChance, DebuffAmt)
  14. local Slow = 100 - SlowAmt
  15. -- Slows target
  16. -- chance to dispel when target receives hostile action
  17. -- chance to dispel when target takes damage
  18. -- Decreases Mitigation of target vs noxious damage
  19. AddSpellBonus(Target, 202, DebuffAmt)
  20. SetSpeedMultiplier(Target, Slow)
  21. AddProc(Target, 1, HostileChance)
  22. AddProc(Target, 15, DmgChance)
  23. end
  24. function proc(Caster, Target, Type, SlowAmt, HostileChance, DmgChance, DebuffAmt)
  25. local Spell = GetSpellID()
  26. if (Type == 1 or type == 15) and HasSpellEffect(Target, Spell) then
  27. SetSpeedMultiplier(Target, 1)
  28. end
  29. end
  30. function remove(Caster, Target)
  31. RemoveSpellBonus(Target)
  32. RemoveProc(Target)
  33. SetSpeedMultiplier(Target, 1)
  34. end