From ced75a635a2032b2d9e0fd9d01ff3f9417fec4f8 Mon Sep 17 00:00:00 2001 From: 1brucben <1benjbruce@gmail.com> Date: Fri, 25 Apr 2025 21:18:53 +0200 Subject: [PATCH] adjusted attack formula further. reenabled fallout nerf. --- src/core/configuration/DefaultConfig.ts | 14 +++++++------- src/core/execution/PlayerExecution.ts | 8 ++------ 2 files changed, 9 insertions(+), 13 deletions(-) diff --git a/src/core/configuration/DefaultConfig.ts b/src/core/configuration/DefaultConfig.ts index a4148e43f..5f1bace91 100644 --- a/src/core/configuration/DefaultConfig.ts +++ b/src/core/configuration/DefaultConfig.ts @@ -449,8 +449,8 @@ export class DefaultConfig implements Config { if (gm.hasFallout(tileToConquer)) { const falloutRatio = gm.numTilesWithFallout() / gm.numLandTiles(); - //mag *= this.falloutDefenseModifier(falloutRatio); - //speed *= this.falloutDefenseModifier(falloutRatio); + mag *= this.falloutDefenseModifier(falloutRatio); + speed *= this.falloutDefenseModifier(falloutRatio); } if (attacker.isPlayer() && defenderIsPlayer) { @@ -480,7 +480,7 @@ export class DefaultConfig implements Config { (defender.isTraitor() ? this.traitorDefenseDebuff() : 1), defenderTroopLoss: defenderdensity, tilesPerTickUsed: within( - 2.1 * defenderdensity ** 0.6 * adjustedRatio ** 0.8 * speed, + 5 * defenderdensity ** 0.5 * adjustedRatio ** 0.8 * speed, 8, 1000, ), @@ -538,13 +538,13 @@ export class DefaultConfig implements Config { if (playerInfo.playerType == PlayerType.FakeHuman) { switch (this._gameConfig.difficulty) { case Difficulty.Easy: - return 2_500 * (playerInfo?.nation?.strength ?? 1); + return 2_500 + 1000 * (playerInfo?.nation?.strength ?? 1); case Difficulty.Medium: return 12_000 + 2000 * (playerInfo?.nation?.strength ?? 1); case Difficulty.Hard: - return 20_000 * (playerInfo?.nation?.strength ?? 1); + return 20_000 + 4000 * (playerInfo?.nation?.strength ?? 1); case Difficulty.Impossible: - return 50_000 * (playerInfo?.nation?.strength ?? 1); + return 50_000 + 8000 * (playerInfo?.nation?.strength ?? 1); } } return this.infiniteTroops() ? 1_000_000 : 25_000; @@ -554,7 +554,7 @@ export class DefaultConfig implements Config { const maxPop = player.type() == PlayerType.Human && this.infiniteTroops() ? 1_000_000_000 - : 1 * (player.numTilesOwned() * 30 + 100000) + + : 1 * (player.numTilesOwned() * 30 + 50000) + player.units(UnitType.City).length * this.cityPopulationIncrease(); if (player.type() == PlayerType.Bot) { diff --git a/src/core/execution/PlayerExecution.ts b/src/core/execution/PlayerExecution.ts index bf6a3cd35..df86b96e6 100644 --- a/src/core/execution/PlayerExecution.ts +++ b/src/core/execution/PlayerExecution.ts @@ -80,12 +80,8 @@ export class PlayerExecution implements Execution { } const popInc = this.config.populationIncreaseRate(this.player); - this.player.addWorkers( - popInc * (1 - this.player.troops() / this.player.population()), - ); - this.player.addTroops( - (popInc * this.player.troops()) / this.player.population(), - ); + this.player.addWorkers(popInc * (1 - this.player.targetTroopRatio())); + this.player.addTroops(popInc * this.player.targetTroopRatio()); this.player.addGold(this.config.goldAdditionRate(this.player)); const adjustRate = this.config.troopAdjustmentRate(this.player); this.player.addTroops(adjustRate);