reduce transport frequency for fakehumanexecution, make transport render more efficient

This commit is contained in:
Evan
2025-04-05 17:14:56 -07:00
parent d560e90486
commit 0dbc246a63
3 changed files with 6 additions and 7 deletions
+2 -3
View File
@@ -500,14 +500,14 @@ export class UnitLayer implements Layer {
// Clear previous area
for (const t of this.game.bfs(
unit.lastTile(),
manhattanDistFN(unit.lastTile(), 3),
manhattanDistFN(unit.lastTile(), 2),
)) {
this.clearCell(this.game.x(t), this.game.y(t));
}
if (unit.isActive()) {
// Paint trail
for (const t of trail.slice(-4)) {
for (const t of trail.slice(-1)) {
this.paintCell(
this.game.x(t),
this.game.y(t),
@@ -531,7 +531,6 @@ export class UnitLayer implements Layer {
);
}
// Paint territory
for (const t of this.game.bfs(
unit.tile(),
manhattanDistFN(unit.tile(), 1),
+1 -1
View File
@@ -41,7 +41,7 @@ export class DevConfig extends DefaultConfig {
}
numSpawnPhaseTurns(): number {
return this.gameConfig().gameType == GameType.Singleplayer ? 40 : 100;
return this.gameConfig().gameType == GameType.Singleplayer ? 70 : 100;
// return 100
}
+3 -3
View File
@@ -150,12 +150,12 @@ export class FakeHumanExecution implements Execution {
);
if (enemyborder.length == 0) {
if (this.random.chance(5)) {
if (this.random.chance(10)) {
this.sendBoatRandomly();
}
return;
}
if (this.random.chance(10)) {
if (this.random.chance(20)) {
this.sendBoatRandomly();
return;
}
@@ -513,7 +513,7 @@ export class FakeHumanExecution implements Execution {
const src = this.random.randElement(oceanShore);
const dst = this.randOceanShoreTile(src, 250);
const dst = this.randOceanShoreTile(src, 150);
if (dst == null) {
return;
}