From 21ee4be2cadd82ab2540bf1567c35204e7c190a9 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 16 Nov 2026 22:59:41 -0500 Subject: [PATCH] docs/game/DESIGN.md: critic's s10-12 fixes; s12 recomputed on #13 rules - Legacy: +2 on last turn only if here since turn <= 4 (keywordParams.Legacy.byTurn) - Buzz cap +2 (lane cap 3); end-of-turn effects resolve before scoring - keywordParams and portalParams defaults, Topic ids, lane-badge UI notes - Main Page portal 'at scoring' (kind scoringCardBonus); Featured Article tie rule - Big Board marked tablet/desktop; No Keywords onTopicBonus as array - s12: critic's verified example (golden [[15,11],[9,16],[17,24]], p1 wins), out-of-date banner removed Refs #1. Co-Authored-By: Claude Opus 5.5 --- docs/game/DESIGN.md | 117 +++++++++++++++++++++++++------------------- 1 file changed, 66 insertions(+), 51 deletions(-) diff --git a/docs/game/DESIGN.md b/docs/game/DESIGN.md index 553e8d3..64104bc 100644 --- a/docs/game/DESIGN.md +++ b/docs/game/DESIGN.md @@ -338,14 +338,14 @@ They only ever *add* power (v1 has no removal, stealing, moving or lowering powe | Keyword | Source | Trigger | Reminder text | Cap | |---|---|---|---|---| -| **Buzz** | home: attention | On reveal | +1 power to each of your *other* cards here. | +3 (lane cap 4) | +| **Buzz** | home: attention | On reveal | +1 power to each of your *other* cards here. | +2 (lane cap 3) | | **Anchor** | home: depth | Ongoing | +2 power while it is your only card here. | +2 | | **Echo** | home: reach | On reveal | +1 power to your most recently played card in each *other* Topic. | +2 (2 cards) | | **Orbit** | faction: Space | Ongoing | +1 to your Topic power in each *adjacent* Topic. | +1 per adjacent Topic | | **Grow** | faction: Nature | End of turn | +1 power. | +3 total | | **Rally** | faction: People | On reveal | +1 power to each of your *other People* cards, in any Topic. | `factionSynergyCap` (3) | | **Research** | faction: Science | On reveal | +1 power for each Topic you lead right now. | +3 | -| **Legacy** | faction: History | Ongoing | +2 power on the last turn. | +2 | +| **Legacy** | faction: History | Ongoing | On the last turn, +2 power if this card has been here since turn 4 or earlier. | +2 | | **Remix** | faction: Culture | On reveal | +2 power if you are losing here. | +2 | Precise rules (for engine-b): @@ -363,7 +363,8 @@ Precise rules (for engine-b): going to the targets in play order. - **Research** counts Topics where you lead (strictly greater Topic power) at the moment it resolves, including this Topic after its own base and on-topic power is added. *(Clarification: the card's own power counts toward leading here.)* -- **Legacy** applies when `turn == turns` (the last turn), from the start of that turn. +- **Legacy** applies when `turn == turns` (the last turn), from the start of that turn, and only if the card was revealed on a turn ≤ `keywordParams.Legacy.byTurn` (default **4**, i.e. `turns − 2`). So committing a History card early is a real choice: it shows your hand to win the +2. +- **End-of-turn effects on the last turn resolve before scoring** (§7), so Grow's last +1 counts. - **Remix:** "losing here" means the opponent's Topic power here is strictly greater than yours, counted just *before* this card is added. - **Culture is about half the pool,** so its faction keyword (Remix) is the one with no faction synergy. A Culture-heavy deck @@ -379,6 +380,14 @@ Examples: - *Legacy:* Ancient Rome (power 7) shows 7 on turns 5 and 9 on turn 6. - *Remix:* the opponent has 6 here and you have 3, so Jazz (power 2) is revealed as 4. +**`keywordParams` defaults** (every number above, keyed by keyword id; modes may change them within 0–6): +```json +{ "Buzz": {"amount": 1, "cap": 2}, "Anchor": {"amount": 2}, "Echo": {"amount": 1}, + "Orbit": {"amount": 1}, "Grow": {"amount": 1, "cap": 3}, "Rally": {"amount": 1, "cap": 3}, + "Research": {"amount": 1, "cap": 3}, "Legacy": {"amount": 2, "byTurn": 4}, "Remix": {"amount": 2} } +``` +Rally's cap is `factionSynergyCap` when that key is set. Otherwise it's `keywordParams.Rally.cap`. + ### 10.3 Portals (Topic modifiers) and the default Topic pool Each Topic has `{ id, name, stat, portal | null }`. The default `topicPool` has 9 Topics, one plain and two with Portals for each stat. A Portal applies from the moment its Topic is revealed (§3), except where it says otherwise. @@ -386,19 +395,25 @@ Portals for each stat. A Portal applies from the moment its Topic is revealed ( | Topic | Stat | Portal rule | |---|---|---| | Current Events | attention | – | -| Main Page | attention | On the last turn, each card here gets +1 power. | +| Main Page | attention | At scoring, each card here gets +1 power. | | Trending | attention | Trend arrows (§1.6) count double here (±2). | | Archive | depth | – | -| Featured Article | depth | At end of the match, the player with the single highest-power card here gets +2 Topic power here (no bonus if tied). | +| Featured Article | depth | At end of the match, the player with the single highest-power card here gets +2 Topic power here. If the highest card power here is tied (between the two players), nobody gets the bonus. | | Stub | depth | Lane capacity here is 2 per player. | | Translations | reach | – | | Interwiki | reach | +1 Topic power here for a player who has at least one card in all 3 Topics. | | Disambiguation | reach | Every card here counts as on-topic, whatever its home stat. | -As data: `portal = { kind: "lastTurnCardBonus", amount: 1 } | { kind: "trendMultiplier", factor: 2 } | +As data: `portal = { kind: "scoringCardBonus", amount: 1 } | { kind: "trendMultiplier", factor: 2 } | { kind: "highestCardBonus", amount: 2 } | { kind: "laneCapacity", value: 2 } | { kind: "spreadBonus", amount: 1 } | { kind: "allOnTopic" }`. Modes may add Topics with these kinds, using new numbers, but not new kinds (engine code). +**`portalParams` defaults** (keyed by Topic id): `{ "main-page": {"amount": 1}, "trending": {"factor": 2}, +"featured-article": {"amount": 2}, "stub": {"value": 2}, "interwiki": {"amount": 1} }`. Disambiguation has no numbers. +Topic ids are the names in kebab-case: `current-events, main-page, trending, archive, featured-article, stub, +translations, interwiki, disambiguation`. The UI shows each Portal's one-line rule **on the lane itself**, not behind a tap. +Orbit's bonus is not on any card, so the UI shows it as a lane badge ("+1 🪐") next to the Topic total. + --- ## 11. Peer-hosted modes *(owner: council-designer-b)* @@ -432,7 +447,8 @@ A **mode** is data, published by a node operator and run by the match host: | `onTopicBonus` (7 entries), `vanillaBonus` | 0–5 each | | `trendUp` / `trendDown` | 0–200 / −200–0 | | `factionSynergyCap` | 0–6 | -| `keywordsEnabled` (new, default: all 9) | any subset of the 9 v1 keywords; a disabled keyword makes those cards vanilla, *without* `vanillaBonus` | +| `keywordsEnabled` | any subset of the 9 v1 keywords; a disabled keyword makes those cards vanilla, *without* `vanillaBonus` | +| `keywordParams`, `portalParams` | only the keys listed in §10.2 / §10.3, each in 0–6 (`Legacy.byTurn` in 1..`turns`) | | `verifyStats` | the host may only turn this off for modes that use only loaners (`maxLoaners == deckSize` and owned cards banned) | | `topicPool` | 3–20 Topics, Portal kinds only from 10.3 | @@ -448,60 +464,59 @@ Example modes (good defaults for operators to publish): | **Blitz** | `turns 4`, `energyByTurn [2,3,4,5]`, `portalReveal [1,1,2]`, `deckSize 10`, `turnSeconds 20` | about 2 minutes | | **Deep Cuts** | `topicPool`: only the 3 depth Topics, `distinctStats false` | rewards long, obscure articles | | **Loaner League** | `maxLoaners 12` and owned cards banned (`"ownedCards": false`, a new boolean key, default true) | fully level, for tournaments | -| **Big Board** | `topicCount 5`, `distinctStats false`, `portalReveal [1,2,3,4,5]`, `laneCapacity 3` | win 3 of 5 | -| **No Keywords** | `keywordsEnabled []`, `onTopicBonus 3` | Top Trumps–style tutorial mode | +| **Big Board** | `topicCount 5`, `distinctStats false`, `portalReveal [1,2,3,4,5]`, `laneCapacity 3` | win 3 of 5; **tablet/desktop only** (5 × 3 slots won't fit a 360 px phone) | +| **No Keywords** | `keywordsEnabled []`, `onTopicBonus [0,3,3,3,3,3,3]` | Top Trumps–style tutorial mode | --- ## 12. Worked example match *(owner: council-designer-b)* -> **⚠ Out of date (merge note from designer-a):** this example was written against the #12 draft: -> flat +2 on-topic, `powerByCost [..5,7,9]`, laneCapacity 4, and Topics revealed one per turn. -> §1–9 now use `onTopicBonus [0,1,1,2,2,3,3]`, `powerByCost [0,1,2,4,6,8,10]`, laneCapacity 3, -> 1 carried-over energy, interleaved reveals, alternating initiative, stats visible from turn 1, and -> Portals revealed on turns 2–4. designer-b is recomputing it. **engine-b: don't use the golden -> numbers below until this note is gone.** +This example uses the §1–11 rules of this PR. It was recomputed by council-critic (who checked it with a script) and re-checked by hand by designer-b. +- **Rules:** `powerByCost [0,1,2,4,6,8,10]`, `onTopicBonus [0,1,1,2,2,3,3]`, `vanillaBonus 1`, `laneCapacity 3`, + interleaved reveals, `underdog false`, no trend arrows. Nobody carries energy: both players spend 1/2/3/4/5/6. +- **Initiative:** Ana (p0) on odd turns, Bo (p1) on even turns. +- **Topics:** **T1 Archive (depth, plain)**, **T2 Main Page (attention; Portal revealed turn 3; at scoring, +1 per card here)**, + **T3 Translations (reach, plain)**. -Default rules. The derived cards are given directly (§1 output). "base" = `powerByCost[cost]`, with +1 for cost-1 vanilla cards. -Topics after the seeded draw: **T1 Archive (depth)**, **T2 Main Page (attention)**, **T3 Translations (reach)**. -Ana (p0) has initiative on turn 1. Neither player has a trend arrow. +The cards are the §1 output, given directly. "Base" is `powerByCost[cost]`, with +1 for cost-1 vanilla cards; "+on" is `onTopicBonus[cost]`. -Cards played: -| Player | Card | Faction / rarity | Cost | Base | Home | Keyword | +| Player | Card | Faction / rarity | Cost | Base (+on) | Home | Keyword | |---|---|---|---|---|---|---| -| Ana | Octopus | Nature / Common | 1 | 2 | depth | – (vanilla) | -| Ana | Moon | Space / Common | 2 | 2 | reach | Echo | -| Ana | Periodic table | Science / Rare | 3 | 4 | depth | Research | -| Ana | Albert Einstein | People / Epic | 4 | 5 | attention | Rally | -| Ana | Ancient Rome | History / Rare | 5 | 7 | depth | Legacy | -| Ana | Library of Alexandria | History / Common | 4 | 5 | depth | Anchor | -| Ana | Coral reef | Nature / Common | 2 | 2 | depth | Anchor | -| Bo | Haiku | Culture / Common | 1 | 2 | attention | – (vanilla) | -| Bo | Jazz | Culture / Rare | 2 | 2 | attention | Remix | -| Bo | Fern | Nature / Rare | 3 | 4 | depth | Grow | -| Bo | Pop music | Culture / Common | 4 | 5 | attention | Buzz | -| Bo | Jupiter | Space / Epic | 5 | 7 | reach | Orbit | -| Bo | Saturn | Space / Legendary | 6 | 9 | reach | Orbit | +| Ana | Octopus | Nature / Common | 1 | 2 (+1) | depth | – (vanilla) | +| Ana | Moon | Space / Common | 2 | 2 (+1) | reach | Echo | +| Ana | Periodic table | Science / Rare | 3 | 4 (+2) | depth | Research | +| Ana | Albert Einstein | People / Epic | 4 | 6 (+2) | attention | Rally | +| Ana | Ancient Rome | History / Rare | 5 | 8 (+3) | depth | Legacy | +| Ana | Library of Alexandria | History / Common | 4 | 6 (+2) | depth | Anchor | +| Ana | Coral reef | Nature / Common | 2 | 2 (+1) | depth | Anchor | +| Bo | Haiku | Culture / Common | 1 | 2 (+1) | attention | – (vanilla) | +| Bo | Jazz | Culture / Rare | 2 | 2 (+1) | attention | Remix | +| Bo | Fern | Nature / Rare | 3 | 4 (+2) | depth | Grow | +| Bo | Pop music | Culture / Common | 4 | 6 (+2) | attention | Buzz | +| Bo | Jupiter | Space / Epic | 5 | 8 (+3) | reach | Orbit | +| Bo | Saturn | Space / Legendary | 6 | 10 (+3) | reach | Orbit | -Topic power is written as **Ana–Bo**. "Lead" is the number of Topics each player leads after the turn. +Topic power is written as **Ana–Bo** after the End phase. -| Turn | Revealed | Ana plays (reveals first when she has initiative) | Bo plays | T1 | T2 | T3 | Lead | Initiative next | -|---|---|---|---|---|---|---|---|---| -| 1 | T1 Archive | Octopus → T1: 2, +2 on-topic = **4** | Haiku → T1: **2** (attention ≠ depth) | 4–2 | 0–0 | 0–0 | 1–0 | Ana (leads more) | -| 2 | T2 Main Page | Moon → T3 (face-down, no bonus yet): 2. Echo: Octopus +1 → 5 | Jazz → T2: 2+2 = 4. Remix: Ana has 0 here, so not losing, no bonus | 5–2 | 0–4 | 2–0 | 2–1 | Ana | -| 3 | T3 Translations: Moon is now on-topic, 4 | Periodic table → T1: 4+2 = 6. Research: Ana leads T1 (11–2) and T3 (4–0) → +2 = **8** | Fern → T1: 4+2 = 6. End of turn, Grow: 7 | 13–9 | 0–4 | 4–0 | 2–1 | Ana | -| 4 | – | Einstein → T2: 5+2 = 7. Rally: no other People cards, so nothing | Pop music → T2: 5+2 = 7. Buzz: Jazz +1 → 5. Grow: Fern 8 | 13–10 | 7–12 | 4–0 | 2–1 | Ana | -| 5 | – | Ancient Rome → T3: 7 (depth ≠ reach) | Jupiter → T3: 7+2 = 9. Orbit: Bo's T2 +1 → 13. Grow: Fern 9 (the +3 cap is reached) | 13–11 | 7–13 | 11–9 | 2–1 | Ana | -| 6 (last) | Main Page: +1 per card. Legacy: Rome 9 | Library of Alexandria → T3: 5. Anchor: not the only card, so no bonus. Coral reef → T1: 2+2 = 4 (Anchor: no) | Saturn → T3: 9+2 = 11. Orbit: Bo's T2 +1 | **17–11** | **8–16** | **18–20** | 1–2 | – | +| Turn | Initiative | Reveals (interleaved order) and effects | T1 | T2 | T3 | +|---|---|---|---|---|---| +| 1 | Ana | Ana Octopus → T1: 2+1 = **3**. Bo Haiku → T1: **2** (off-topic) | 3–2 | 0–0 | 0–0 | +| 2 | Bo | Bo Jazz → T2: 2+1 = 3. Remix: not losing (0–0), so no bonus. Ana Moon → T3: 2+1 = 3. Echo: Octopus +1 → 4 | 4–2 | 0–3 | 3–0 | +| 3 | Ana | Main Page Portal revealed. Ana Periodic table → T1: 4+2 = 6. Research: Ana leads T1 (10–2) and T3 (3–0), so +2 → **8**. Bo Fern → T1: 4+2 = 6. End, Grow: Fern 7 | 12–9 | 0–3 | 3–0 | +| 4 | Bo | Bo Pop music → T2: 6+2 = 8. Buzz: Jazz +1 → 4. Ana Einstein → T2: 6+2 = 8. Rally: no other People cards. End, Grow: Fern 8 | 12–10 | 8–12 | 3–0 | +| 5 | Ana | Ana Ancient Rome → T3: 8 (depth ≠ reach). Its Legacy can't apply, because it arrived on turn 5 > 4. Bo Jupiter → T3: 8+3 = 11. Orbit: Bo's T2 +1. End, Grow: Fern 9 (the +3 cap is reached) | 12–11 | 8–13 | 11–11 | +| 6 (last) | Bo | Bo Saturn → T3: 10+3 = 13. Orbit: Bo's T2 +1. Ana Library → T3: 6 (off-topic; Anchor no, not alone). Ana Coral reef → T1: 2+1 = 3 (Anchor no). Scoring: Main Page gives +1 per card in T2 | **15–11** | **9–16** | **17–24** | -The turn-6 numbers: -- **T1:** Ana has Octopus 5 + Periodic table 8 + Coral reef 4 = 17. Bo has Haiku 2 + Fern 9 = 11. -- **T2:** Ana has Einstein 7 + 1 (Main Page) = 8. Bo has Jazz 5+1 and Pop music 7+1, plus Orbit ×2, = 16. -- **T3:** Ana has Moon 4 + Rome 9 + Library 5 = 18. Bo has Jupiter 9 + Saturn 11 = 20. +Final board: +- **T1:** Ana has Octopus 4 + Periodic table 8 + Coral reef 3 = **15**. Bo has Haiku 2 + Fern 9 = **11**. → Ana +- **T2:** Ana has Einstein 8+1 = **9**. Bo has Jazz 4+1 + Pop music 8+1 + Orbit ×2 = **16**. → Bo +- **T3:** Ana has Moon 3 + Ancient Rome 8 + Library 6 = **17**. Bo has Jupiter 11 + Saturn 13 = **24**. → Bo -**Bo wins 2–1.** Bo trailed 1–2 from turn 2 to turn 5. Ana guessed Bo would contest T3 and spent 4 of her 6 energy there. Saturn on-topic (11) still beat her by 2, and its Orbit also tipped T2. The underdog check never fired, because Bo always led one Topic. -Energy check: Ana spent 1/2/3/4/5/6 and Bo spent 1/2/3/4/5/6. +**Bo wins 2–1** (total power 41–51; the tie-break isn't needed). +The deciding moment was Ana's turn-5 Rome. It was off-topic in T3, and too late for Legacy. Saturn on-topic plus a second Orbit then took both T2 and T3. -**Golden test for engine-b:** with these card inputs, this Topic order and these commit lists, the final Topic powers must be -`T1 17–11, T2 8–16, T3 18–20`, and the result must be a Bo win (2 Topics to 1). Only the seed's Topic draw and the decks' order -vary. The test should inject the Topic order and the hands directly. +**Golden test (engine-b):** +- **Inject:** the Topic order, these 13 cards and these commit lists, in the queue order shown. +- **Expected final Topic powers:** `[[15,11],[9,16],[17,24]]` (Ana–Bo). Winner: p1. +- **Coverage:** vanilla, Echo, Research, Grow (including its cap), Buzz, Orbit ×2, the Main Page Portal at scoring, and Remix, Rally, Anchor and Legacy correctly **not** firing. +- **Separate unit tests:** add cases where Remix, Rally, Anchor and Legacy (here since turn ≤ 4) **do** fire.