mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-06-21 14:00:54 +00:00
reduce transport frequency for fakehumanexecution, make transport render more efficient
This commit is contained in:
@@ -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),
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user