mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-06-27 12:24:16 +00:00
further calibration to nukes and population
This commit is contained in:
@@ -569,7 +569,7 @@ export class DefaultConfig implements Config {
|
||||
player.units(UnitType.City).length * this.cityPopulationIncrease();
|
||||
|
||||
if (player.type() == PlayerType.Bot) {
|
||||
return maxPop / 2;
|
||||
return maxPop / 3;
|
||||
}
|
||||
|
||||
if (player.type() == PlayerType.Human) {
|
||||
@@ -651,7 +651,7 @@ export class DefaultConfig implements Config {
|
||||
}
|
||||
|
||||
troopAdjustmentRate(player: Player): number {
|
||||
const maxDiff = this.maxPopulation(player) / 1000;
|
||||
const maxDiff = this.maxPopulation(player) / 500;
|
||||
const target = player.population() * player.targetTroopRatio();
|
||||
const diff = target - player.troops();
|
||||
if (Math.abs(diff) < maxDiff) {
|
||||
@@ -682,7 +682,7 @@ export class DefaultConfig implements Config {
|
||||
|
||||
// Humans can be population, soldiers attacking, soldiers in boat etc.
|
||||
nukeDeathFactor(humans: number, tilesOwned: number): number {
|
||||
return humans / Math.max(1, tilesOwned);
|
||||
return humans / Math.max(2, tilesOwned);
|
||||
}
|
||||
|
||||
structureMinDist(): number {
|
||||
|
||||
@@ -80,8 +80,12 @@ export class PlayerExecution implements Execution {
|
||||
}
|
||||
|
||||
const popInc = this.config.populationIncreaseRate(this.player);
|
||||
this.player.addWorkers(popInc * (1 - this.player.targetTroopRatio()));
|
||||
this.player.addTroops(popInc * this.player.targetTroopRatio());
|
||||
this.player.addWorkers(
|
||||
popInc * (1 - this.player.troops() / this.player.population()),
|
||||
);
|
||||
this.player.addTroops(
|
||||
(popInc * this.player.troops()) / this.player.population(),
|
||||
);
|
||||
this.player.addGold(this.config.goldAdditionRate(this.player));
|
||||
const adjustRate = this.config.troopAdjustmentRate(this.player);
|
||||
this.player.addTroops(adjustRate);
|
||||
|
||||
Reference in New Issue
Block a user