Support Basic movement promises before shipment

Allow clean active Basic ground-movement questions before or after shipment. Enumerate ordinary reserve amounts, native physical allocations, destinations and pledged payment splits through the actual declaration and shared physical commit. Detached projection stops before income/arrival effects and never counts shipment as ground fulfillment. Joint movement No and shipment Yes retain a legal next action rather than invalid End guidance.

Preserve exact pending ordinary reserve and native Guild permission/rate declarations when checking the remaining route. Voluntary wrong destination, force splitting or fee loss cannot release Yes through an opponent response. Guard unsupported sources before full speculative continuation. Existing live payment, cancellation, income and entry paths remain. Persistent busy-safe controls display reinforcement and both obligations; all four existing profiles use the same legal witness without strategy refinement.

Verify 19 files165/165, types/lint/build, six original-action gameplay/control/table-rendering programmes and four profiles with16 accepted actions. Genuine sources19/37/24/19 retain classic Arrakeen10 reinforced to11, native zero-board Emperor/CHOAM starts and original Guild5/15/5 reserve/cross transport. Second-card/counter cases explicitly transfer conserved originals. Bounded review repaired source guarding, funding completeness and exact pending-frame behavior. Stop an observed expensive search, reorder complete candidates by useful proximity and conservatively prune dead-end final moves; twelve new engine cases pass in3.2s. Correct a display-template lint issue.

Earlier phases/waiting turns, native transport/relocation preparation, No-Field/module sources, broader interactions, full modes, comprehensive assurance and deployed acceptance remain open. No strategic tuning or saved-room/reset/restart/deployment operation.
This commit is contained in:
Quintine committed 2026-10-24 15:10:49 +11:00
1 parent b5a53da712
commit f0b2ac82d9
18 files changed
+637 -34

No files matched your search

+2 -1
View File
@@ -18,12 +18,13 @@ export function MovementPromises({ game, act, busy }: { game: GameView; act: (ac
: next?.type === 'card' && card?.effect === 'nullentropyBox' ? 'Pay 2 spice and search with Nullentropy Box'
: next?.type === 'card' && next.mode === 'choam' ? 'Play Kulon to extend the required movement'
: next?.type === 'card' ? 'Play Hajr to prepare the required movement'
: next?.type === 'ship' ? `Ship ${amount} forces to ${destinationLabel}, sector ${sector}, before the required movement`
: next?.type === 'endMovement' ? 'Finish movement while honoring No'
: `${next?.movementCard ? 'Use Ornithopter and move' : 'Move'} ${amount} forces to ${destinationLabel}, sector ${sector}`;
return <section className="notice space-y-3" aria-label="Your ground-movement promises">
<h4>Your ground-movement promises</h4>
{own.map((promise, index) => <p key={index}>{promise.answer ? 'Yes: you must' : 'No: you must not'} {movementClaimText(promise)} before this Movement turn ends.</p>)}
<p className="fine">One qualifying move fulfills Yes. No remains binding through every later Hajr or Ornithopter move. A paid Box search must finish before moving; its fee is paid only once. Opposing effects release an answer only if it becomes impossible.</p>
<p className="fine">One qualifying ground move fulfills Yes; a shipment can prepare that move but does not fulfill it. No remains binding through every later Hajr or Ornithopter move. A paid Box search must finish before moving; its fee is paid only once. Opposing effects release an answer only if it becomes impossible.</p>
{next && <Button className="game-action min-h-11 whitespace-normal" disabled={busy} onClick={() => { if (!busy) act(next); }}>{label}</Button>}
</section>;
}
+4 -1
View File
@@ -1,6 +1,7 @@
'use client';
import type { Action, GameView } from '@/game/engine';
import { liveShipmentPromises, matchesShipment, shipmentClaimText } from '@/game/shipment-promises';
import { liveMovementPromises } from '@/game/movement-promises';
import { truthQuestionText } from '@/game/truthtrance';
import { CHEAP_HERO_TRAITOR } from '@/game/traitors';
import { territory } from '@/game/board';
@@ -20,7 +21,8 @@ export function ShipmentPromises({
if (!promises.length) return null;
const me = g.players.find((p) => p.id === g.me)!;
const early = g.phase < 5;
const next = g.phase === 5 ? g.shipmentCompletion?.actions[0] : undefined;
const jointMovement = liveMovementPromises(g.movementPromises ?? [], g.me, g.turn).length > 0;
const next = g.phase === 5 && !jointMovement ? g.shipmentCompletion?.actions[0] : undefined;
const preparation = early ? g.shipmentPreparation?.actions[0] : undefined;
const preparationCard = preparation?.type === 'card'
? me.hand?.find(card => card.id === preparation.card) : undefined;
@@ -72,6 +74,7 @@ export function ShipmentPromises({
id="shipment-promise-guidance"
>
<h3>Your shipment promises</h3>
{jointMovement && <p>Your ground-movement promise guidance below keeps both sets of answers possible.</p>}
{early ? <p>
Your shipment opportunity is later this turn, during Shipment and
Movement. Keep your needed spice, forces and cards available to honor
+1 -1
View File
@@ -349,7 +349,7 @@ export function Truthtrance({
<>
<MovementClaimFields id={`${factId}-movement`} value={movement} onChange={setMovement} />
<p className="fine">One ground movement of the chosen physical minimum, from now until the respondent’s Movement turn ends. Shipment, HMS relocation and Ambassador relocation do not count. Owned Hajr, Ornithopter, native Kulon and paid Box recovery of a known discard can prepare a later move. No stays binding after earlier nonmatching moves.</p>
{!g.truthMovementTargets.includes(target) && <p className="notice">Choose the active Basic player after shipment and finish pending decisions. Optional-module and Advanced movement promises remain unfinished.</p>}
{!g.truthMovementTargets.includes(target) && <p className="notice">Choose the active Basic player and finish pending decisions. Optional-module and Advanced movement promises remain unfinished.</p>}
<p className="notice" aria-label="Public movement question preview">{truthQuestionText(question, leaderName, locationName)}</p>
</>
) : kind === 'shipment' || kind === 'mixedShipment' ? (