From 1c654650d4559c4a8c0e2ede5f22f0db2cecb2f6 Mon Sep 17 00:00:00 2001 From: Sainan Date: Thu, 9 Jan 2025 14:02:12 +0100 Subject: [PATCH] fix: cap helminth resources at 100% (#757) --- src/controllers/api/infestedFoundryController.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/controllers/api/infestedFoundryController.ts b/src/controllers/api/infestedFoundryController.ts index 041444757..16c356fe8 100644 --- a/src/controllers/api/infestedFoundryController.ts +++ b/src/controllers/api/infestedFoundryController.ts @@ -176,6 +176,7 @@ export const infestedFoundryController: RequestHandler = async (req, res) => { totalPercentagePointsGained += snack.gain * 100 * apetiteFactor; // 30% would be gain=0.3, so percentage points is equal to gain * 100. resource.Count += Math.trunc(snack.gain * 1000 * apetiteFactor); // 30% would be gain=0.3 or Count=300, so Count=gain*1000. + if (resource.Count > 1000) resource.Count = 1000; } const recipeChanges = addInfestedFoundryXP(inventory.InfestedFoundry, 666 * totalPercentagePointsGained);