From d89a8cec9976a29c2692e6b4f7b6f4826a2552cd Mon Sep 17 00:00:00 2001 From: Michael Enion Date: Mon, 2 Sep 2024 16:37:46 -0700 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix=20|MovePenalty|Infinite=20pe?= =?UTF-8?q?nalty=20for=20gridded?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/measurement/MovePenalty.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/measurement/MovePenalty.js b/scripts/measurement/MovePenalty.js index fd6170e..4fa58ad 100644 --- a/scripts/measurement/MovePenalty.js +++ b/scripts/measurement/MovePenalty.js @@ -234,8 +234,8 @@ export class MovePenalty { // Tokens const tokenMultiplier = this.constructor.tokenMultiplier; const useTokenFlat = this.constructor.useFlatTokenMultiplier; - if ( useTokenFlat ) flatPenalty += (tokenMultiplier * tokens.length); - else currentMultiplier *= (tokenMultiplier * tokens.length); + if ( useTokenFlat ) flatPenalty += (tokenMultiplier * tokens.length); // Default to 0. + else currentMultiplier *= (tokens.length ? (tokenMultiplier * tokens.length) : 1); // Default to 1. // Regions const testRegions = this.constructor.terrainAPI && regions.length;