From 6a12a3f04da2f5974fde278ffe583fce1b7b11b4 Mon Sep 17 00:00:00 2001 From: Dev Date: Wed, 10 Jul 2024 16:46:53 +0100 Subject: [PATCH] Fixed incorrect starting hp value inside `getLowestHpBody()` --- project/src/generators/BotGenerator.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/src/generators/BotGenerator.ts b/project/src/generators/BotGenerator.ts index c501c159..2dd6d5f8 100644 --- a/project/src/generators/BotGenerator.ts +++ b/project/src/generators/BotGenerator.ts @@ -483,7 +483,7 @@ export class BotGenerator } let result: BodyPart; - let currentHighest = 0; + let currentHighest = Number.POSITIVE_INFINITY; for (const bodyParts of bodies) { const hpTotal = Object.values(bodyParts).reduce((acc, curr) => acc + curr.max, 0);