make NPCs less likely build boat

This commit is contained in:
Evan
2024-12-21 13:24:29 -08:00
parent 41e9087f8b
commit 2e2eea82e9
2 changed files with 9 additions and 3 deletions
+6 -3
View File
@@ -256,10 +256,13 @@
* make attack bonus based on current attack size DONE 12/20/2024
* bug: ips are not stored DONE 12/20/2024
* highlight player spawn DONE 12/21/2024
* show players joined username in private lobby
* make bots less likely to build ships
* troop density affects attack bonus
* make bots less likely to build ships DONE 12/21/2024
* bugix: wait for css to load on front page
-- v0.13.0 release
* show players joined username in private lobby
* troop density affects attack bonus
* bug: NPCs don't have money
* right click brings up player info menu
* seperate server config from client config
+3
View File
@@ -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)) {