From d08b984c1a2dd9f368beb987a732819794e38cc0 Mon Sep 17 00:00:00 2001 From: Evan Date: Sat, 15 Feb 2025 10:00:37 -0800 Subject: [PATCH] rebalance: attackers lose fewer troops, difficulties change troop increase rate --- src/core/configuration/DefaultConfig.ts | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/src/core/configuration/DefaultConfig.ts b/src/core/configuration/DefaultConfig.ts index ad21abb15..f7a8d6f1a 100644 --- a/src/core/configuration/DefaultConfig.ts +++ b/src/core/configuration/DefaultConfig.ts @@ -301,7 +301,7 @@ export class DefaultConfig implements Config { if (defender.isPlayer()) { return { attackerTroopLoss: - within(defender.troops() / attackTroops, 0.5, 2) * mag, + within(defender.troops() / attackTroops, 0.5, 2) * mag * 0.8, defenderTroopLoss: defender.troops() / defender.numTilesOwned(), tilesPerTickUsed: within(defender.troops() / (5 * attackTroops), 0.2, 1.5) * speed, @@ -407,6 +407,23 @@ export class DefaultConfig implements Config { toAdd *= 0.7; } + if (player.type() == PlayerType.FakeHuman) { + switch (this._gameConfig.difficulty) { + case Difficulty.Easy: + toAdd *= 0.9; + break; + case Difficulty.Medium: + toAdd *= 1; + break; + case Difficulty.Hard: + toAdd *= 1.2; + break; + case Difficulty.Impossible: + toAdd *= 1.5; + break; + } + } + return Math.min(player.population() + toAdd, max) - player.population(); }