Connect bounded Diplomat retreat and record live deployment

This commit is contained in:
Quintine committed 2026-09-28 09:18:36 +10:00
1 parent 4801ce003b
commit c9a3625ff2
18 files changed
+601 -28

No files matched your search

+14
View File
@@ -1547,6 +1547,20 @@ function policyActions(g: GameView): Action[] {
stronghold,
}));
}
if (d.kind === 'diplomatRetreat') {
const destination = d.destinations[0];
let choice = destination?.choices[0];
for (const candidate of destination?.choices ?? [])
if (!choice || candidate.normal + candidate.elite > choice.normal + choice.elite)
choice = candidate;
return [{
type: 'decision',
event: d.event,
destination: destination && choice ? destination.location : null,
normal: choice?.normal ?? 0,
elite: choice?.elite ?? 0,
}];
}
if (d.kind === 'diplomatDefense') {
const battle = g.battle;
const opponent = battle