From 753893d59d381809ec5bba6b5dda9a8c8cd67b70 Mon Sep 17 00:00:00 2001 From: evanpelle Date: Mon, 26 Aug 2024 09:55:56 -0700 Subject: [PATCH] have max of 100k troops --- src/core/configuration/DefaultConfig.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/core/configuration/DefaultConfig.ts b/src/core/configuration/DefaultConfig.ts index 2b8f2634d..279283c84 100644 --- a/src/core/configuration/DefaultConfig.ts +++ b/src/core/configuration/DefaultConfig.ts @@ -71,11 +71,12 @@ export class DefaultPlayerConfig implements PlayerConfig { } troopAdditionRate(player: Player): number { - const max = Math.sqrt(player.numTilesOwned()) * 1000 + 10000 + let max = Math.sqrt(player.numTilesOwned()) * 1000 + 10000 + max = Math.min(max, 1_000_000) let toAdd = 10 + (player.troops() + Math.sqrt(player.troops() * player.numTilesOwned())) / 250 - return Math.min(Math.min(player.troops() + toAdd, max), 1_000_0000) + return Math.min(player.troops() + toAdd, max) } }