rage.lua 502 B

1234567891011121314151617181920212223242526272829
  1. local Rage = {}
  2. ----------------
  3. -- Meta
  4. ----------------
  5. Rage.name = 'Rage'
  6. Rage.code = 'rage'
  7. Rage.text = 'The Brute gains 20% lifesteal when below 50% health.'
  8. Rage.type = 'passive'
  9. ----------------
  10. -- Behavior
  11. ----------------
  12. function Rage:activate(owner)
  13. --
  14. end
  15. function Rage:update(owner)
  16. if owner.health < owner.maxHealth * .5 then
  17. if not ctx.buffs:get(owner, 'rage') then
  18. ctx.buffs:add(owner, 'rage')
  19. end
  20. else
  21. ctx.buffs:remove(owner, 'rage')
  22. end
  23. end
  24. return Rage