From be83dbd055e2ed727544f68fda14999fd5327e88 Mon Sep 17 00:00:00 2001 From: sladecraven Date: Thu, 6 Oct 2022 12:47:17 +0200 Subject: [PATCH] Fix #103 size warning --- modules/pegasus-actor.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/modules/pegasus-actor.js b/modules/pegasus-actor.js index 3d2cb25..041383a 100644 --- a/modules/pegasus-actor.js +++ b/modules/pegasus-actor.js @@ -1922,10 +1922,8 @@ export class PegasusActor extends Actor { /* -------------------------------------------- */ processSizeBonus(rollData) { if (rollData.defenderTokenId) { - if ( !Number(this.system.biodata.sizenum) || !Number(this.system.biodata.sizebonus) ) { - ui.notifications.warn(`Character ${this.name} has no size value, please fix`) - return - } + this.system.biodata.sizenum = this.system.biodata?.sizenum?? 0 + this.system.biodata.sizebonus = this.system.biodata?.sizebonus?? 0 let diffSize = rollData.defenderSize - this.system.biodata.sizenum + this.system.biodata.sizebonus //console.log("Diffsize", diffSize) if (rollData.subKey == "melee-atk" || rollData.subKey == "ranged-atk") {