rocketbootsslow.lua 746 B

1234567891011121314151617181920212223242526272829303132
  1. local RocketBootsSlow = {}
  2. ----------------
  3. -- Meta
  4. ----------------
  5. RocketBootsSlow.name = 'Rocket Boots Slow'
  6. RocketBootsSlow.code = 'rocketbootsslow'
  7. RocketBootsSlow.text = 'This unit is slowed from rocket boots.'
  8. RocketBootsSlow.hide = false
  9. ----------------
  10. -- Data
  11. ----------------
  12. RocketBootsSlow.duration = 1.5
  13. function RocketBootsSlow:activate()
  14. self.owner.haste = self.owner.haste + (self.owner.class.speed * -.6)
  15. self.timer = self.duration
  16. end
  17. function RocketBootsSlow:deactivate()
  18. self.owner.haste = self.owner.haste + (self.owner.class.speed * .6)
  19. end
  20. function RocketBootsSlow:update()
  21. self.timer = timer.rot(self.timer, function()
  22. ctx.buffs:remove(self.owner, 'rocketbootsslow')
  23. end)
  24. end
  25. return RocketBootsSlow