From 8800bef8394d741bad00d0732c4ff805b84d18ea Mon Sep 17 00:00:00 2001 From: evanpelle Date: Thu, 5 Sep 2024 19:51:50 -0700 Subject: [PATCH] rebalance, fix oceantile bug --- TODO.txt | 2 +- src/core/GameImpl.ts | 2 +- src/core/configuration/DefaultConfig.ts | 4 ++-- src/core/configuration/DevConfig.ts | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/TODO.txt b/TODO.txt index 365d207b6..ce34ffa0e 100644 --- a/TODO.txt +++ b/TODO.txt @@ -94,7 +94,7 @@ * send boat even if touching DONE 9/4/2024 * when attacking by boat, attack execution only starts from boat pixel DONE 9/4/2024 * Make three terrain types: Plains, highlands, mountains DONE 9/5/2024 -* more random names for game id & client id +* more random names for game id & client id DONE 9/5/2024 * Make fake humans * directed expansion * UI: win condition & popup diff --git a/src/core/GameImpl.ts b/src/core/GameImpl.ts index 832e43988..87ff0af30 100644 --- a/src/core/GameImpl.ts +++ b/src/core/GameImpl.ts @@ -70,7 +70,7 @@ class TileImpl implements Tile { return this.isLand() && this._terrain.shoreline } isOceanShore(): boolean { - return this.isShore() && this.isOcean() + return this.isShore() && this.neighbors().filter(n => n.isOcean()).length > 0 } isShorelineWater(): boolean { return this.isWater() && this._terrain.shoreline diff --git a/src/core/configuration/DefaultConfig.ts b/src/core/configuration/DefaultConfig.ts index 8340a460b..8938502fd 100644 --- a/src/core/configuration/DefaultConfig.ts +++ b/src/core/configuration/DefaultConfig.ts @@ -82,10 +82,10 @@ export class DefaultConfig implements Config { } troopAdditionRate(player: Player): number { - let max = Math.sqrt(player.numTilesOwned()) * 2000 + 10000 + 10000 + let max = Math.sqrt(player.numTilesOwned()) * 3000 + 50000 max = Math.min(max, 1_000_000) - let toAdd = 10 + (player.troops() + Math.sqrt(player.troops() * player.numTilesOwned())) / 200 + let toAdd = 10 + (player.troops() + Math.sqrt(player.troops() * player.numTilesOwned())) / 150 return Math.min(player.troops() + toAdd, max) } diff --git a/src/core/configuration/DevConfig.ts b/src/core/configuration/DevConfig.ts index aed273853..c12dbd833 100644 --- a/src/core/configuration/DevConfig.ts +++ b/src/core/configuration/DevConfig.ts @@ -16,7 +16,7 @@ export const devConfig = new class extends DefaultConfig { } numBots(): number { - return 350 + return 400 } // startTroops(playerInfo: PlayerInfo): number {