| 123456789101112131415161718192021222324252627282930313233 |
- local Bloodlust = {}
- ----------------
- -- Meta
- ----------------
- Bloodlust.name = 'Bloodlust'
- Bloodlust.code = 'bloodlust'
- Bloodlust.text = 'It is Bloodlust. My wife for hire.'
- Bloodlust.type = 'passive'
- ----------------
- -- Behavior
- ----------------
- function Bloodlust:activate(owner)
- ctx.event:on(app.net.events.dead, function(data)
- if data.kill == owner.id and data.id ~= owner.id then
- ctx.buffs:add(owner, 'bloodlust')
- end
- end, self)
- end
- function Bloodlust:deactivate(owner)
- ctx.event:remove(app.net.events.dead, self)
- end
- function Bloodlust:value(owner)
- local buff = ctx.buffs:get(owner, 'bloodlust')
- if buff then return buff.timer / buff.duration end
- return 0
- end
- return Bloodlust
|