Merge branch 'v26'

This commit is contained in:
evanpelle
2025-11-07 19:54:27 -08:00
14 changed files with 22 additions and 417 deletions
+1 -2
View File
@@ -25,7 +25,6 @@ export async function setup(
_gameConfig: Partial<GameConfig> = {},
humans: PlayerInfo[] = [],
currentDir: string = __dirname,
ConfigClass: typeof TestConfig = TestConfig,
): Promise<Game> {
// Suppress console.debug for tests.
console.debug = () => {};
@@ -71,7 +70,7 @@ export async function setup(
randomSpawn: false,
..._gameConfig,
};
const config = new ConfigClass(
const config = new TestConfig(
serverConfig,
gameConfig,
new UserSettings(),
-23
View File
@@ -85,26 +85,3 @@ export class TestConfig extends DefaultConfig {
return 1;
}
}
export class UseRealAttackLogic extends TestConfig {
// Override to use DefaultConfig's real attackLogic
attackLogic(
gm: Game,
attackTroops: number,
attacker: Player,
defender: Player | TerraNullius,
tileToConquer: TileRef,
): {
attackerTroopLoss: number;
defenderTroopLoss: number;
tilesPerTickUsed: number;
} {
return DefaultConfig.prototype.attackLogic.call(
this,
gm,
attackTroops,
attacker,
defender,
tileToConquer,
);
}
}