From ae2805067a4a561bf8df9fe6a77d0aa90150487e Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 18 Nov 2026 00:56:33 -0500 Subject: [PATCH] HOSTING.md: duel card typing (identity vs on-chain fallback) and the clock --- docs/game/HOSTING.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/game/HOSTING.md b/docs/game/HOSTING.md index 8c2713b..49aa7a3 100644 --- a/docs/game/HOSTING.md +++ b/docs/game/HOSTING.md @@ -56,6 +56,8 @@ a file, a URL, a script or a function. - **Quick match:** `POST /modes/:id/quick` joins the oldest open public lobby someone else opened (`matched: true`), or opens one (`matched: false`) to poll. - **Polling:** every lobby view has a `version`. `GET /lobbies/:id?v=` answers **204** while nothing changed. Poll; never hold requests open (the node caps concurrent `/api` requests). - **Ladder:** `GET /modes/:id/ladder` (same as `/leaderboard`): entries carry `rating` (Elo, or null if unrated) plus W/L/D. +- **Duel cards:** `server/game/duel-binding.ts` `toDuelCard` is the one path from an owned NFT to a duel card, for matches and for `GET /api/game/collection` card faces. It uses the frozen card identity (`/card-identity.sqlite`, testnet-ops' pre-bake) when present. Otherwise it types the card from what its block carries (the extract's first sentence, then the mint-time category), with no fetch. So a card's *collection* type can change **once**, when its identity is first frozen. Matches never change: the record stores the derived cards. Run the identity pre-bake before opening a node to PvP. +- **Clock:** duel turns get `turnSeconds` (+5 s grace) plus a per-seat `bankSeconds` bank; seat views carry `clock: {turnStartedAt, turnMs, bankMs}`. - **Records:** `GET /matches/:id` has the seed, rules, both decks (as the engine cards), every action, `engine`, `rated`, and for constructed modes `tokens` (the NFT ids each seat played), so the recap can replay the match. ## 2. Running your own modes