Compare commits

...
Author SHA1 Message Date
claudeandClaude Opus 5.5 1c706966d4 docs/game/DESIGN.md: final v1 keyword set (6, engine-b ids) per critic sign-off
The critic signed off on the 6-keyword set on #1 at 03:59:40Z, superseding the 9-set notes.
- s10.1-10.2: viral, rising, local, encyclopedic, nostalgic, translated;
  edition/obscure/wildcard mode-only; keywordParams defaults incl. powerDelta
- s12: 6-set worked example (critic-verified): T1 19-15, T2 15-19, T3 13-10, p0 wins;
  Main Page applies at scoring
- s1.7/1.8 rarity cosmetic; s9 keywordsEnabled; s11 ranges
- critic nits: s3 faction line, s8 'All one faction' row, s1.5 line
Keeps from 21ee4be: portalParams, Featured Article tie, Big Board tablet, No Keywords array.

Refs #1.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 23:01:28 -05:00
claudeandClaude Opus 5.5 21ee4be2ca 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 <noreply@anthropic.com>
2026-11-16 22:59:41 -05:00
claudeandClaude Opus 5.5 c571334b10 docs(game): §7 end-of-turn and at-scoring effects resolve before scoring
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 22:57:51 -05:00
claudeandClaude Opus 5.5 3db68e6be2 docs(game): pin turn-1 draw, start-phase order, fizzle; inline topicPool, keyword and portal params (engine-a)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 22:56:51 -05:00
claudeandClaude Opus 5.5 120019e8e7 council-designer-a status (PR body can't be edited over ssh; read this instead)
- night-review must-fixes 1-3: done. Should-fixes: commit-reveal seed (§4),
  verifyStats caching and API failure (§1.10), copies counted together (§2): done.
- council-critic M1-M4, S1-S5 and the 2 §8 text fixes: done. Starter decks are curve-shaped (§2).
  powerByCost [0,1,2,4,6,8,10] kept, per the critic's LGTM.
- designer-b's §10-12 (a9ab940) merged word for word; the only change is revealSchedule renamed portalReveal.
- engine-b: Topics have a stat only, no faction (§3). The v1 keyword set is §10.2
  (Buzz/Anchor/Echo/Orbit/Grow/Rally/Research/Legacy/Remix); designer-b owns it.
- OPEN: the §12 worked example and golden test use the #12 numbers and are flagged in place.
  designer-b has been asked (via the orchestrator) to recompute them. #13 can merge now; §12 follows.
- Docs only: npm test/build not run.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 22:56:24 -05:00
claudeandClaude Opus 5.5 6a56822e19 docs(game): critic's §8 text fixes, curve-shaped starter decks, Topics have no faction
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 22:56:07 -05:00
claudeandClaude Opus 5.5 0e0596a855 Merge council-designer-b's sections 10-12 (a9ab940) into design fixes
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 22:55:10 -05:00
claudeandClaude Opus 5.5 ac46298594 docs(game): critic M1-M4, S1-S5
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 22:54:08 -05:00
claudeandClaude Opus 5.5 a9ab940f4b docs/game/DESIGN.md: keywords, portals, modes, worked example (council-designer-b)
Fills sections 10-12 on top of designer-a's draft: 9 power-only keywords
chosen by rarity/home stat/faction, 9-Topic default pool with 6 Portal kinds,
mode schema with validation ranges and example modes, and a fully computed
6-turn worked example with a golden test (T1 17-11, T2 8-16, T3 18-20).
Adds rules keys vanillaBonus, keywordsEnabled, ownedCards to section 9.

Refs #1.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 22:53:56 -05:00
claudeandClaude Opus 5.5 175713e8b2 docs(game): DESIGN.md v1 review fixes and deliberate divergences
- Exact Topic draw algorithm (one RNG order)
- onTopicBonus scales with cost (about 2 power per energy on-topic at every cost)
- Host swaps in live snapshot before building CardInput; verifyStats caching and fail-open
- Commit-reveal seed for hosted PvP; copies count owned and loaners together
- Diverge from Snap: lane capacity 3, energy carry-over 1, interleaved alternating reveals,
  stats visible from turn 1 with hidden Portals, consensus lane tie-break

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 22:52:54 -05:00
claudeandClaude Opus 5.5 f808f963c6 docs(game): starter cards file, mode-variable fields
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 22:49:12 -05:00
claudeandClaude Opus 5.5 01b83f9c9f docs(game): DESIGN.md v1 draft rules sections (council-designer-a)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 22:48:43 -05:00
+305 -66
View File
@@ -6,7 +6,8 @@ owns sections 10–12 (keywords, peer-hosted modes, worked example). council-cri
Every number in **`code font`** is a rules-config key (see §9). Modes can override any of them.
A two-player lane game for 3–6 minute matches. Each player has a 12-card deck and there are 3
**Topics** (lanes). There are 6 turns, both players play at the same time, and energy ramps from 1 to 6.
**Topics** (lanes) with 3 slots per side. There are 6 turns, both players plan at the same time, and
energy ramps from 1 to 6, with 1 unspent energy carried over. Reveals interleave one card at a time.
Win 2 of the 3 Topics. Each Topic is judged on one Wikipedia stat (**Attention**, **Depth** or
**Reach**), and a card is stronger in a Topic that matches its best stat. Fame (how high a card's
stats are overall) sets its **cost**, not its efficiency, so famous cards are sidegrades. They are
@@ -18,7 +19,7 @@ not upgrades.
| Game | Why it's fun | Taken | Left |
|---|---|---|---|
| Marvel Snap | 3-minute matches; simultaneous turns; 3 lanes, so the decision is *where*, not just *what*; lanes revealed over time | lanes, 6 turns, ramp 1→6, simultaneous reveal, staggered lane reveal, small deck | cube betting ("snap") is left to modes; it needs ranked stakes |
| Marvel Snap | 3-minute matches; simultaneous turns; 3 lanes, so the decision is *where*, not just *what* | lanes, about 6 turns, simultaneous planning, small deck | stakes betting (modes only); we deliberately diverge in lane size (3), energy carry-over, interleaved alternating reveals, stats visible from turn 1 with hidden Portals, and on-topic tie-breaks |
| Hearthstone | mana curve; readable cards; tempo | energy = turn number, curve-shaped costs | 30-card decks and 15-minute matches; hero powers |
| Magic: The Gathering | factions (colours) with distinct identities; deckbuilding depth | 6 factions with their own keyword flavour | land screw (resource variance); the stack; long text |
| Balatro | huge "moment" when a combo goes off; simple base rules plus modifiers | lane modifiers (Portals) as the run-to-run variety | single-player scoring |
@@ -28,6 +29,14 @@ not upgrades.
| Top Trumps | instantly understood: "my number beats yours" | lanes judged on one stat | picking the stat is solved play (always pick your best) |
| Dominion | deck building as play | — (too long for 3–6 min) | — |
**What is ours, not borrowed:**
- (a) each Topic is judged on one Wikipedia stat (the Top Trumps twist)
- (b) cost comes from an article's fame instead of being printed
- (c) a trend arrow driven by live pageviews
- (d) a total-power and consensus tie-break instead of stakes betting
- smaller choices: 3 slots per lane, 1 carried-over energy, interleaved reveals, and stats visible
from turn 1 with hidden Portals
The core loop is a lanes game in the style of Snap. The Top Trumps twist is that each lane asks for
one Wikipedia stat. That makes every stat matter and gives each turn its main decision: play the card
on-topic for the bonus, or put it where the fight is.
@@ -42,7 +51,8 @@ The engine never reads raw 0–100 stats as power. Every game card is derived **
```
CardInput = { cardId, pageId, title, category, rarity,
snapshot: MintStatsSnapshot, // at mint, immutable
live: { trendPercent: number | null } } // frozen at match start
live: { trendPercent: number | null, dailyAverage: number | null }, // frozen at match start
check: 'verified' | 'unverified' | 'unchecked' | 'loaner' } // set by the host (§1.10)
```
### 1.1 Percentiles (rank-normalisation)
@@ -60,7 +70,8 @@ The defaults aim at a pool cost spread of about 15/20/20/20/15/10 %. They are re
sample's fame distribution.
### 1.3 Power
`power` = `powerByCost[cost]`, default `[_, 1, 2, 4, 5, 7, 9]` (cost 1 → 1 … cost 6 → 9).
`power` = `powerByCost[cost]`, default `[_, 1, 2, 4, 6, 8, 10]` (cost 1 → 1 … cost 6 → 10). The
critic's sim showed that heavy decks were too weak with `[…5,7,9]`.
Power depends **only on cost**. Two cards of the same cost have the same base power, whatever their
fame. Inflating stats (forged snapshots, template shopping) only moves a card up the curve. It never
makes a card more efficient.
@@ -68,29 +79,32 @@ makes a card more efficient.
### 1.4 Home stat
`home` = the stat with the highest `pct_s`. Ties are broken in this order: depth, reach, attention.
Depth and reach are the hardest to inflate. A `null` stat can never be home.
When a card is in a Topic whose stat equals its `home`, it gets **+`onTopicBonus`** power (default
**+2**).
When a card is in a Topic whose stat equals its `home`, it gets **+`onTopicBonus[cost]`** power
(default `[0, 1, 1, 2, 2, 3, 3]`, i.e. ⌈cost/2⌉).
On-topic efficiency is then about 2 power per energy at every cost (2.0 / 1.5 / 2.0 / 1.75 / 2.0 / 2.0).
Off-topic, cheap cards are weaker (1.0) than expensive ones (1.5). Cheap cards want their Topic, and
big cards are flexible.
### 1.5 Faction
`faction` = the card's `category` (Space, Nature, People, Science, History, Culture), from
`server/wiki.ts`. Culture is about half the pool, so faction keywords are written so that a
mono-faction deck gains no consistency edge (see §10, and `factionSynergyCap` in §9).
mono-faction deck gains no consistency edge (§10: no v1 keyword scales with faction count).
### 1.6 Trend (live, small, capped)
`trend` = +1 if `live.trendPercent ≥ trendUp` (default 25), −1 if `≤ trendDown` (default −25),
otherwise 0. A `null` value gives 0. The host computes it **once at match start**, and it is frozen for
otherwise 0. A `null` value gives 0. Trend also needs `live.dailyAverage ≥ trendMinDaily` (default
**20**), because percentages on tiny articles are noise; otherwise trend is 0. The host computes it **once at match start**, and it is frozen for
the match. It shows as an arrow (▲/▼), not a number. It adds to power in every Topic.
### 1.7 Rarity
The hash-derived `rarity` (`shared/protocol.ts:38`) is **cosmetic in v1** (frame colour). Mining luck
must not become power.
The hash-derived `rarity` (`shared/protocol.ts:38`) is **cosmetic in v1** (frame colour only). Mining luck must not
become power or keyword choice.
### 1.8 Keyword
Each card has at most **one** keyword, chosen deterministically from faction, home stat and rarity by
the table in §10 (owned by designer B).
Each card has at most **one** keyword: cost-1 cards are vanilla, and the others get their faction's keyword (§10.1).
### 1.9 Card face (phone)
The card face shows **cost** (top-left), **power** (big, centre), a **home-stat icon**
The card face shows **cost** (top-left), **power** (big, centre; the bonus shows as a "+N" badge on the home icon when the card is on-topic), a **home-stat icon**
(📣 attention / 📚 depth / 🌐 reach), an optional trend arrow, and one keyword word. That is two
numbers, plus the live lane power when the card is on the board.
@@ -99,16 +113,28 @@ When `verifyStats` is true (the default for hosted matches), the match host chec
snapshot before the match:
`pageBytes` against that revision's byte size, `languageCount` ≤ the live count + 5, and views for the
snapshot month within ±10 % of the pageviews API.
A card that fails is played **as if its snapshot were its live values**, and the match log marks it.
The engine itself does no I/O: it receives already-checked `CardInput`s.
A card that fails is played with its live values. The **host replaces `snapshot`** with a snapshot
built from the live values (`deriveStats` on the live bytes, languages and views) **before** it builds
the `CardInput`. The match log marks the card `unverified`.
The engine does no I/O and only ever sees one version of each card.
- **Caching:** results are cached per `(pageId, revisionId, snapshotMonth)`. They are immutable, so a
cached pass or fail never expires. Live values for a failed card are cached for 24 h.
- **Card can't be verified** (the pageId or revision doesn't exist, or the title or category doesn't
match): the card is **rejected at deck validation**, and the player is asked to swap in a loaner.
- **API failure:** if Wikipedia can't be reached and nothing is cached, the card plays from its snapshot
with `check: 'unchecked'`. The engine then caps its cost at `uncheckedCostCap` (default **4**), and
power follows the capped cost. Matches are never blocked.
- The engine's only use of `check` is that cost cap. Loaner cards are `check: 'loaner'`.
---
## 2. Decks
- **Deck size:** exactly `deckSize` cards (default **12**).
- **Copies:** at most `maxCopiesPerPage` cards with the same `pageId` (default **2**). Each copy keeps
its own snapshot, so the two copies may differ in cost.
- **Copies:** at most `maxCopiesPerPage` cards with the same `pageId` (default **2**). Owned and loaner
copies count **together**. Each copy keeps its own snapshot, so the two copies may differ in cost.
- **Deck validation** (engine): the size is right, the copy limit holds, every card's `check` is
valid, and there are no more loaners than `maxLoaners`. An invalid deck can't start a match.
- **Owned cards:** any card the player's wallet owns at match start. Ownership is read off-chain. The
match never moves, locks or burns a card.
- **Loaner cards:** off-chain preview cards with a fixed `CardInput`, shipped with the game data
@@ -116,7 +142,8 @@ The engine itself does no I/O: it receives already-checked `CardInput`s.
with frozen, hand-checked snapshot stats, including the 4 cards in `shared/catalog.ts`).
Loaners follow the same derivation, so they are no weaker or stronger than owned cards.
- **Starter decks:** `starterDecks` (default: 4 fixed 12-card loaner decks). Each one has two leading
factions and an average cost of 3.0–3.3. A new player picks one and can play at once.
factions and an average cost of 3.0–3.3, and is **curve-shaped**: at least 3 cards of cost 4 or more,
and at most 4 of cost 1. A new player picks one and can play at once.
- **Mixed decks:** an owned deck may fill any slots with loaners, up to `maxLoaners` (default 12, which
means no limit). Owning NFTs gives **variety**, not power: owned and loaner cards follow the same
curve.
@@ -127,13 +154,22 @@ The engine itself does no I/O: it receives already-checked `CardInput`s.
- 3 **Topics** (lanes), numbered 1–3 from left to right (top to bottom in portrait).
- Each Topic has a **stat** (attention, depth or reach) and an optional **Portal** modifier (§10.3).
- Each player has at most `laneCapacity` cards per Topic (default **4**).
- **Topic draw:** at match start, `topicCount` (3) Topics are drawn without replacement from
`topicPool`. The default pool has 9 Topics: each stat 3 times, one plain and two with Portals.
If `distinctStats` is true (the default), the draw is redone until the 3 Topics have 3 different
stats. In practice the engine draws one Topic per stat and then shuffles the lane order.
- **Staggered reveal:** Topic *i* is face-down until the start of turn *i* (`revealSchedule`, default
`[1, 2, 3]`). Cards can be played into a face-down Topic: that is the risky, on-topic gamble.
Topics have **no faction**. No v1 keyword counts factions: faction only picks the keyword.
- Each player has at most `laneCapacity` cards per Topic (default **3**). That gives 9 slots per side,
which caps cheap-card flooding and fits 3 cards across a 360 px phone.
- **Topic pool:** `topicPool` is a list of Topics, each `{ id, name, stat, portal | null }`. The default
pool has 9 Topics: 3 per stat, one plain and two with Portals. `pool_s` is the sub-list with stat
`s`, in file order.
- **Topic draw (exact):**
- If `distinctStats` is true (the default): for each stat in the fixed order
`[attention, depth, reach]`, pick `pool_s[floor(next() × len(pool_s))]`. That uses 3 `next()`
calls. Then Fisher–Yates the 3 picks into lanes 1–3 (i = 2, 1; j = floor(next() × (i+1))), which
uses 2 calls.
- If `distinctStats` is false: Fisher–Yates the whole pool (i from n−1 down to 1) and take the first
`topicCount` entries as lanes 1–3.
- **Stats visible, Portals hidden:** every Topic's **stat** is face-up from turn 1. Its **Portal**
modifier is face-down until the start of turn `portalReveal[i]` (default `[2, 3, 4]`). You always
know where your card is on-topic, but not what twist a lane will get.
---
@@ -145,10 +181,15 @@ The engine itself does no I/O: it receives already-checked `CardInput`s.
1. shuffle p0's deck (Fisher–Yates, i from n−1 down to 1, j = floor(next() × (i+1)))
2. shuffle p1's deck the same way
3. draw and shuffle the Topics
4. the initiative coin: p0 has initiative on turn 1 if next() < 0.5, otherwise p1
4. the initiative coin: p0 has initiative on odd turns if next() < 0.5, otherwise p1
5. later random events (keywords only), in resolution order
3. Each player draws `openingHand` cards (default **3**). There are no mulligans in v1
(`mulligan: false`).
4. **Seed fairness (hosted PvP):** commit–reveal. Each party *i* (host, p0, p1) sends
`sha256(r_i)` for a random 32-byte `r_i`, then reveals `r_i` once all commits are in.
`seed` = the first 4 bytes (big-endian uint32) of `sha256(r_host ‖ r_p0 ‖ r_p1)`.
The host still relays the hidden plans, so hosted PvP trusts the host not to leak them.
Local and bot matches use any seed.
---
@@ -157,29 +198,37 @@ The engine itself does no I/O: it receives already-checked `CardInput`s.
The match lasts `turns` turns (default **6**, hard cap). Each turn has these phases:
1. **Start**
- Reveal Topic *t* if it is scheduled (resolve its Portal "on reveal").
- Each player gets `energy = t + bonusEnergy` (energy does not carry over).
- Reveal any Portal scheduled for turn *t* (resolve its "on reveal").
- Each player's energy = `energyByTurn[t-1]` + carry + `bonusEnergy`. Carry is
min(`energyCarryMax`, unspent energy from last turn), default max **1**. Saving one energy on
turn 2 makes a turn-3 four-drop possible: a real tempo choice.
- Each player draws 1 card if their deck isn't empty and their hand holds fewer than `handLimit`
(default **7**) cards. Otherwise they don't draw.
2. **Underdog check** (comeback; `underdog: true`, from turn 2). A player who leads in 0 Topics while
the opponent leads in ≥ 2 gets **+1 energy** this turn.
(default **7**) cards. Otherwise they don't draw. This includes turn 1, so the turn-1 hand is
3 + 1 = 4 cards.
- Order within Start: Portal reveal, then energy, then draw. The Underdog check (step 2) comes after
all three.
2. **Underdog check** (mode option, `underdog: false` by default, because it can be sandbagged). When
it's on, from turn 2, a player who leads in 0 Topics while the opponent leads in ≥ 2 gets
**+1 energy** this turn.
3. **Plan** (simultaneous, hidden)
- Each player queues an ordered list of plays `(handIndex, topic)`.
- Total cost must be ≤ their energy, and each Topic needs room on that player's side.
- Plays can be undone freely until **Commit**. Passing is an empty commit.
- The turn timer is `turnSeconds` (default **25**). On timeout, whatever is queued is committed.
4. **Reveal**
- The player with **initiative** reveals all their queued cards in queue order, then the other
player reveals theirs.
4. **Reveal (interleaved)**
- Plays reveal **one at a time, alternating**: the initiative player's 1st, the other player's
1st, the initiative player's 2nd, and so on. When one player runs out, the rest of the other's
reveal in order.
- Each card enters its Topic and its "on reveal" effect resolves at once.
- A queued play that is no longer legal at reveal (the lane is full or the card was removed) goes
back to hand and its energy is lost.
- So the order in which you queue cards matters: lead with the card you want resolved first.
- Energy is reserved when a card is queued. A queued play that is no longer legal at reveal (the
lane is full, or a Portal rejects it) **fizzles**: the card stays in hand and its energy is lost.
5. **End**
- Recompute all Topic powers (§6).
- End-of-turn effects resolve, the initiative player's first.
- Set initiative for the next turn: the player who leads in more Topics. If they lead in the same
number, the player who did *not* have initiative this turn. So reveal order alternates when the
game is even, and the leader reveals first (and gives away information) when it isn't.
- Initiative strictly **alternates** each turn (set by the coin in §4).
- Plans are locked before anything reveals, so initiative gives away no information. It only
decides the order of on-reveal effects. §10 includes keywords where that order matters.
A typical turn is: look at the lanes, tap a card, tap a Topic (×1–3), tap Commit. That is under 10
seconds, done with one thumb, with no dragging.
@@ -188,18 +237,19 @@ seconds, done with one thumb, with no dragging.
## 6. Power and Topic control
- A card's **lane power** = `power` + (`onTopicBonus` if its home stat is the Topic's stat) + `trend`
- A card's **lane power** = `power` + (`onTopicBonus[cost]` if its home stat is the Topic's stat) + `trend`
+ keyword and Portal modifiers. It is never below 0.
- A player's **Topic power** = the sum of their cards' lane power in that Topic.
- A player **leads** a Topic if their Topic power is strictly greater than the opponent's. 0–0 and
other ties have no leader.
- Face-down Topics have no stat yet, so on-topic bonuses there count as 0 until the Topic is revealed.
- A player **leads** a Topic if their Topic power is strictly greater than the opponent's.
- **Consensus tie-break:** if the powers are equal and > 0, the player with more **on-topic** cards
there leads. If that is also equal, nobody leads. 0–0 has no leader.
---
## 7. Win conditions and tie-breaks
At the end of the last turn:
**Scoring** happens after the last turn's End phase (§5.5): every end-of-turn effect, including
the last turn's, and every "at scoring" Portal resolves **before** Topics are judged. Then:
1. The player who leads **more Topics** wins (2–1, 2–0, 1–0 and 3–0 all count).
2. If they lead the same number of Topics: the higher **total power across all Topics** wins.
3. If that is also equal: the match is a **draw**.
@@ -213,14 +263,15 @@ At the end of the last turn:
| Line | Why it isn't dominant |
|---|---|
| All-famous (all max-stat) deck | It becomes an all-cost-5/6 deck: nothing to play on turns 1–4, so it gives up 2 Topics early. Power per energy is flat across the curve (`powerByCost` is tuned for this in sim). |
| All one faction | Faction synergies are capped (`factionSynergyCap`), and Culture is the largest pool but has the weakest synergy keywords (§10). |
| "Always play the highest-power card" | It ignores on-topic +2 (about 40% of a cheap card's power), lane capacity, and the face-down lanes. Target: < 55% against the sim's smart bot. |
| All-famous (all max-stat) deck | It becomes an all-cost-5/6 deck with dead early turns. Cheap cards are more efficient **per energy**, expensive cards **per card**. Only 9 cards are seen per match (3 + 6 draws), so both matter. The 1-energy carry-over lets a heavy deck bank energy for a turn-5 six-drop. **sim-balance target: heavy vs curve ≥ 40%.** |
| All-cheap flood (cost 1–2) | Weak by design: only 9 slots and 9 cards seen. Critic's sim under these rules: swarm vs curve about 7–11%. Its home is Culture's wide-turn keyword (§10). |
| All one faction | No v1 keyword scales with faction count. `factionSynergyCap` is reserved for modes. Culture, the largest pool, has the weakest keyword (viral). |
| "Always play the highest-power card" | It ignores the on-topic bonus, lane capacity and the hidden Portals. Critic's sim: 18–21% against a smart bot (target < 55%). |
| Stall or pass | Passing leaves lanes to any 1-power card. Two passing players draw. |
| Mirror the AI | Hidden simultaneous commits: you only see the opponent's cards after you commit. |
| Seat or initiative | Turns are simultaneous. Initiative alternates when the game is even and goes to the leader otherwise. Target: each seat wins 48–52%. |
| Seat or initiative | Planning is simultaneous and initiative strictly alternates (each seat has it for 3 of the 6 turns). Target: each seat wins 48–52%. |
| Forged or shopped stats | They only raise cost (§1.3), the host check falls back to live stats (§1.10), and trend is capped at ±1. |
| Inflated live pageviews | Worth at most +1, and frozen at match start. |
| Inflated live pageviews | Worth at most +1, frozen at match start, and only counts for articles with ≥ 20 views a day. |
| Swinginess | No effect may change a lane by more than 6 power or move cards between lanes in v1 (a keyword-design rule for §10). |
---
@@ -235,13 +286,16 @@ The engine takes a `RulesConfig` object. Peer-hosted modes override it (§11). D
"deckSize": 12, "maxCopiesPerPage": 2, "maxLoaners": 12,
"openingHand": 3, "handLimit": 7, "mulligan": false,
"turns": 6, "turnSeconds": 25, "afkTurns": 2,
"energyByTurn": [1, 2, 3, 4, 5, 6], "bonusEnergy": 0, "underdog": true,
"topicCount": 3, "distinctStats": true, "revealSchedule": [1, 2, 3], "laneCapacity": 4,
"topicPool": "default",
"energyByTurn": [1, 2, 3, 4, 5, 6], "energyCarryMax": 1, "bonusEnergy": 0, "underdog": false,
"topicCount": 3, "distinctStats": true, "portalReveal": [2, 3, 4], "laneCapacity": 3,
"topicPool": [ /* inline Topic objects {id, name, stat, portal}; default = the 9 in §10.3 */ ],
"keywordParams": { /* per-keyword numbers, keyed by keyword id (§10) */ },
"portalParams": { /* per-Portal numbers, keyed by Topic id (§10.3) */ },
"costThresholds": [15, 35, 55, 75, 90],
"powerByCost": [0, 1, 2, 4, 5, 7, 9],
"onTopicBonus": 2,
"trendUp": 25, "trendDown": -25,
"powerByCost": [0, 1, 2, 4, 6, 8, 10],
"onTopicBonus": [0, 1, 1, 2, 2, 3, 3], "vanillaBonus": 1,
"keywordsEnabled": ["viral","rising","local","encyclopedic","nostalgic","translated"], "ownedCards": true,
"trendUp": 25, "trendDown": -25, "trendMinDaily": 20, "uncheckedCostCap": 4,
"factionSynergyCap": 3,
"verifyStats": true,
"percentiles": "card-sample-2026-11-16",
@@ -249,7 +303,6 @@ The engine takes a `RulesConfig` object. Peer-hosted modes override it (§11). D
}
```
(`energyByTurn[t-1]` replaces "energy = t" in §5 so that modes can change the ramp.)
**What modes may vary:** every key above, plus `topicPool` contents and the starter-deck lists.
**Fixed for all modes:** matches are off-chain and never move or burn NFTs; the RNG and its draw order
@@ -261,19 +314,205 @@ A mode must keep `turns × turnSeconds ≤ 240` so that matches stay within 3–
## 10. Keywords *(owner: council-designer-b)*
*To be written by council-designer-b. Constraints from the rules above:*
- one keyword per card, one word, no more than one short line of reminder text
- triggers are limited to: on reveal, ongoing, end of turn
- keywords change power only (no stealing, moving cards between lanes or removing cards in v1)
- no single effect may swing a lane by more than 6
- each faction gets a keyword pool; Culture's has the lowest synergy ceiling
- §10.3 Portals: the Topic modifiers in `topicPool`
**The v1 keyword set is these six, one per faction.** The ids are the ones engine-b already uses on `night/engine/keywords`.
Topics carry only a **stat**, never a faction. Every keyword below that mentions a Topic keys off stats or board state.
### 10.1 Which keyword a card gets
First rule that matches:
1. `cost == 1` → **no keyword** (vanilla). The card gets +`vanillaBonus` power (default **1**), so a cost-1 card is 2.
2. `"edition"` is in `keywordsEnabled` (off by default) and the deck holds another card with the same `pageId` → **edition**.
3. Otherwise → the card's **faction keyword** from 10.2, if it's in `keywordsEnabled`. If not, the card is vanilla, *without* `vanillaBonus`.
Rarity plays no part here (it's cosmetic, §1.7). Keywords don't lower power, and v1 has no per-keyword power deltas.
If sim shows that a keyword is worth more than about 1 power on average, sim-balance sets `keywordParams.<id>.powerDelta` (default 0, range −3 to 0).
### 10.2 Keyword list (v1)
| Faction | id (card word) | Trigger | Reminder text | Cap | Order-sensitive? |
|---|---|---|---|---|---|
| Culture | **viral** | On reveal | +1 power for each other card you revealed earlier this turn. | +2 | yes: your queue order |
| Nature | **rising** | End of turn | +1 power. | +2 total | no |
| People | **local** | Ongoing | +1 power while on-topic (the Topic's stat is its home stat). | +1 | no |
| Science | **encyclopedic** | On reveal | +2 power if there are no other cards here (either side). | +2 | **yes: interleaving** |
| History | **nostalgic** | On reveal | +2 power if you are losing here. | +2 | **yes: interleaving** |
| Space | **translated** | On reveal | +1 power to your most recently revealed card in each *other* Topic. | +2 | yes |
Why this set: every keyword is one line and one trigger, and only adds power. The largest swing is +2 on one card,
so no lane moves by more than 2 from a keyword. Nothing scales with faction count, so a mono-Culture deck gets no
consistency edge (`factionSynergyCap` is unused in v1). Viral is Culture's weakest keyword, and it rewards wide turns.
Three keywords (encyclopedic, nostalgic, translated) react to the interleaved reveal (§5.4), so initiative and queue order matter.
Precise rules (for engine-b):
- **On reveal** resolves the moment the card enters its Topic, and sees every card revealed before it (both players,
including earlier reveals this turn). The bonuses it grants are permanent counters.
- **Ongoing** is a condition, recalculated whenever power is read.
- **End of turn** resolves in §5.5 order: the initiative player's cards first, then Topic 1→3, then reveal order.
- **viral:** counts the owner's cards revealed earlier in *this* turn's Reveal phase, in any Topic. Cards that went back to hand don't count.
- **rising:** stops after it has gained +2 in total.
- **local:** "on-topic" is exactly the §1.4/§6 condition. It's simply an extra +1 on top of `onTopicBonus`.
- **encyclopedic:** "no other cards here" means both sides of this Topic are empty, apart from this card, when it reveals.
- **nostalgic:** "losing here" means the opponent's Topic power here is strictly greater than yours, counted just *before* this card is added.
The consensus tie-break doesn't count: a tie is not losing.
- **translated:** "most recently revealed" means the highest global reveal sequence number among your cards in that Topic. Topics where you have no card are skipped.
- No v1 keyword uses the RNG. §4's "later random events" slot stays empty in v1.
**Already in code, disabled by default (`keywordsEnabled` excludes them; for modes only):**
- **edition:** +2 for each other copy of this `pageId` on your side.
- **obscure:** the opponent sees it face down until the end of the match.
- **wildcard:** its home stat becomes the Topic's stat on reveal.
These are engine-b's existing implementations. The faction-based versions of `local` and `wildcard`, and the token version of `viral`, are
**replaced** by the definitions above.
**`keywordParams` defaults** (keyed by keyword id; modes may change them within the §11 ranges):
```json
{ "viral": {"amount": 1, "cap": 2, "powerDelta": 0}, "rising": {"amount": 1, "cap": 2, "powerDelta": 0},
"local": {"amount": 1, "powerDelta": 0}, "encyclopedic": {"amount": 2, "powerDelta": 0},
"nostalgic": {"amount": 2, "powerDelta": 0}, "translated": {"amount": 1, "powerDelta": 0},
"edition": {"amount": 2, "powerDelta": 0}, "obscure": {"powerDelta": 0}, "wildcard": {"powerDelta": 0} }
```
End-of-turn effects on the last turn resolve **before** scoring (§7).
### 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.
| Topic | Stat | Portal rule |
|---|---|---|
| Current Events | attention | – |
| 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. 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: "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.
---
## 11. Peer-hosted modes *(owner: council-designer-b)*
*To be written by council-designer-b. A mode is a named `RulesConfig` override, plus a Topic pool and
optional starter decks.*
A **mode** is data, published by a node operator and run by the match host:
```json
{
"id": "blitz", // [a-z0-9-]{3,32}, unique per host
"name": "Blitz", "description": "Four quick turns.", // ≤ 40 and ≤ 280 chars, plain text
"rules": { "turns": 4, "energyByTurn": [2, 3, 4, 5], "portalReveal": [1, 1, 2], "deckSize": 10 },
"topicPool": [ /* optional: Topic objects (10.3); default if omitted */ ],
"starterDecks": [ /* optional: lists of loaner pageIds */ ]
}
```
- `rules` is a **partial** `RulesConfig` (§9) merged over the defaults. Unknown keys are rejected.
- **Validation** (modes owns the code; these are the limits). If any check fails, the mode is refused:
| Key | Allowed |
|---|---|
| `turns` | 3–8, and `turns × turnSeconds ≤ 240` |
| `energyByTurn` | length = `turns`, each 0–10 |
| `bonusEnergy` | 0–3 |
| `portalReveal` | length = `topicCount`, each 1..`turns`, non-decreasing |
| `topicCount` | 1–5; `distinctStats` only if ≤ 3 |
| `laneCapacity` | 1–6 |
| `deckSize` | 6–20; `maxCopiesPerPage` 1–4; `maxLoaners` 0..`deckSize` |
| `openingHand` | 0–6; `handLimit` 1–10 |
| `turnSeconds` | 10–60; `afkTurns` 1–5 |
| `costThresholds` | 5 strictly ascending integers in 0–100 |
| `powerByCost` | 7 integers in 0–20, non-decreasing from index 1 |
| `onTopicBonus` (7 entries), `vanillaBonus` | 0–5 each |
| `trendUp` / `trendDown` | 0–200 / −200–0 |
| `factionSynergyCap` | 0–6 |
| `keywordsEnabled` | any subset of the 9 implemented ids (the 6 v1 defaults + edition, obscure, wildcard); a card whose keyword is disabled is vanilla, *without* `vanillaBonus` |
| `keywordParams`, `portalParams` | only the keys listed in §10 / §10.3; amounts and caps 0–6, `powerDelta` −3–0 |
| `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 |
- **Identity:** `modeHash` = SHA-256 of the canonical JSON (sorted keys, no whitespace) of the *merged* rules
plus the topicPool. A match record holds `{ modeHash, seed, both decks' CardInputs, both players' commit lists }`,
and that is enough to replay it exactly.
- **What modes can't change** is the "Fixed for all modes" list in §9. Modes also can't add keywords or Portal kinds, or
stake, move or burn NFTs.
Example modes (good defaults for operators to publish):
| Mode | Overrides | Feel |
|---|---|---|
| **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; **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)*
*To be written by council-designer-b.*
These are the §1–9 rules as of this PR:
- `powerByCost [0,1,2,4,6,8,10]`, `onTopicBonus [0,1,1,2,2,3,3]`, `vanillaBonus 1`
- `laneCapacity 3`, `energyCarryMax 1`, interleaved reveals, alternating initiative, `portalReveal [2,3,4]`
- `underdog false`, no trend arrows
The derived cards are given directly (the §1 output), so the test needs no percentile table.
Topics: **T1 Archive (depth, plain)**, **T2 Main Page (attention; Portal revealed turn 3; at scoring, each card here gets +1)**,
**T3 Translations (reach, plain; revealed turn 4)**. Ana (p0) has initiative on odd turns and Bo (p1) on even turns.
| Player | Card | Faction | Cost | Base | Home | Keyword |
|---|---|---|---|---|---|---|
| Ana | Octopus | Nature | 1 | 2 | depth | – (vanilla) |
| Ana | Moon | Space | 2 | 2 | reach | translated |
| Ana | Coral reef | Nature | 2 | 2 | depth | rising |
| Ana | Albert Einstein | People | 4 | 6 | attention | local |
| Ana | Ancient Rome | History | 5 | 8 | depth | nostalgic |
| Ana | Library of Alexandria | History | 4 | 6 | depth | nostalgic |
| Ana | Periodic table | Science | 3 | 4 | depth | encyclopedic |
| Bo | Haiku | Culture | 1 | 2 | attention | – (vanilla) |
| Bo | Mars | Space | 2 | 2 | reach | translated |
| Bo | Jazz | Culture | 2 | 2 | attention | viral |
| Bo | Pop music | Culture | 4 | 6 | attention | viral |
| Bo | Jupiter | Space | 5 | 8 | reach | translated |
| Bo | Fern | Nature | 3 | 4 | depth | rising |
| Bo | Mona Lisa | Culture | 3 | 4 | attention | viral |
Topic power is written as **Ana–Bo** after End of turn. Energy is "available / spent".
| Turn | Init | Energy Ana / Bo | Reveals, in interleaved order | T1 | T2 | T3 |
|---|---|---|---|---|---|---|
| 1 | Ana | 1/1, 1/1 | Ana Octopus → T1: 2 +1 on-topic = **3**. Bo Haiku → T2: 2+1 = **3** | 3–0 | 0–3 | 0–0 |
| 2 | Bo | 2/2, 2/0 | Bo passes (to carry 1). Ana Moon → T3: 2+1 = 3. translated: Octopus +1 → 4 | 4–0 | 0–3 | 3–0 |
| 3 | Ana | 3/2, **4**/4 | Main Page Portal revealed. Ana Coral reef → T1: 2+1 = 3. Bo Mars → T3: 2+1 = 3, translated: Haiku +1 → 4. Bo Jazz → T2: 2+1 = 3, viral (Mars earlier) +1 → 4. End: rising Coral reef → 4 | 8–0 | 0–8 | 3–3 (tie; on-topic 1–1, so no leader) |
| 4 | Bo | **5**/4, 4/4 | Bo Pop music → T3: 6 (off-topic), viral +0. Ana Einstein → T2: 6+2 on-topic, local +1 = **9**. End: rising Coral reef → 5 (cap reached) | 9–0 | 9–8 | 3–9 |
| 5 | Ana | **6**/5, 5/5 | Ana Ancient Rome → T3: 8 (off-topic). nostalgic: losing 3–9, so +2 → **10**. Bo Jupiter → T1: 8 (off-topic). translated: Jazz → 5 (T2), Pop music → 7 (T3) | 9–8 | 9–9: **Bo leads** (consensus: on-topic 1 vs 2) | 13–10 |
| 6 (last) | Bo | **7**/7, 6/6 | Bo Fern → T1: 4+2 = 6. Ana Library → T1: 6+2 = 8. nostalgic: losing 9–14, so +2 → **10**. Bo Mona Lisa → T2: 4+2 = 6, viral (Fern earlier) +1 → 7. Ana Periodic table → T2: 4 (off-topic), encyclopedic: no (cards here). End: rising Fern → 7. Scoring: Main Page +1 per card in T2 | **19–15** | **15–19** | **13–10** |
Final card values:
- **T1:**
- Ana: Octopus 4 + Coral reef 5 + Library 10 = 19.
- Bo: Jupiter 8 + Fern 7 = 15.
- **T2:** each card +1 from Main Page.
- Ana: Einstein 10 + Periodic table 5 = 15.
- Bo: Haiku 5 + Jazz 6 + Mona Lisa 8 = 19.
- **T3:**
- Ana: Moon 3 + Ancient Rome 10 = 13.
- Bo: Mars 3 + Pop music 7 = 10.
**Ana wins 2–1.** Three moments show the v1 mechanics:
- **Carry-over:** Bo passed on turn 2 to afford two plays on turn 3 (4 energy).
- **Consensus:** T2 at 9–9 after turn 5 went to Bo, who had two on-topic attention cards to Ana's one.
- **Interleaving decides the match:** on turn 6 Bo had initiative, so Fern revealed before Library. Ana was then losing T1 (9 vs 14) and nostalgic fired (+2).
If Ana had revealed first, she'd have been ahead 9–8, nostalgic would not have fired, and T1 would have been 17–15. Ana still wins that lane, but by 2 instead of 4.
**Golden test for engine-b:**
- **Inject:** the Topic order, the opening hands and the draw order directly, with each player's commit list per turn as in the table. The queue order within a turn is as listed.
- **Expected final Topic powers:** `T1 19–15, T2 15–19, T3 13–10`. Winner: p0, by 2 Topics to 1.
- **Also assert:**
- after turn 5, T2 is a 9–9 tie with Bo leading by consensus
- Ana's carried energy is 1 at the start of turns 4, 5 and 6
- Bo's carried energy is 1 at the start of turn 3