From 1059cc1682a9e8db3be626f54e43174584db45de Mon Sep 17 00:00:00 2001 From: Quintine <15965533+Quintine@users.noreply.github.com> Date: Tue, 27 Oct 2026 21:27:07 +1100 Subject: [PATCH] Support sector-specific Truthtrance movement --- components/mixed-movement-fields.tsx | 15 ++- components/movement-claim-fields.tsx | 13 +- components/movement-expression-fields.tsx | 18 ++- components/travel-claim-fields.tsx | 15 ++- components/turn-action-fields.tsx | 11 +- docs/CURRENT_STATUS.md | 8 ++ docs/IMPLEMENTATION_STATUS.md | 9 ++ docs/RULE_DECISIONS.md | 9 ++ docs/TRUTHTRANCE_MOVEMENT_PROMISES.md | 22 ++++ game/engine.ts | 25 ++-- game/movement-expression-promises.ts | 103 +++++++++++++--- game/movement-promise-search.ts | 16 ++- game/movement-promises.ts | 13 +- game/reference.ts | 4 +- game/travel-expression-promises.ts | 83 ++++++++++--- game/truthtrance.ts | 7 +- game/turn-action-promises.ts | 84 +++++++++---- tests/fixture-truth-movement-sector.ts | 79 ++++++++++++ tests/movement-sector-controls.test.tsx | 91 ++++++++++++++ tests/movement-sector-expression.test.ts | 126 ++++++++++++++++++++ tests/movement-sector-promises.test.ts | 78 ++++++++++++ tests/travel-movement-sector.test.ts | 82 +++++++++++++ tests/truth-movement-sector-runtime.test.ts | 121 +++++++++++++++++++ tests/turn-action-movement-sector.test.ts | 84 +++++++++++++ 24 files changed, 1016 insertions(+), 100 deletions(-) create mode 100644 tests/fixture-truth-movement-sector.ts create mode 100644 tests/movement-sector-controls.test.tsx create mode 100644 tests/movement-sector-expression.test.ts create mode 100644 tests/movement-sector-promises.test.ts create mode 100644 tests/travel-movement-sector.test.ts create mode 100644 tests/truth-movement-sector-runtime.test.ts create mode 100644 tests/turn-action-movement-sector.test.ts diff --git a/components/mixed-movement-fields.tsx b/components/mixed-movement-fields.tsx index 65b2788f..a6f85313 100644 --- a/components/mixed-movement-fields.tsx +++ b/components/mixed-movement-fields.tsx @@ -15,7 +15,7 @@ const config: MixedActionConfig = { actionLabel: 'ground-movement condition', actionTiming: 'Future ground move · this turn', actionHelp: <>Each movement condition needs one actual future ground move after the answer, before your Movement turn ends this round. - Smaller moves never add together. Prior moves and shipments do not count. The claim grants no extra movement opportunity., + You may name an exact sector. Smaller moves never add together. Prior moves and shipments do not count. The claim grants no extra movement opportunity., fallbackError: 'Choose a current fact and a future ground-movement condition.', maxLeaves: MOVEMENT_EXPRESSION_MAX_LEAVES, maxDepth: MOVEMENT_EXPRESSION_MAX_DEPTH, @@ -25,10 +25,21 @@ const config: MixedActionConfig = { + + Ground-movement condition + + node.kind === 'move' - ? { ...node, territory: 'carthag', minimum: 1 } + ? { kind: 'move', territory: 'carthag', minimum: 1 } : { ...node, terms: node.terms.map(structuralDraft) }; const inputSize = (node: MovementExpression): { leaves: number; depth: number } => { if (node.kind === 'move') return { leaves: 1, depth: 0 }; @@ -49,10 +50,21 @@ export function MovementExpressionFields({ value, territories, disabled, onChang + +

App input limits: {MOVEMENT_EXPRESSION_MAX_LEAVES} conditions and {MOVEMENT_EXPRESSION_MAX_DEPTH} levels of grouping. Groups do not count as conditions. These are input limits, not additional printed rules.

diff --git a/components/travel-claim-fields.tsx b/components/travel-claim-fields.tsx index fa739809..1dbdd538 100644 --- a/components/travel-claim-fields.tsx +++ b/components/travel-claim-fields.tsx @@ -15,7 +15,7 @@ const config: MixedActionConfig = { actionTiming: 'Future shipment or ground move · this turn', actionHelp: <>Shipment conditions concern your single future original reserve shipment after the answer. Choose any sector or one exact printed sector in that territory; only that sector satisfies an exact condition. - Ground-movement conditions concern one actual future ground move before your Movement turn ends this round. + Ground-movement conditions concern one actual future ground move before your Movement turn ends this round; its sector may also be named. Count physical forces in one action; smaller moves never add together. Earlier actions do not count. OR keeps legal shipment and movement alternatives available. No makes the whole expression false. Original costs, movement rights, cards and preparation still apply; this claim grants no extra shipment or movement., @@ -29,8 +29,8 @@ const config: MixedActionConfig = { - {value.kind === 'ship' && (() => { + {(value.kind === 'ship' || value.kind === 'move') && (() => { const printed = TERRITORIES.find(destination => destination.id === value.territory); return <> - + - {value.kind === 'ship' && (() => { + {(value.kind === 'ship' || value.kind === 'move') && (() => { const printed = TERRITORIES.find(destination => destination.id === value.territory); return <> - +