Skip to content

Commit

Permalink
🐛 fix |MovePenalty|Infinite penalty for gridded
Browse files Browse the repository at this point in the history
  • Loading branch information
caewok committed Sep 2, 2024
1 parent 8b5ef96 commit d89a8ce
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/measurement/MovePenalty.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit d89a8ce

Please sign in to comment.