mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-06-30 19:43:37 +00:00
make NPCs less likely build boat
This commit is contained in:
@@ -171,6 +171,9 @@ export class FakeHumanExecution implements Execution {
|
||||
}
|
||||
|
||||
private maybeSpawnWarship(shipType: UnitType.Destroyer | UnitType.Battleship): boolean {
|
||||
if (!this.random.chance(10)) {
|
||||
return false
|
||||
}
|
||||
const ports = this.player.units(UnitType.Port)
|
||||
const ships = this.player.units(shipType)
|
||||
if (ports.length > 0 && ships.length == 0 && this.player.gold() > this.cost(shipType)) {
|
||||
|
||||
Reference in New Issue
Block a user