Open native advisor preparation before the first shipment

Allow Advanced BG preparation in phases2–5 at quiet boundaries, preserving
original phase/auction/readiness and native eligibility. Close a current-turn
receipt only on committed shipments, including marker and Sneak Attack entry.
Retain the legacy phase5 queue and qualify the per-territory prevention policy.
Connect persistent controls, minimal bot support and focused native evidence.
Complete modes and browser/deployed acceptance remain open.
This commit is contained in:
Quintine committed 2026-10-24 18:36:55 +11:00
1 parent 0e3d6a250e
commit 660b0a0c25
18 files changed
+1269 -13

No files matched your search

+6 -2
View File
@@ -28,8 +28,9 @@ type Context = Pick<
| 'spiceDeck'
| 'spiceDiscard'
| 'homeworlds'
| 'advisorPreparation'
>;
type AdvisorContext = BoardContext & { turn: number };
type AdvisorContext = BoardContext & { turn: number } & Pick<Game, 'advisorPreparation'>;
const whole = (n: unknown): n is number =>
Number.isSafeInteger(n) && Number(n) >= 0;
function boardSeats(g: BoardContext, released: AdvisorRelease[]): BoardSeat[] {
@@ -95,7 +96,10 @@ export function quoteAdvisorBattleOffer(g: AdvisorContext) {
b.territory === t && (b.attacker === bg.id || b.defender === bg.id || b.coalition?.includes(bg.id)),
);
});
return { released: board.released, owner: bg.id, territories };
const window = g.advisorPreparation?.turn === g.turn ? g.advisorPreparation : undefined;
return { released: board.released, owner: bg.id,
territories: window?.firstShipment ? [] : territories.filter(t => !window?.deniedTerritories.includes(t)) };
} catch (error) {
if (error instanceof MovementPhaseQuoteError) throw error;
throw new MovementPhaseQuoteError(