Fixed incorrect starting hp value inside getLowestHpBody()

This commit is contained in:
Dev 2024-07-10 16:46:53 +01:00
parent 392d3bd8aa
commit 6a12a3f04d

View File

@ -483,7 +483,7 @@ export class BotGenerator
} }
let result: BodyPart; let result: BodyPart;
let currentHighest = 0; let currentHighest = Number.POSITIVE_INFINITY;
for (const bodyParts of bodies) for (const bodyParts of bodies)
{ {
const hpTotal = Object.values(bodyParts).reduce((acc, curr) => acc + curr.max, 0); const hpTotal = Object.values(bodyParts).reduce((acc, curr) => acc + curr.max, 0);