Step 10L.11: CR-012 plan amendments and regression
CI / check (push) Successful in 7m27s
Details
CI / check (push) Successful in 7m27s
Details
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
264a933703
commit
f7cb312ea1
|
|
@ -1193,3 +1193,9 @@ Implementation decisions not spelled out in `memory-bank/implementation-plan.md`
|
|||
|
||||
- **The art arrived with the CR**, so both ships use real sprites rather than the placeholder. Both face nose-up on transparent backgrounds, like the existing ships.
|
||||
- **The transparency check tolerates alpha ≤ 2/255** rather than editing the user's file: `ship-lighter.png` has a stray alpha-1 pixel in one corner, which is invisible. The script never writes sources (decision 0.5.37).
|
||||
|
||||
## Step 10L.11
|
||||
|
||||
- **The Lighter-first / Clipper-first balance check waits for the balance script** (plan Step 12.1, not built yet); the amendment is recorded on Step 12.1.
|
||||
- **The manual check found a hop needs Long Haul**: every Mars→Ceres leg is over 100M km, so it needs Long Haul 1. A fresh veteran (Heavy Cargo 1, 3 unspent points) qualifies once a point goes into Long Haul. This is existing skill gating, not a range problem, but it makes the Clipper's hop to Ceres a mid-game move.
|
||||
- **Clipper fuel is expensive by design** (600 cr/M km): a ~190M km hop costs about 110,000 credits, in line with a Freighter's long runs. The check topped up credits with the developer tool. Payouts for those legs are tuned elsewhere and were not changed here.
|
||||
|
|
|
|||
|
|
@ -165,6 +165,7 @@ Record these in `DECISIONS.md` and in `implementation-plan.md` §0.5.
|
|||
- Undiscovered locations are drawn dimmed with a lock. Tapping one shows "Undiscovered — deliver here to unlock" and which ship models can currently reach it from Earth (using the sim range check over purchasable models), for example "Reachable with: Freighter, Bulk Hauler".
|
||||
- **Test:** Component test: undiscovered locations render as locked; the reachability list for Mars matches the sim range check for the mocked time; discovered locations render normally.
|
||||
- **Amended by CR-003:** the lock rendering is replaced by Step 10C.7 (desaturated, dimmed sprite with a code-drawn padlock); the tap panel is unchanged.
|
||||
- **Amended by CR-012:** The reachability text is per origin: "From Mars: Clipper, Freighter · From Earth: Freighter", one part per discovered location with an HQ or idle ship (Earth when there are none) (Step 10L.8).
|
||||
|
||||
### Step 10A.17 — Client: something waiting on return
|
||||
- If goals became ready while the player was away, list them in the "while you were away" modal with a link to claim.
|
||||
|
|
|
|||
|
|
@ -63,6 +63,7 @@ Record these in `DECISIONS.md`.
|
|||
- If a file name is ambiguous or an expected asset is missing, record it in `DECISIONS.md` and continue: missing assets use the fallback (0.5.33). If more than one file could match the same id, stop and ask the user.
|
||||
- Add a `sprite` key to each location and ship model in `packages/content` (for example Earth → `body-earth`, Freighter → `ship-freighter`). Add the optional `badge` key to Jupiter Cloud Platform.
|
||||
- **Test:** A test asserts every location and ship model in content has a sprite key, and every sprite key exists in the manifest. A second test asserts every file named in the manifest exists on disk.
|
||||
- **Amended by CR-012:** The manifest gains `ship-lighter` and `ship-clipper` (Step 10L.10; the user's art is in place).
|
||||
|
||||
### Step 10C.2 — Asset optimization script
|
||||
- Add a script (using `sharp`) that reads the manifest and writes to a generated folder:
|
||||
|
|
|
|||
|
|
@ -66,6 +66,7 @@ Record these in `DECISIONS.md` and `implementation-plan.md` §0.5.
|
|||
- Add the five upgrades from §2, and config for cost percent and shop time per level.
|
||||
- Set the Courier's `fuel-tanks` values so decision 0.5.50 holds (adjust the Courier's per-level bonus or cap, not the Courier's base range, and don't break any Step 3.7 range test).
|
||||
- **Test:** All upgrades validate. Every upgrade affects a stat that exists on ShipModel. Tests for decision 0.5.49 (all three inequalities). Tests for decision 0.5.50: sampling Earth–Mars distance monthly over two game years, a maxed Courier is in range on at least one sample and out of range on at least one sample; a Courier with fuel tanks at level 2 is never in range.
|
||||
- **Amended by CR-012:** Caps follow the amended 0.5.49/0.5.50 (this plan's 0.5.67/0.5.68): three more distinctness inequalities, Courier-to-Mars measured from Earth over 16 game years; the Courier's tanks are 450 % per level (Step 10L.5).
|
||||
|
||||
### Step 10F.2 — Sim: effective stats
|
||||
- Add a pure function that returns a ship's effective stats from its model and installed upgrade levels.
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ This plan covers the **base game only**: the core loop of taking contracts, disp
|
|||
|---|---|
|
||||
| Locations | Earth, Moon, Mars, Ceres Station (belt), Jupiter Cloud Platform |
|
||||
| Landing classes | Vacuum, Atmospheric (Hardened is deferred) |
|
||||
| Ships | 3 archetypes: Courier, Freighter, Bulk Hauler |
|
||||
| Ships | 5 models: Courier, Lighter, Clipper, Freighter, Bulk Hauler *(CR-012 added the Lighter and Clipper; it was 3 archetypes)* |
|
||||
| Cargo types | Standard, Heavy, High-Value, Dangerous |
|
||||
| Pilot skills | Long Haul, Heavy Cargo, Expensive Cargo, Dangerous Cargo |
|
||||
| Phases | Tutorial (contract pilot) → Owner-Operator → small fleet |
|
||||
|
|
@ -183,6 +183,7 @@ These answer the pre-build review. Log each one in `DECISIONS.md` as it is imple
|
|||
- **Amended by CR-004:** GameConfig gains `dutyLimitGameHours`, `longHaulDutyBonusGameHours` and `restGameHours` (Step 10D.1).
|
||||
- **Amended by CR-009:** Content gains the Upgrade schema (`upgradeSchema`, `SHIP_STATS`, per-model overrides), the five upgrades, and `upgradeLevels` cost/shop-time config (Step 10I.1).
|
||||
- **Amended by CR-010:** GameConfig's flat `pilotPayPerDelivery` is replaced by `pilotProfitShare` (0.25); content gains the veteran pilot (Step 10J.1).
|
||||
- **Amended by CR-012:** Location gains `launchRangeFactor`; ShipModel gains a `role` line and an optional own `handlingGameHoursPerTonne`; GameConfig gains `noStrandMarginGameHours` (Step 10L.1).
|
||||
|
||||
### Step 2.2 — Add the five locations
|
||||
- Add data for Earth, Moon, Mars, Ceres Station, and Jupiter Cloud Platform following the destinations table in the GDD.
|
||||
|
|
@ -197,6 +198,7 @@ These answer the pre-build review. Log each one in `DECISIONS.md` as it is imple
|
|||
- Pick numbers so that, at default config: a Courier can reach the Moon but not Mars, Ceres or Jupiter, even at their closest; a Freighter can reach Mars and Ceres; only the Bulk Hauler can reach Jupiter at its farthest distance.
|
||||
- All three ships are atmospheric (decision 0.5.1).
|
||||
- **Test:** A test validates all ships through the schema and asserts the ordering rules: Courier speed > Freighter speed > Bulk Hauler speed, Bulk Hauler capacity > Freighter > Courier, price Courier < Freighter < Bulk Hauler. (Range rules are tested in Phase 3 once distances exist.)
|
||||
- **Amended by CR-012:** The Lighter and Clipper join the lineup; these ordering tests are replaced by the CR's orderings (Step 10L.1), and the ranges are set by the reach table (Step 10L.4: Freighter 450, Bulk Hauler 1,250).
|
||||
|
||||
### Step 2.4 — Add cargo types and skills
|
||||
- Cargo types: Standard (no skill), Heavy (Heavy Cargo skill), High-Value (Expensive Cargo skill), Dangerous (Dangerous Cargo skill). Non-standard types pay more per tonne-distance.
|
||||
|
|
@ -249,6 +251,7 @@ These answer the pre-build review. Log each one in `DECISIONS.md` as it is imple
|
|||
- Add a function that decides whether a ship can fly a route at a given time, returning either "allowed" or a specific reason: out of range, or cannot land at destination (landing class).
|
||||
- **Test:** A Courier can fly Earth→Moon and Moon→Earth. A Courier is out of range for Mars at its closest. A test-only vacuum ship fixture is rejected at Earth with the cannot-land reason. At Jupiter's farthest point from Earth, only the Bulk Hauler is in range. A Freighter can reach Ceres. (These confirm the Step 2.3 number choices; adjust content if they fail.)
|
||||
- **Amended by CR-009:** Range checks use effective stats (Step 10I.2).
|
||||
- **Amended by CR-012:** The range check uses the effective range from the origin (range × the origin's `launchRangeFactor`, `rangeFrom`), and the tests name their origin; a Freighter no longer reaches Jupiter from Earth or Ceres from Earth at its farthest (Steps 10L.2, 10L.4).
|
||||
|
||||
### Step 3.8 — Contract model and payout
|
||||
- Define a Contract shape: id, origin, destination, cargo type, tier, mass, payout, required skill and level, required Long Haul level, offered-at time, expires-at time (end of its board period), first-contact flag.
|
||||
|
|
@ -282,6 +285,7 @@ These answer the pre-build review. Log each one in `DECISIONS.md` as it is imple
|
|||
- **Amended by CR-004:** Validation (contract and deadhead) gains `pilot-resting`, checked before the other pilot checks (Step 10D.3).
|
||||
- **Amended by CR-007:** Validation gains `too-slow`: a Priority contract's trip must fit its delivery window (Step 10G.4).
|
||||
- **Amended by CR-009:** Validation uses effective stats (capacity, range, Priority window) and gains `ship-in-shop` (Steps 10I.2, 10I.3).
|
||||
- **Amended by CR-012:** Validation (contract and deadhead) gains `would-strand` after range and landing: at arrival plus the no-strand margin, the ship must be able to reach another discovered location from the destination (Step 10L.3, decision 0.5.79).
|
||||
|
||||
### Step 3.13 — Dispatch record creation
|
||||
- Add a function that turns a validated dispatch into a Dispatch record: id, ship, pilot, contract (or none for reposition), origin, destination, departure real time, arrival real time (computed from travel time and clock conversion), fuel cost, expected payout, seed.
|
||||
|
|
@ -527,6 +531,7 @@ These answer the pre-build review. Log each one in `DECISIONS.md` as it is imple
|
|||
- **Test:** Component test: buy is disabled when credits are below price; buying calls the endpoint and the new ship appears in Fleet.
|
||||
- **Amended by CR-002:** Buy opens a "Deliver to which HQ?" bay picker, preselected with one bay (Step 10B.9).
|
||||
- **Amended by CR-009:** The Market lists the player's upgraded ships of each model with effective stats (Step 10I.7).
|
||||
- **Amended by CR-012:** Each model shows its role line and a Reach line computed with the sim ("From Earth now: … · Other dates: … · By hopping: …") (Step 10L.7).
|
||||
|
||||
### Step 9.9 — Locations screen
|
||||
- List all locations. Discovered ones show type, landing requirement, current distance from Earth, produces/demands, and a "Lease bay" action with price (or "Bay owned"). Undiscovered ones show only the name and "Undiscovered — deliver here to unlock."
|
||||
|
|
@ -658,6 +663,7 @@ Steps 10L.1–10L.11 are specified in `memory-bank/change-requests/CR-012-lighte
|
|||
- **Amended by CR-007:** The simulated player considers Priority contracts and skips ones its ships are too slow for. Re-check all timing targets; adjust content values, not thresholds.
|
||||
- **Amended by CR-009:** The simulated player may buy upgrades: when it can't yet afford its next planned ship, it buys the cheapest available upgrade on its most-used ship, preferring cargo bay and engines. Re-check all timing targets; adjust content values, not thresholds.
|
||||
- **Amended by CR-010:** Replace "first pilot hired between 30 and 45 minutes" with "second ship bought between 30 and 45 minutes". Add a check that the veteran flies at least one contract in the first session. Re-check all targets with profit-share pay; adjust content values, not thresholds.
|
||||
- **Amended by CR-012:** The script runs two second-ship policies, Lighter-first and Clipper-first; both must reach "own three ships" within 25 % of each other's time.
|
||||
|
||||
### Step 12.2 — Revisit the tutorial economy test
|
||||
- Replace the placeholder average in the Step 2.5 test with the average tutorial payout measured by the balance script.
|
||||
|
|
|
|||
|
|
@ -279,4 +279,6 @@ Spec: `memory-bank/change-requests/CR-012-lighter-clipper-range.md` (received as
|
|||
- [x] **Step 10L.8 — Client: reachability from where ships actually are.** An undiscovered location's map panel now reads "From Mars: Clipper, Freighter · From Earth: Freighter": one part per discovered location with an HQ or idle ship (`playerOrigins`, Earth when there are none yet), listing purchasable models in range from there now plus the player's ships there that reach it only thanks to upgrades (`reachersByOrigin` in `map/reach.ts`, replacing the Earth-only helpers). Tests: `map-reach-origins.test.tsx` (a Clipper at Mars on a date Mars→Ceres is in range: Ceres lists Clipper from Mars, not from Earth); `map-locked.test.tsx` now expects "From Earth: …" for a tutorial player.
|
||||
- [x] **Step 10L.9 — Client: stranding reason.** The dispatch sheet passes the player's discovered ids to `validateDispatch` and explains a stranding pair as "Would be stranded — can't fly out of Mars from there" (`strandedText`); the deadhead picker disables such a destination with the same text. `wouldStrand` now takes a bare model or effective stats. Test (`stranding-reason.test.tsx`, a Clipper at the Moon on a date it could hop to Mars but not leave): the pair's only problem is the stranding text; the Mars deadhead is disabled with it while Earth stays enabled.
|
||||
- [x] **Step 10L.10 — Art.** The user's `ship-lighter.png` and `ship-clipper.png` (in `public/assets/map/`) are now in the manifest; `pnpm --filter @deadhead/web map-art` wrote their @1x/@2x sprites to `map-gen` (the other outputs regenerated byte-identical). The source-transparency test allows corner alpha up to 2/255, because `ship-lighter.png` has one alpha-1 corner pixel. All manifest tests pass.
|
||||
- [ ] Step 10L.11 — Plan amendments and regression
|
||||
- [x] **Step 10L.11 — Plan amendments and regression.** CR-012 §7 applied: plan 0.2 (five models), 2.1, 2.3, 3.7, 3.12, 9.8 and 12.1 (Lighter-first and Clipper-first policies, for when the balance script exists); CR-001 10A.16, CR-003 10C.1 and CR-009 10F.1 notes (decisions 0.5.67, 0.5.68 and 0.5.25 were amended in 10L.4–10L.5). Full suite 938 passing, sim lines 99.75 %. Scripted manual check (temporary server): after the deal, buy a Clipper at Earth, crew it with the veteran, wait for a first-contact Earth→Mars job in range (62–95M km), deliver it (Mars discovered), spend the veteran's points on Long Haul, then take a first-contact Mars→Ceres job (186M km, inside 198 × 1.15) and deliver it (Ceres discovered).
|
||||
|
||||
**Phase 10L complete — waiting for review.**
|
||||
|
|
|
|||
Loading…
Reference in New Issue