refactor: damage -> harm

This commit is contained in:
cha0s 2019-12-12 19:28:01 -06:00
parent af9924d441
commit ac7746a3a6

View File

@ -113,12 +113,12 @@ export class Alive extends decorate(Trait) {
listeners() { listeners() {
return { return {
tookDamage: (damage, source) => { tookHarm: (harm, source) => {
if (damage.damageSpec.power > 0) { if (harm.harmSpec.power > 0) {
this.entity.life -= damage.amount; this.entity.life -= harm.amount;
} }
else { else {
this.entity.life += damage.amount; this.entity.life += harm.amount;
} }
// Clamp health between 0 and max. // Clamp health between 0 and max.
this.entity.life = Math.min( this.entity.life = Math.min(