Announce leaderless Basic battle plans
Verify and publish checkpoint container / container (push) Successful in 10m50s

This commit is contained in:
Quintine committed 2026-10-29 06:52:13 +11:00
1 parent 3f4925e6e1
commit 2bac45b294
6 files changed
+221 -3

No files matched your search

+6 -2
View File
@@ -983,6 +983,8 @@ export type Battle = {
attacker: string;
defender: string;
plans: Record<string, Plan>;
/** Basic declarations recorded only when a new leaderless plan is sealed. */
basicLeaderlessAnnouncements?: string[];
revealed: boolean;
traitorCalls: Record<string, boolean>;
traitorDecisionPromises?: TraitorDecisionPromise[];
@@ -47147,8 +47149,10 @@ function applyActionInner(
'Wait for the plan requested by special prescience.',
);
b.plans[id] = validatePlan(g, p, action);
if (g.advanced && b.plans[id].leader === null)
if (b.plans[id].leader === null) {
if (!g.advanced) (b.basicLeaderlessAnnouncements ??= []).push(id);
log(g, `${p.name} announced a Battle Plan without a leader or Cheap Hero; no battle cards can be played.`);
}
if (b.fullPlan?.target === id) {
recordFullPlanInspection(g, b.fullPlan.owner);
}
@@ -49029,7 +49033,7 @@ export function viewGame(state: Game, id: string, now?: number) {
submitted: Object.keys(b.plans),
leaderless: g.advanced
? Object.keys(b.plans).filter(playerId => b.plans[playerId].leader === null)
: [],
: (b.basicLeaderlessAnnouncements ?? []).filter(playerId => b.plans[playerId]?.leader === null),
plans: b.revealed
? b.plans
: b.plans[id]