From f0bc544aed7e492d9307ed60524ceee29c4bd117 Mon Sep 17 00:00:00 2001 From: cha0s Date: Fri, 17 Jan 2020 02:30:22 -0600 Subject: [PATCH] refactor: harm --- packages/entity/traits/alive.trait.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/entity/traits/alive.trait.js b/packages/entity/traits/alive.trait.js index 3683dd3..765ce08 100644 --- a/packages/entity/traits/alive.trait.js +++ b/packages/entity/traits/alive.trait.js @@ -113,7 +113,7 @@ export class Alive extends decorate(Trait) { return { tookHarm: (harm, source) => { - if (harm.harmSpec.power > 0) { + if (harm.isHarm) { this.entity.life -= harm.amount; } else {