Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function init()
- animator.setParticleEmitterOffsetRegion("healing", mcontroller.boundBox())
- animator.setParticleEmitterEmissionRate("healing", config.getParameter("emissionRate", 3))
- animator.setParticleEmitterActive("healing", true)
- script.setUpdateDelta(5)
- self.tickDamagePercentage = 0.1 + config.getParameter("bleedAmount", 0)
- self.tickTime = 0.5
- self.tickTimer = self.tickTime
- self.damage = math.floor(status.resourceMax("health") * self.tickDamagePercentage) + 1
- effect.duration()
- end
- function update(dt)
- self.tickTimer = self.tickTimer - dt
- if effect.duration() >= 9.9 then
- self.damage = math.floor(status.resourceMax("health") * self.tickDamagePercentage) + 1
- elseif self.tickTimer <= 0 then
- self.tickTimer = self.tickTime
- self.damage = self.damage * 0.75
- status.applySelfDamageRequest({
- damageType = "IgnoresDef",
- damage = self.damage,
- damageSourceKind = "bow",
- sourceEntityId = entity.id()
- })
- end
- end
- function uninit()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement