9
3

HunkerDown.lua 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. --[[
  2. Script Name : Spells/Fighter/Warrior/HunkerDown.lua
  3. Script Author : LordPazuzu
  4. Script Date : 1/1/2023
  5. Script Purpose :
  6. :
  7. --]]
  8. function cast(Caster, Target, HasteMod, SelfSnare, Mit, TargetSnare, SpellLevel)
  9. Say(Caster, "Self snare not yet implemented.")
  10. -- Decreases Haste of caster by 11.3
  11. AddSpellBonus(Caster, 617, HasteMod)
  12. -- Slows caster by 32.6%
  13. -- local Slow = 1.0 - SelfSnare
  14. -- SetSpeedMultiplier(Caster, Slow)
  15. -- Increases Mitigation of caster vs physical damage by 133
  16. Level = GetLevel(Caster)
  17. Mastery = SpellLevel + 10
  18. if Level < Mastery then
  19. LvlBonus = Level - SpellLevel
  20. else LvlBonus = Mastery - SpellLevel
  21. end
  22. MitBonus = LvlBonus + Mit
  23. AddSpellBonus(Caster, 200, MitBonus)
  24. -- On a melee hit this spell may cast Cripple on target of attack. Lasts for 10.0 seconds. Triggers about 5.0 times per minute.
  25. -- Slows targets in Area of Effect by 29.3%
  26. -- 5% chance to dispel when target receives hostile action
  27. -- 5% chance to dispel when target takes damage
  28. AddProc(Target, 3, 25.0)
  29. end
  30. function proc(Caster, Target, Type, TargetSnare, SpellLevel)
  31. Spell = GetSpell(5431, GetSpellTier())
  32. if Type == 3 then
  33. SetSpellDataIndex(Spell, 0, TargetSnare)
  34. CastCustomSpell(Spell, Caster, Target)
  35. end
  36. end
  37. function remove(Caster, Target)
  38. RemoveSpellBonus(Caster)
  39. SetSpeedMultiplier(Caster, 1)
  40. end