adjust further

This commit is contained in:
1brucben
2025-05-29 13:24:19 +02:00
parent eda563ebc6
commit ba1d81f883
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -682,7 +682,7 @@ export class DefaultConfig implements Config {
}
troopAdjustmentRate(player: Player): number {
const maxDiff = this.maxPopulation(player) / 500;
const maxDiff = player.population() / 300;
const target = player.population() * player.targetTroopRatio();
const diff = target - player.troops();
if (Math.abs(diff) < maxDiff) {
+2 -2
View File
@@ -77,10 +77,10 @@ export class PlayerExecution implements Execution {
const popInc = this.config.populationIncreaseRate(this.player);
this.player.addWorkers(
(popInc * this.player.workers()) / this.player.totalPopulation(),
(popInc * this.player.workers()) / this.player.population(),
);
this.player.addTroops(
popInc * (1 - this.player.workers() / this.player.totalPopulation()),
popInc * (1 - this.player.workers() / this.player.population()),
);
const goldFromWorkers = this.config.goldAdditionRate(this.player);
this.player.addGold(goldFromWorkers);