mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-06-21 10:53:31 +00:00
adjust further
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user