From c608d6fea62a4de507928ec60311b8c3f6678d9a Mon Sep 17 00:00:00 2001 From: Quintine <15965533+Quintine@users.noreply.github.com> Date: Thu, 29 Oct 2026 09:10:53 +1100 Subject: [PATCH] Handle advisor conversion after worm rides --- components/game-table.tsx | 7 +- docs/ADVISOR_AUTOMATIC_FLIPS.md | 21 ++++ docs/CURRENT_STATUS.md | 18 ++++ docs/RULE_DECISIONS.md | 4 + game/advisor-automatic-flip.ts | 43 +++++++- game/engine.ts | 64 ++++++++++- game/karama-context.ts | 2 + game/reference.ts | 4 + tests/advisor-worm-ride-controls.test.tsx | 78 ++++++++++++++ tests/advisor-worm-ride-flip.test.ts | 119 +++++++++++++++++++++ tests/advisor-worm-ride-quote.test.ts | 72 +++++++++++++ tests/advisors.test.ts | 6 +- tests/fixture-advisor-worm-ride-flip.ts | 67 ++++++++++++ tests/fixture-nexus-advisors.ts | 2 + tests/homeworld-spiritual-advisors.test.ts | 14 ++- 15 files changed, 507 insertions(+), 14 deletions(-) create mode 100644 tests/advisor-worm-ride-controls.test.tsx create mode 100644 tests/advisor-worm-ride-flip.test.ts create mode 100644 tests/advisor-worm-ride-quote.test.ts create mode 100644 tests/fixture-advisor-worm-ride-flip.ts diff --git a/components/game-table.tsx b/components/game-table.tsx index 64c6f74c..eb56d51b 100644 --- a/components/game-table.tsx +++ b/components/game-table.tsx @@ -2687,6 +2687,8 @@ export function GameTable({ ? `Storm casualties in sector ${g.response.automaticAdvisorFlip.storm.sector} are complete. These surviving advisors are now alone and must become fighters before the remaining storm traversal.` : g.response.automaticAdvisorFlip.producer === 'specialRelocation' ? `${g.response.automaticAdvisorFlip.relocation.kind === 'ambassador' ? 'Fremen Ambassador relocation' : 'The free Discovery force transfer'} is complete. These advisors are now alone and must become fighters before the original arrival continues.` + : g.response.automaticAdvisorFlip.producer === 'wormRide' + ? 'The worm ride and any collection are complete. These advisors are now alone and must become fighters before the original arrival continues.' : g.response.automaticAdvisorFlip.producer === 'spiritualArrival' ? 'The free Spiritual Advisor packet has arrived and its reserves and any earned income stay committed. These advisors are now alone and must become fighters before the original arrival continues.' : 'The ground movement is complete. These advisors are now alone and must become fighters.'} @@ -6439,6 +6441,9 @@ export function GameTable({ territory. Resolve protection now; Nexus and rides follow the spice blow.

+ {g.response?.automaticAdvisorFlip?.producer === 'wormRide' &&

+ Resolve the completed worm ride’s advisor conversion before summoning another worm. +

}