Add Storm and Spice Blow practice

Expand the interactive introduction to thirteen lessons and eleven Basic examples. Separate storm sealing, reveal and movement; compare first-turn and later-turn ranges, wraparound, exposure and shelter. Offer four spice sequences for accumulation, storm loss, later worms and first-turn worm return, with Nexus opening only after the replacement blow finishes. Reuse existing card inspection and preserve all previous lesson identities and results through version 6 migration.

Extract unchanged storm-sector, exposure, worm-protection and spice-placement calculations into a focused module shared by engine, preflight and teaching. Existing battle-wheel defaults stay intact while storm practice supplies its minimum and accessible label. No live state schema, rules interpretation, mode gate or AI strategy changes.

All 4954 offline tests, types, lint and production build pass on stable final source. Focused tests compare all 24 offered storm dials and four spice cases with actual engine actions, verify exact ignored-worm return, and exercise every saved stage and v1–v5 migration. Independent review found no material findings. Earlier broad runs passed but were invalidated by a final rules-copy clarification and migration documentation correction; final3 verifies the stable source.

Browser checks retain the earlier Fremen revival outcome after migration, restore a sealed storm and completed Nexus across refresh, verify wrap/shelter/zero movement, exercise all four spice cases and inspect the revealed worm. Mobile controls and modal fit 390px; Escape restores the trigger. Screenshot capture remains unavailable. Full faction, Fremen-ride, Advanced/expansion teaching and complete game acceptance remain open.

All 1373 rooms, 2883 seats and auxiliary rows remain unchanged; SQLite integrity and foreign keys pass. Server reused without restart. HTTP tests not repeated because HTTP, auth, persistence and state shape are unchanged.

Private evidence: 20260921-opening-phase-practice.
Verified source tree: 6bd333ec6938904b31523f8b20042e516ba55b6ac4c63973e5bb7ee74baa71fb
This commit is contained in:
Quintine committed 2026-09-21 09:24:51 +10:00
1 parent 66c41b2af5
commit b2fcef8d51
19 files changed
+450 -95

No files matched your search

+41 -7
View File
@@ -4,12 +4,46 @@
from the lobby and rules reference. It adds the previously missing guided
introduction alongside the reference's existing standalone practice wheel.
Eleven navigable lessons cover public/private table information and the phase
sequence, ordinary Nexus alliances, charity, bidding, revival, shipment budgets, movement, sealed battle plans, Traitor calls, spice
collection and joining or recovering a saved table. Nine independent Basic practice positions let a player
Thirteen navigable lessons cover public/private table information and the phase
sequence, Storm, Spice Blow, ordinary Nexus alliances, charity, bidding, revival, shipment budgets, movement, sealed battle plans, Traitor calls, spice
collection and joining or recovering a saved table. Eleven independent Basic practice positions let a player
change inputs, commit, inspect results and retry. These positions are deliberately
separate examples rather than a complete game or an authoritative live room.
## Storm and Spice Blow practice
The Storm exercise separates draft, sealed, publicly revealed and moved stages.
The first-turn example uses the printed Storm Start, 0–20 dials and sheltered
Atreides starting forces. The later Basic position starts at sector 16, combines
the learner's 1–3 with a fixed opposing three, and compares exposed forces in
Cielago South/North with rock and stronghold shelter across the sector-18 wrap.
Shared sector/exposure calculations supply the result; changing options resets
only this example. The Battle Wheel now accepts an optional minimum and slider
label; existing combat defaults remain zero and “Forces dialed slider”.
Spice Blow offers four deterministic sequences: add eight Broken Land spice to
three already there; lose the card's spice to its storm sector; resolve one later
Shai-Hulud at the previous Great Flat territory then draw Broken Land; or ignore
and set aside a first-turn worm until the completed blow shuffles it back.
The normal examples have three Emperor forces in The Great Flat. A later worm
destroys those forces and all six spice there, then the replacement blow opens.
Finishing that window opens Nexus negotiations. There are no Fremen forces or
reacting cards in these examples; interactive riding, consecutive worms and
Advanced/expansion teaching remain separate unfinished curriculum work.
`game/disaster-rules.ts` extracts the unchanged live storm-sector, territory
exposure, worm-protection and spice-placement expressions for shared teaching.
The engine and disaster preflight reuse them. No state schema or timing changes.
The lessons compute results from validated choices; they never load live rooms.
Tests compare every offered storm dial and spice scenario against real actions,
check exact first-turn worm return, preserve all eleven v5 lesson identities and
validate every saved stage. The existing v1–v4 migrations remain covered.
Authority remains the classic GF9 base rulebook, printed pp.4 and 6–7, and
November 2020 FAQ p.1 as recorded in `tests/first-storm.test.ts` and the current
engine contracts. This checkpoint changes teaching and factors calculations;
it does not claim a new rules interpretation or complete rules certification.
The examples call `reserveShipmentCost`, `quoteBattleResolution`,
`quoteSpiceCollection` and the shared board distance/occupancy helpers. Battle uses six ordinary forces, real Atreides/Guild
leaders and canonical base-deck cards. The fixed opponent's dial, leader and
@@ -96,7 +130,7 @@ Resource regressions compare ordinary claims/returns against actual engine
actions, preserve inputs, check cumulative spending and allowances, reject
impossible saves and retain all nine v4 lesson identities and prior commitments.
Final source-bound browser/check/build/preservation and review evidence belongs
to this checkpoint's private report and Git delivery. Storm/spice-blow hazards,
to this checkpoint's private report and Git delivery. Broader storm/spice-blow exceptions,
full faction/Advanced/expansion teaching and the complete curriculum remain open.
The movement position starts with five ordinary forces in Red Chasm. It compares
@@ -110,9 +144,9 @@ actual authoritative `applyAction` transitions; no live movement rule changed.
The existing wheel, keyboard controls and card inspectors remain available.
Lesson changes focus the heading; responsive columns stack on small screens.
Browser storage contains only a versioned, validated set of lesson choices under
`dune-introduction-v1`. Version 5 payloads explicitly migrate all five version 1,
seven version 2, eight version 3 and nine version 4 lesson positions to the same lesson after insertion,
preserving prior choices and committed outcomes. New resource fields start at defaults for every older version. Versions 1–3
`dune-introduction-v1`. Version 6 payloads explicitly migrate all five version 1,
seven version 2, eight version 3, nine version 4 and eleven version 5 lesson positions to the same lesson after insertion,
preserving prior choices and committed outcomes. All older versions receive fresh opening-phase defaults. Resource fields start at defaults for versions 1–4; version 5 keeps its resource history. Versions 1–3
receive alliance defaults.
Versions 1 and 2 receive bidding defaults; version 1 also receives movement/Traitor defaults. Hot updates
remount the lesson state to apply this migration. Only the player's bid/pass