Prototype Sapho first after completed movement turns
Allow a physical Sapho holder to go first among remaining unstarted combined shipment/movement turns after earlier players have fully finished. Preserve completed resources, cards, counters and physical order. Keep Advanced Guild priority guarded until Guild leaves the remaining queue. Reuse private controls, all four AI profiles and the existing action/CAS continuation. Add four engine regressions and one independently authored SQLite recovery race; upgrade the existing Sapho Advanced engine fixture to genuine Advanced setup. Update player guidance and the rules decision register. Record the fourteen Leader Skill cards and lifecycle as sourced future work, with unresolved edges. No mode or publication gates are opened. Validation: check (types, lint, 4,369 offline tests) and build passed. All 35 focused Sapho tests passed; independent engine/persistence review found no blocker. One initial focused Advanced test omitted the existing Guild shipment approval; it was corrected to resolve that real decision before ending the turn. No HTTP/auth/schema change; the HTTP suite was not repeated for this checkpoint. Following the reported power outage, the existing localhost server was healthy, SQLite integrity/foreign-key checks passed, and the saved QA seat restored the same private hand, forces, resources and pending Storm decision after refresh. All 291 opening room versions/state hashes and all application seat/recovery/ entry/handover records match the fresh backup. Cloudflare internal metadata changed; application data did not. No restart or database reset was needed. Source fingerprint: de0e0e52ef7b6888792a6e2ec5e8c4745da446ece843bf3092320e915d621266 Private report: /home/quintine/.local/share/dune/checkpoints/20260913-sapho-completed-boundary-checks/report.json Private backup/comparison: /home/quintine/.local/share/dune/checkpoints/20260913-outage-sapho-before/ Check duration 146645 ms; build 6753 ms. Reported aggregate goal counter at this milestone opening was 65037986 and before Git was 65524147 (486161 difference, including outage recovery, parallel source research and coordination; not a billing measurement or a savings claim).
This commit is contained in:
1 parent
7dfd6b3048
commit
369371671f
10 files changed
+670
-25
No files matched your search
+17
-12
@@ -10726,6 +10726,17 @@ function saphoCleanWindow(g: Game) {
|
||||
!g.currentAuctionSale
|
||||
);
|
||||
}
|
||||
function saphoMovementStarted(g: Game, p: Player): boolean {
|
||||
// A paid/reserved movement preparation also starts the combined turn.
|
||||
return !!(
|
||||
p.shipped ||
|
||||
p.moved > 0 ||
|
||||
g.hajr.includes(p.id) ||
|
||||
g.karamaShipping ||
|
||||
g.ornithopter ||
|
||||
(g.choamMovement?.turn === g.turn && p.faction === 'choam')
|
||||
);
|
||||
}
|
||||
function saphoMovementQueue(g: Game): OrderedOpportunity | null {
|
||||
let remaining = g.movementRemaining;
|
||||
if (
|
||||
@@ -10743,21 +10754,13 @@ function saphoMovementQueue(g: Game): OrderedOpportunity | null {
|
||||
return null;
|
||||
remaining = [g.active, ...remaining.filter((id) => id !== g.active)];
|
||||
}
|
||||
// A paid/reserved movement preparation also starts the combined turn.
|
||||
const started =
|
||||
active.shipped ||
|
||||
active.moved > 0 ||
|
||||
g.hajr.includes(active.id) ||
|
||||
!!g.karamaShipping ||
|
||||
!!g.ornithopter ||
|
||||
(g.choamMovement?.turn === g.turn && active.faction === 'choam');
|
||||
const state: OrderedOpportunity = {
|
||||
event: `movement:${g.turn}`,
|
||||
eligible: g.order,
|
||||
completed: g.order.filter((id) => !remaining.includes(id)),
|
||||
remaining,
|
||||
current: g.active,
|
||||
currentStarted: !!started,
|
||||
currentStarted: saphoMovementStarted(g, active),
|
||||
protectedLast: g.saphoMovementLast?.player ?? null,
|
||||
};
|
||||
validateOrderedOpportunity(state);
|
||||
@@ -10800,9 +10803,11 @@ function saphoOptions(g: Game, p: Player): SaphoOption[] {
|
||||
!g.saphoMovementLast
|
||||
) {
|
||||
if (
|
||||
!queue.completed.length &&
|
||||
!g.players.some((other) => other.shipped || other.moved > 0) &&
|
||||
!(g.advanced && byFaction(g, 'guild')) &&
|
||||
!queue.remaining.some((id) => saphoMovementStarted(g, getPlayer(g, id))) &&
|
||||
!(
|
||||
g.advanced &&
|
||||
queue.remaining.some((id) => getPlayer(g, id).faction === 'guild')
|
||||
) &&
|
||||
queue.current !== p.id
|
||||
)
|
||||
options.push({ scope: 'movement', event: queue.event, mode: 'first' });
|
||||
|
||||
Reference in new issue
Block a user