Add Charity and Revival resource practice
Expand the internal introduction to eleven lessons and nine independent Basic exercises. Charity shows the ordinary top-up to two spice and prevents duplicate claims. Revival lets Atreides, Emperor and Fremen return ordinary forces in batches and revive an eligible leader using the same spice balance. Reuse production charity and revival calculations; only narrow the leader-options TypeScript signature, with no live rules or AI strategy changes. Version 5 practice saves retain all earlier lesson identities and accepted choices. Replay a bounded, validated history to reconstruct spice, Tanks, reserves, leader custody and turn allowances. Cover first-cycle, surviving-leader and repeat-death rosters, cumulative free allowances, paid returns, the three-force cap, separate leader allowance and unaffordable choices. Seven new tests compare real engine actions, immutable inputs, migration and impossible-save rejection. Independent review found no material issues. Types, lint, 4941 offline tests and production build passed on stable final source. Browser checks confirm previous alliance migration, keyboard Charity, shared revival spending, refreshed force/leader outcomes, roster restrictions, faction free rates, cap rejection and leader inspection. At390px all observed new controls fit, with 44px or taller targets. Screenshot capture remains unavailable; DOM bounds are narrower evidence. The full curriculum, faction/expansion teaching and rules/publication gates remain incomplete. Reused the running server. A stale development import for the newly-created file cleared through import-graph invalidation and reload without restarting. All 1337 rooms, 2805 seats and existing recovery, entry, handover, delegation and migration rows remain unchanged. SQLite integrity and foreign keys pass. No database migration/reset, automation, usage check or AI calibration. HTTP/auth/persistence source is unchanged; the required offline suite includes recovery checks and no broad HTTP suite was rerun. Private evidence: 20260921-resource-practice. Verified source tree: 40e207a5d46f53501a9ec8f77a8b48a5e4f0b3d67278bf670b1e53050770a40b
This commit is contained in:
1 parent
c4ff75a56d
commit
67e429e32f
16 files changed
+848
-56
No files matched your search
+13
-10
@@ -8,6 +8,7 @@ import { PHASES } from '@/game/catalog';
|
||||
import { MovementLesson, TraitorLesson } from './introduction-practice';
|
||||
import { BiddingLesson } from './introduction-bidding';
|
||||
import { AllianceLesson } from './introduction-alliance';
|
||||
import { CharityLesson, RevivalLesson } from './introduction-resources';
|
||||
import {
|
||||
INTRODUCTION_CARDS, INTRODUCTION_LEADERS, INTRODUCTION_STEPS, INTRODUCTION_STORAGE_KEY,
|
||||
introductionBattle, introductionCollection, introductionShipment, newIntroduction, restoreIntroduction,
|
||||
@@ -25,11 +26,11 @@ export function Introduction() {
|
||||
<header className={styles.header}>
|
||||
<Link href="/">← Return to Arrakis</Link>
|
||||
<p className="eyebrow">LEARN TO PLAY · BASIC GAME</p>
|
||||
<h1>A first turn on Arrakis</h1>
|
||||
<p>Practice alliances, bidding, shipping, movement, battle plans, Traitor calls and collection, then take a seat at a real table. These are separate examples; they do not change any saved game.</p>
|
||||
<h1>Your first steps on Arrakis</h1>
|
||||
<p>Practice the Basic phases, from alliances and resources to bidding, movement, battle and collection, then take a seat at a real table. These are separate examples; they do not change any saved game.</p>
|
||||
</header>
|
||||
{/* Remount on schema changes so a development hot update also migrates old state. */}
|
||||
{hydrated ? <IntroductionLessons key="v4" /> : <output>Restoring your lesson…</output>}
|
||||
{hydrated ? <IntroductionLessons key="v5" /> : <output>Restoring your lesson…</output>}
|
||||
</main>;
|
||||
}
|
||||
|
||||
@@ -78,8 +79,10 @@ function IntroductionLessons() {
|
||||
<p>The table tells you who must act. Your decisions can wait while another player seals a plan or answers a power. Automatic effects show in the chronicle.</p>
|
||||
</>}
|
||||
{state.step === 1 && <AllianceLesson state={state} update={update} />}
|
||||
{state.step === 2 && <BiddingLesson state={state} update={update} />}
|
||||
{state.step === 3 && <>
|
||||
{state.step === 2 && <CharityLesson state={state} update={update} />}
|
||||
{state.step === 3 && <BiddingLesson state={state} update={update} />}
|
||||
{state.step === 4 && <RevivalLesson state={state} update={update} />}
|
||||
{state.step === 5 && <>
|
||||
<p>You have <strong>8 spice</strong> and six available reserve forces. Ship from reserves before moving on the board. This example has no discount, storm, occupancy restriction or reacting faction power.</p>
|
||||
<div className={styles.columns}>
|
||||
<div className={styles.controls}>
|
||||
@@ -103,8 +106,8 @@ function IntroductionLessons() {
|
||||
</div>
|
||||
<p className="fine">Ordinary movement reaches an adjacent territory. Ornithopters and faction powers can extend its range. Inspect the live destination guide before committing.</p>
|
||||
</>}
|
||||
{state.step === 4 && <MovementLesson state={state} update={update} />}
|
||||
{state.step === 5 && <>
|
||||
{state.step === 6 && <MovementLesson state={state} update={update} />}
|
||||
{state.step === 7 && <>
|
||||
<p>A separate battle: you are the aggressor in Wind Pass with six ordinary forces and {INTRODUCTION_LEADERS.you.name}, strength {INTRODUCTION_LEADERS.you.strength}. Your opponent also has six forces. Neither side calls a Traitor or uses a faction power in this example.</p>
|
||||
<div className={styles.columns}>
|
||||
<div className={styles.controls}>
|
||||
@@ -132,8 +135,8 @@ function IntroductionLessons() {
|
||||
</div>
|
||||
</div>
|
||||
</>}
|
||||
{state.step === 6 && <TraitorLesson state={state} update={update} />}
|
||||
{state.step === 7 && <>
|
||||
{state.step === 8 && <TraitorLesson state={state} update={update} />}
|
||||
{state.step === 9 && <>
|
||||
<p>A fresh position has 8 spice in Wind Pass, sector 14. You have surviving forces in that same sector, outside the storm. Collection uses the forces still on the board after battles.</p>
|
||||
<div className={styles.columns}>
|
||||
<div className={styles.controls}>
|
||||
@@ -149,7 +152,7 @@ function IntroductionLessons() {
|
||||
</div>
|
||||
</div>
|
||||
</>}
|
||||
{state.step === 8 && <>
|
||||
{state.step === 10 && <>
|
||||
<p>You can revisit any example. This introduction covers ordinary alliances, bidding, core resources, movement and battle choices; it does not teach every faction, card, alliance power, storm exception or expansion.</p>
|
||||
<ul>
|
||||
<li>Create a private room, choose a faction, and add friends or AI players. Share the room invitation.</li>
|
||||
|
||||
Reference in new issue
Block a user