mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-06-21 12:10:46 +00:00
have max of 100k troops
This commit is contained in:
@@ -71,11 +71,12 @@ export class DefaultPlayerConfig implements PlayerConfig {
|
||||
}
|
||||
|
||||
troopAdditionRate(player: Player): number {
|
||||
const max = Math.sqrt(player.numTilesOwned()) * 1000 + 10000
|
||||
let max = Math.sqrt(player.numTilesOwned()) * 1000 + 10000
|
||||
max = Math.min(max, 1_000_000)
|
||||
|
||||
let toAdd = 10 + (player.troops() + Math.sqrt(player.troops() * player.numTilesOwned())) / 250
|
||||
|
||||
return Math.min(Math.min(player.troops() + toAdd, max), 1_000_0000)
|
||||
return Math.min(player.troops() + toAdd, max)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user