update maps: remove small lakes as it breaks encirclement. More money… (#188)

… more frequent trade ships, lakes prevent encirclement, warships start
at full health
This commit is contained in:
evanpelle
2025-03-08 16:56:30 -08:00
committed by Evan
parent 3945577592
commit 64f1182631
20 changed files with 427 additions and 1021 deletions
+3 -3
View File
@@ -127,10 +127,10 @@ export class DefaultConfig implements Config {
return this._gameConfig.infiniteTroops;
}
tradeShipGold(dist: number): Gold {
return 10000 + 100 * Math.pow(dist, 1.1);
return 10000 + 150 * Math.pow(dist, 1.1);
}
tradeShipSpawnRate(): number {
return 700;
return 500;
}
unitInfo(type: UnitType): UnitInfo {
@@ -271,7 +271,7 @@ export class DefaultConfig implements Config {
return 30 * 10;
}
allianceDuration(): Tick {
return 240 * 10; // 4 minutes
return 600 * 10; // 10 minutes.
}
percentageTilesOwnedToWin(): number {
return 80;
+1 -1
View File
@@ -155,7 +155,7 @@ export class PlayerExecution implements Execution {
private isSurrounded(cluster: Set<TileRef>): boolean {
let enemyTiles = new Set<TileRef>();
for (const tr of cluster) {
if (this.mg.isOceanShore(tr) || this.mg.isOnEdgeOfMap(tr)) {
if (this.mg.isShore(tr) || this.mg.isOnEdgeOfMap(tr)) {
return false;
}
this.mg
+1 -2
View File
@@ -25,8 +25,7 @@ export class UnitImpl implements Unit {
public _owner: PlayerImpl,
private _dstPort?: Unit,
) {
// default to 60% health (or 1.2 is no health specified)
this._health = toInt((this.mg.unitInfo(_type).maxHealth ?? 2) * 0.6);
this._health = toInt(this.mg.unitInfo(_type).maxHealth ?? 1);
this._lastTile = _tile;
}
+1 -1
View File
@@ -385,7 +385,7 @@ function removeSmallIslands(map: Terrain[][]) {
function removeSmallLakes(mapName: string, map: Terrain[][]) {
const visited = new Set<string>();
const min_lake_size = 30; // Using same size threshold as islands
const min_lake_size = 200;
console.log(
`${mapName}: removing small lakes ${map.length}, ${map[0].length}`,