duel-core: balance v1 defaults from sim-balance (#64): secondPlayerCitations 1, turnCap 40

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-18 00:12:25 -05:00
co-authored by Claude Opus 5.5
parent 4623930e8f
commit 0eb80d23d7
5 changed files with 9 additions and 8 deletions
+2 -2
View File
@@ -55,13 +55,13 @@ Built by duel-cards (`derive()`), frozen by the host at match start. Shape agree
## Rules (defaults: `DEFAULT_DUEL_RULESET`; details in DUEL_DESIGN §2)
- 40-card decks (`deckSize`), ≤ 4 per `pageId`, unique `cardId`s, no tokens. 20 Notability. Drawing from an empty library loses (`libraryEmpty: 'lose'`; `'reshuffle'` and `'fatigue'` exist as data).
- Opening hand 7. Up to `mulligans` (1): shuffle in, draw 7, then on `keep` put one card per mulligan on the bottom (the last in hand order). Seat 0 decides first, then seat 1.
- First player (from the seed) skips their first draw. Balance levers (data only): `firstPlayerDraws`, and `secondPlayerCitations` (extra Citations on the second player's first turn, default 0).
- First player (from the seed) skips their first draw. Balance levers (data only): `firstPlayerDraws`, and `secondPlayerCitations` (extra Citations on the second player's first turn; default 1 from balance v1, #64).
- **Turn:** refresh (base max +1 to 10, plus Territory ≤ 2; refill; untap; Pending review ends; Stub and `startOfTurn` triggers) → draw → **main** → **attack** → **block** → damage → end (damage and "until end of turn" clear; discard down to `handSize` 7, **highest cost first**, automatically).
- Locations: `locationsPerTurn` (1), can't attack. Garrison Locations (toughness > 0) block as 0-power.
- Combat: attack the opponent only; each blocker blocks one attacker, at most one blocker per attacker; simultaneous damage; destroy triggers after all combat damage. No trample, first strike, stack or instants.
- **Connected** (engine, from `connect`, tiers in `connectedTiers`): Linked (either `links` contains the other's `pageId`, or either `cites` contains the other's `qid`), Compatriot (shared country), Contemporary (shared century, different types), Kin (shared P31, not Q5/Q16521). A Figure gets the single best bonus among other permanents its controller controls: `+linkedBonus` (2) if Linked, else `+connectedBonus` (1). Logged once (`connected`). Opposing Connected pairs are logged once as `rivalry`.
- **Timeouts:** `timeout` passes (mulligan: keep; main/attack: end the turn without attacking; block: confirm current blocks). `timeoutsToConcede` (3) consecutive timeouts by one seat lose (`reason: 'timeout'`).
- `turnCap` (null by default): after that many total turns, higher Notability wins, then higher total power in play, then the second player.
- `turnCap` (default 40 total turns from balance v1, #64; `null` = none): after that many total turns, higher Notability wins, then higher total power in play, then the second player.
## Phases and actions
| Phase | Who acts | Listed actions |
+2 -2
View File
@@ -47,7 +47,7 @@ export const DEFAULT_DUEL_RULESET: DuelRuleset = Object.freeze({
handSize: 7,
mulligans: 1,
firstPlayerDraws: false,
secondPlayerCitations: 0,
secondPlayerCitations: 1, // balance v1 (#64): first player 60.1% → 54.7%
maxCitations: 10,
citationsPerTurn: 1,
territoryCap: 2,
@@ -62,7 +62,7 @@ export const DEFAULT_DUEL_RULESET: DuelRuleset = Object.freeze({
turnSeconds: 60,
bankSeconds: 300,
timeoutsToConcede: 3,
turnCap: null,
turnCap: 40, // balance v1 (#64): 3.9% of games decided at the cap
}) as DuelRuleset;
/** Validate a full ruleset. Throws (ZodError) on anything invalid or unknown. */
+2 -2
View File
@@ -166,7 +166,7 @@ export interface DuelRuleset {
handSize: number; // 7: hand limit at end of turn (DUEL_DESIGN `handLimit`); excess discarded highest cost first
mulligans: number; // 1: shuffle, draw openingHand, bottom one per mulligan taken
firstPlayerDraws: boolean; // false
secondPlayerCitations: number; // 0: extra Citations on the second player's first turn (designer's "Second Opinion" lever)
secondPlayerCitations: number; // 1 (balance v1): extra Citations on the second player's first turn (designer's "Second Opinion" lever)
maxCitations: number; // 10
citationsPerTurn: number; // 1
territoryCap: number; // 2
@@ -181,7 +181,7 @@ export interface DuelRuleset {
turnSeconds: number; // 60
bankSeconds: number; // 300
timeoutsToConcede: number; // 3 consecutive timeouts lose
/** Optional: after this many turns in total, higher Notability wins, then higher power in play, then the second player. */
/** 40 (balance v1); null = none. After this many turns in total, higher Notability wins, then higher power in play, then the second player. */
turnCap: number | null;
}
+1 -1
View File
@@ -206,4 +206,4 @@ test('golden match', () => {
});
// Regenerate deliberately (an engine rule change) and say so in the PR.
const GOLDEN = { actions: 60, turn: 11, result: { winner: 1, reason: 'life' }, log: 83, digest: '4f4296d6951a616b' };
const GOLDEN = { actions: 72, turn: 13, result: { winner: 1, reason: 'life' }, log: 103, digest: 'e8bc8630d6f0ab0a' };
+2 -1
View File
@@ -15,7 +15,8 @@ test('duel default ruleset matches the BRIEF', () => {
assert.equal(rules.firstPlayerDraws, false);
assert.equal(rules.turnSeconds, 60);
assert.equal(rules.bankSeconds, 300);
assert.equal(rules.turnCap, null);
assert.equal(rules.turnCap, 40, 'balance v1 (#64)');
assert.equal(rules.secondPlayerCitations, 1, 'balance v1 (#64)');
assert.equal(rules.territoryCap, 2);
});