overexertion.lua 504 B

12345678910111213141516171819
  1. local Overexertion = {}
  2. Overexertion.name = 'Overexertion'
  3. Overexertion.code = 'overexertion'
  4. Overexertion.text = 'The Power'
  5. Overexertion.type = 'skill'
  6. Overexertion.cost = 40
  7. function Overexertion:canFire(owner)
  8. return owner.health > self.cost and not ctx.buffs:get(owner, 'overexertion')
  9. end
  10. function Overexertion:fire(owner)
  11. ctx.net:emit(app.net.events.damage, {id = owner.id, amount = self.cost, from = owner.id, tick = tick})
  12. ctx.buffs:add(owner, 'overexertion')
  13. end
  14. return Overexertion