summaryrefslogtreecommitdiff
path: root/PLAN.md
diff options
context:
space:
mode:
authorJoel Klinghed <the_jk@spawned.biz>2026-11-17 23:12:38 +0100
committerJoel Klinghed <the_jk@spawned.biz>2026-11-17 23:12:38 +0100
commitd64cf3514e5ff1ddb1c7f3ddac9a769db3e7dde0 (patch)
tree781ec9f63220f3c15b309658e9b32ad7d9c70b3a /PLAN.md
parent94e2850fb73005f3fb30af8489905e5cdfb6fac5 (diff)
Phase 5: campaign meta, notes, special rules (M5)
Web: - Note rows: create/edit menu (text, 12-swatch palette, player/monster link with per-standee selection, delete) with the reference's create-vs-edit commit semantics; row rendering with target-derived gradient colour, link indent + connector, standee N:/All: prefixes, tap-to-edit; whole-list drag-to-reorder (reorderList); quick per-figure note (setFigureNote) from the status menu - Special monsters: Ice Wraith "Switch Form" (deck == "Ice Wraith" gate), summon mark toggle (round-green/summon standee artwork, standee-nr badges, per-owner grayscale), character summon boxes + AddSummonMenu (class summons gated by level and standee cap, item summons from summons.json) - Ally deck show/hide in the main menu (shouldShowAlliesDeck gate); settings "clear unlocked" + Special Unlocks menu - AddSectionMenu parity: search filter, findNrFromScenarioName numeric ordering, added sections greyed + no-op, #Random Dungeon label - gameData.ts: SummonModel, ClassData.summons, summons() fetch Server: - unlock_special_command_test (last command without a test; ally-deck hide and remove-sanctuary were already covered) PLAN.md: Phase 5 boxes checked, M5 progress-log entry
Diffstat (limited to 'PLAN.md')
-rw-r--r--PLAN.md13
1 files changed, 7 insertions, 6 deletions
diff --git a/PLAN.md b/PLAN.md
index a6ff1fb..2279a79 100644
--- a/PLAN.md
+++ b/PLAN.md
@@ -270,14 +270,14 @@ changes, room sections, spectator view. *First end-to-end moment.*
### Phase 5 — Campaign meta, notes, special rules
-- [ ] Note rows: add/remove, text/color/link editing, reorder
-- [ ] Special scenario rules: timed spawns, battle goals, initial scenario message
-- [ ] Campaign meta: Crimson Scales party cards, faction cards, sanctuary donations
-- [ ] Special monster handling: Ice Wraith form change, Bad Omen, Corrosive Spew,
+- [x] Note rows: add/remove, text/color/link editing, reorder
+- [x] Special scenario rules: timed spawns, battle goals, initial scenario message
+- [x] Campaign meta: Crimson Scales party cards, faction cards, sanctuary donations
+- [x] Special monster handling: Ice Wraith form change, Bad Omen, Corrosive Spew,
standee tracking, summons
-- [ ] Solo mode, ally deck (OG Gloom), auto-level adjustment, difficulty variants,
+- [x] Solo mode, ally deck (OG Gloom), auto-level adjustment, difficulty variants,
unlock-special
-- [ ] Remaining commands in the registry + ported tests; server feature list cross-checked
+- [x] Remaining commands in the registry + ported tests; server feature list cross-checked
against the reference app
**Milestone M5** — full game feature set.
@@ -331,6 +331,7 @@ changes, room sections, spectator view. *First end-to-end moment.*
| 2026-11-12 | **Phase 2 complete / M2 reached** — networking, sessions, and server-gated secrets over WebSocket, no UI. New `server/lib/net/`: `protocol.dart` (JSON wire protocol, v1: `hello`/`welcome`/`update`/`seats`/`error`/`pong` + `claim`/`cmd`/`undo`/`redo`/`ping`), `sessions.dart` (32-hex session ids; role derived from seat ownership; `resolve()` adopts a well-formed cookie id so a browser keeps its seat across restarts), `seat_store.dart` (seat table in `saves/seats.json`, next to the state snapshot), `visibility.dart` (per-connection state serialization; the initiative rule masks every non-owned character's initiative to `null` until the round is drawn — **the server never sends a secret to a non-owner**), `game_server.dart` (the command execution path: role check → game-rule guard → registry build → execute → per-connection `update` broadcast; seat assign/claim/release + `seats` broadcasts; heartbeat sweep), `ws_upgrade.dart` (custom upgrade handler so the server can read the `x-haven-session` cookie — `shelf_web_socket` hides the `Request`), `app.dart` (shelf composition). `bin/main.dart` wires it together. Notable decisions: a server-side `_guard` replaces the reference app's 300 ms draw-button lockout (sequential execution makes a duplicate draw deterministically lose, the loser gets a clear `error`); the session that adds a character owns it and becomes a player; spectators may only `claim`/`addCharacter`; the command index resets to −1 on restart (the snapshot carries state, not undo history); dead-connection sweep defaults 20 s / 90 s. **Persistence bug found & fixed by the kill −9 test:** both file stores did fire-and-forget async `writeAsString`, so a write could land after the reboot's read — made `FileSaveStore.write`/`FileSeatStore.write` synchronous (`writeAsStringSync`) so "written through on every change" is actually on disk when `write` returns. Tests: **34 new network tests** (sessions 9, visibility 5, app 9, multiplayer 9, persistence 2) using a real WS stack on an ephemeral port — secret initiative never reaches non-owners, reveal on draw, reconnect resync, rejected duplicate draw, claim/lose/re-claim seat, undo/redo broadcast to every screen, dead-connection cleanup with seat release, snapshot + seat file restored across a restart. Full suite **591 tests green**; `dart analyze` warning-free; web typecheck/tests/build unaffected (Phase 2 is server-only). |
| 2026-11-15 | **Phase 3 complete / M3 reached** — the web UI core loop: theme tokens + the three style themes, TopBar/MainList/BottomBar layout, character/monster/note rows, the secret-initiative widget (server-masked `null` → `??`), all figure menus (scenario, characters, level, stats, conditions, elements, turn done), room sections, player/spectator input gating, connection banner, English i18n, client tests (connection, protocol, state, level values). |
| 2026-11-16 | **Phase 4 complete / M4 reached** — full card play in the browser. Client: the line renderer + in-game translations (`$lib/game/line/`, `gameI18n.ts`), card components (stat / monster-ability / modifier / loot, `ModifierCard` gfx resolver incl. `P<n>` perk graphics), monster ability decks (row card slot, deck menu — reveal top cards, draw extra, extra shuffle, activate/inactivate, drag-reorder, remove — and card zoom), the full AMD suite (`ModifierDeckWidget` + `ModifierDeckHeader` + `ModifierDeckMenu` with the six submenus — send-to-bottom, remove AMD, removed pile, faction cards, perks, plus zoom; imbue 1/2, ±1/−2/+0, reveal with the Cassandra 8-button cap, bad omen, corrosive spew, Hail/Cassandra specials, faction unlock, CS sanctuary/party cards), the loot deck (widget, cards menu — set owner, per-character loot totals, add card, enhance with the reference material/herb/coin splits, special cards 1418/1419, return top/bottom), and the bottom `DeckArea` (loot deck left; character-deck toggle with the reference open-state cycling; ally deck behind `shouldShowAlliesDeck`; global deck). Pure helper modules (`rules.ts`, `modifierDeck.ts`, `perks.ts`, `cards/lootCard.ts`) ported from the reference with unit tests. Server: all deck/loot/modifier/ability commands were already registered and tested in Phases 1–2 (592 tests green). `svelte-check` 0 errors; web build OK; 177 client tests green. |
+| 2026-11-17 | **Phase 5 complete / M5 reached** — full game feature set. Web: note rows end-to-end (create/edit menu — text, 12-swatch colour palette, link to player/monster with per-standee selection, delete — with the reference's create-vs-edit commit semantics; row rendering with the target's class colour / red-blue monster bases, lighten-toward-white gradient, link indent + connector, standee "N:"/"All:" prefixes, luminance-based text colour, tap-to-edit; whole-list drag-to-reorder → `reorderList`; quick per-figure note via `setFigureNote` from the status menu), special monster handling (Ice Wraith "Switch Form" behind the `deck == "Ice Wraith"` gate; summon mark toggle with the round-green / summon-gfx standee artwork + standee-nr badges and per-owner grayscale; character summon boxes above the row + AddSummonMenu — class summons gated by level and standee cap, item summons from `summons.json`, colour swatches + standee numbers → `addStandee … addAsSummon`), ally deck show/hide in the main menu (gated by `shouldShowAlliesDeck`), settings "clear unlocked" + Special Unlocks menu (4 unlockables, "???" while locked), and AddSectionMenu parity (case-insensitive search, the `findNrFromScenarioName` numeric ordering with string-compare fallback, added sections greyed + no-op, "Add Random Dungeon Card" label). Data layer: `SummonModel` + `ClassData.summons` + `summons()` fetch in `gameData.ts`. Server: added `unlock_special_command_test` (the only command missing a test — ally-deck-hide and remove-sanctuary were already covered in their consolidated files). Cross-check against the reference confirmed scenario rules are complete server-side (Timer round-1 spawns merged into the start room via `_applyRound1Spawns`, Timer notes, battle-goal reminder, `initialMessage` → `toastMessage` → web toast, Objective/Escort/AllyDeck/ResetRound/Unlock/RandomSections all handled). Verification: web 177/177 tests, `svelte-check` 0 errors; server suite green; full CI (dart analyze + test, web check + test + build) passing. |
## 7. Risks and open items