fix live sortie turn lifecycle parity

This commit is contained in:
2026-07-26 23:33:26 +00:00
parent fc019a786c
commit 740c4bb1db
8 changed files with 103 additions and 44 deletions
+5 -1
View File
@@ -230,11 +230,13 @@ describe('war triggers', () => {
const crewType = new WarCrewType(buildUnitSet().crewTypes![0]!);
const nation = buildNation();
const city = buildCity();
const attackerGeneral = buildGeneral(80);
attackerGeneral.turnTime = new Date('2026-07-26T13:38:45.000Z');
const attacker = new WarUnitGeneral(
rng,
config,
buildGeneral(80),
attackerGeneral,
city,
nation,
true,
@@ -255,6 +257,8 @@ describe('war triggers', () => {
attacker.setOppose(defender);
defender.setOppose(attacker);
expect(attackerGeneral.recentWarTime?.toISOString()).toBe('2026-07-26T13:38:45.000Z');
expect(attackerGeneral.meta.recent_war_phase).toBe(0);
attacker.beginPhase();