diff --git a/packages/entity/traits/alive.trait.js b/packages/entity/traits/alive.trait.js index a46b540..ba70b36 100644 --- a/packages/entity/traits/alive.trait.js +++ b/packages/entity/traits/alive.trait.js @@ -113,12 +113,12 @@ export class Alive extends decorate(Trait) { listeners() { return { - tookDamage: (damage, source) => { - if (damage.damageSpec.power > 0) { - this.entity.life -= damage.amount; + tookHarm: (harm, source) => { + if (harm.harmSpec.power > 0) { + this.entity.life -= harm.amount; } else { - this.entity.life += damage.amount; + this.entity.life += harm.amount; } // Clamp health between 0 and max. this.entity.life = Math.min(