puppetize.lua 617 B

123456789101112131415161718192021
  1. local Puppetize = extend(Buff)
  2. Puppetize.tags = {}
  3. function Puppetize:activate()
  4. self.unit.channeling, self.unit.spawning, self.unit.casting = false, false, false
  5. self.unit.team = self.unit.team == 0 and ctx.player.team or 0
  6. self.unit.target = nil
  7. self.unit.animation:set('idle', {force = true})
  8. end
  9. function Puppetize:deactivate()
  10. self.unit.team = self.unit.team == 0 and ctx.player.team or 0
  11. self.unit.target = nil
  12. self.unit.animation:set('idle', {force = true})
  13. if self.owner then
  14. self.owner.channeling = false
  15. self.owner.animation:set('idle', {force = true})
  16. end
  17. end
  18. return Puppetize