mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-06-21 19:56:43 +00:00
fix adjusted population
This commit is contained in:
@@ -583,8 +583,12 @@ export class DefaultConfig implements Config {
|
||||
let toAdd =
|
||||
10 +
|
||||
(800 / max + 1 / 160) * (0.7 * player.troops() + 1.3 * player.workers());
|
||||
const adjustedPop =
|
||||
typeof player.adjustedPopulation === "function"
|
||||
? player.adjustedPopulation()
|
||||
: player.population();
|
||||
|
||||
const ratio = 1 - player.adjustedPopulation() / max;
|
||||
const ratio = 1 - adjustedPop / max;
|
||||
toAdd *= ratio;
|
||||
|
||||
if (player.type() == PlayerType.Bot) {
|
||||
|
||||
Reference in New Issue
Block a user