Lane 11 PR 5b: the D&D 5e (SRD 5.2.1) sheet and block definitions (#737) #963

Merged
claude-bot merged 5 commits from build/lane11-5b-5e into main 2026-09-30 08:24:37 +00:00
Collaborator

Lane 11 (#737) PR 5b. These are the built-in D&D 5e definitions from SRD 5.2.1 (D220), as data in PR 2's language. They add no code and no migration.

app/sheets/builtin/dnd5e/ (system key dnd5e, as in app/game_systems/):

  • character.json (126 fields):
    • Abilities and proficiency: scores become modifiers (⌊(s−10)/2⌋). Saves with proficiency; proficiency bonus = 2 + ⌊(level−1)/4⌋.
    • Skills: all 18 skills (none / proficient / expertise) and passive Perception.
    • AC: from the worn armour and the shield held (light: full Dex; medium: Dex capped at 2; heavy: no Dex), and overridable.
    • Hit points: HP = hit die + the rolled or fixed rows per level + Con × level, with the dice kept in rolls_log. Temp HP, Hit Point Dice and death saves.
    • Other combat numbers: speed, initiative and Heroic Inspiration.
    • Attacks: derived from weapons (finesse uses the better of Str and Dex; ranged uses Dex).
    • Spellcasting (when a caster): DC and attack. Full, half and pact slot tables; cantrips.
    • Conditions: exhaustion is −2 × level to d20 tests and −5 ft × level of speed. Grappled and others set speed to 0; poisoned is −5 to passive Perception.
    • XP and levels: cumulative XP (D204); levels 2–20, with an ability score improvement or feat at 4/8/12/16/19.
    • Creation generators: the standard array, point buy (27, with the SRD cost table), and 4d6 drop lowest × 6 with no re-roll.
    • Rests: a short rest spends Hit Point Dice; a long rest restores full HP and all Hit Point Dice (SRD 5.2.1).
    • Also: the 12 basic actions of 5.2.1, reminders, reveal groups, the four drawn pages, and a block.
  • creature.json (90 fields):
    • Order: the SRD 5.2.1 stat block order, with CR mapped to XP and to proficiency bonus.
    • Rows: traits, actions, bonus actions, reactions and legendary actions.
    • legacy_map: covers all 12 keys of schema_v1.json.
    • Projection: project_from.character (43 paths, each resolved by a test).
    • Also: draft_fields and reveal groups.
  • Licensing: CC BY 4.0, with the SRD 5.2.1 attribution sentence word for word (a test checks it). There's no 5etools data and no setting nouns; species use the ancestry kind. README.md lists the entry fields PR 6's adapters must write.

Fixtures (11):

  • Tam Ridley, Fighter 3, exactly as drawn:
    • scores and saves (Str +5, Con +4 proficient); proficiency bonus +2 = 2 + ⌊(3−1)/4⌋;
    • AC 18 = armour 16 + shield 2;
    • HP 31 = 10 + 2 × (d10 → 8, 7) + Con 2 × 3; hit dice 2 of 3; death saves;
    • Athletics +5, passive Perception 11; longsword +5 "1d8+3 Slashing".
  • Tam at level 4: HP 40; Str 18.
  • Others:
    • a level-1 rogue from the standard array;
    • casters: a medium-armour ranger (half caster), a full-caster cleric, a pact-magic warlock;
    • exhaustion and other conditions;
    • a monk with an AC override while grappled;
    • three creature blocks, one of them projected from Tam.

The drawing now follows the rules (lane9.html):

  • Tam's hit points: the drawing's "d10 → 6, 5" adds up to 27, but 31 appears on the sheet, the rest still and the level-up still. The label is now "d10 → 8, 7".
  • The long rest: the drawing said "half the total" (the 2014 rule); SRD 5.2.1 restores all Hit Point Dice.
  • Ossian's bulk is 4.9, not 4.6: arrows are L per 10 (PR 5a).

Tests:

  • test_dnd5e_definitions.py (29): validates clean (0 errors, 0 warnings), and every fixture passes. It also checks that the point-buy still costs exactly 27, the licence sentence, legacy_map completeness and that the projection resolves.
  • tests/sheets passes (471), ruff is clean, and changelog.py check passes.

Language gaps and what they mean (PR 2b adds label_expr and first/join):

  • AC's term can't name the armour ("Chain mail 16"), and the hit-point term can't list its rolls.
  • The level-up page enforces the cap of 20.
  • Multiclassing isn't modelled.

Changelog: changelog.d/737-lane11-5e.added.md.

🤖 Generated with Claude Code

Lane 11 (#737) PR 5b. These are the built-in D&D 5e definitions from SRD 5.2.1 (D220), as data in PR 2's language. They add no code and no migration. **`app/sheets/builtin/dnd5e/`** (system key `dnd5e`, as in `app/game_systems/`): - **`character.json`** (126 fields): - **Abilities and proficiency:** scores become modifiers (⌊(s−10)/2⌋). Saves with proficiency; proficiency bonus = 2 + ⌊(level−1)/4⌋. - **Skills:** all 18 skills (none / proficient / expertise) and passive Perception. - **AC:** from the worn armour and the shield held (light: full Dex; medium: Dex capped at 2; heavy: no Dex), and overridable. - **Hit points:** HP = hit die + the rolled or fixed rows per level + Con × level, with the dice kept in `rolls_log`. Temp HP, Hit Point Dice and death saves. - **Other combat numbers:** speed, initiative and Heroic Inspiration. - **Attacks:** derived from weapons (finesse uses the better of Str and Dex; ranged uses Dex). - **Spellcasting** (`when` a caster): DC and attack. Full, half and pact slot tables; cantrips. - **Conditions:** exhaustion is −2 × level to d20 tests and −5 ft × level of speed. Grappled and others set speed to 0; poisoned is −5 to passive Perception. - **XP and levels:** cumulative XP (D204); levels 2–20, with an ability score improvement or feat at 4/8/12/16/19. - **Creation generators:** the standard array, point buy (27, with the SRD cost table), and 4d6 drop lowest × 6 with no re-roll. - **Rests:** a short rest spends Hit Point Dice; a long rest restores full HP and **all** Hit Point Dice (SRD 5.2.1). - **Also:** the 12 basic actions of 5.2.1, reminders, reveal groups, the four drawn pages, and a block. - **`creature.json`** (90 fields): - **Order:** the SRD 5.2.1 stat block order, with CR mapped to XP and to proficiency bonus. - **Rows:** traits, actions, bonus actions, reactions and legendary actions. - **`legacy_map`:** covers all 12 keys of `schema_v1.json`. - **Projection:** `project_from.character` (43 paths, each resolved by a test). - **Also:** `draft_fields` and reveal groups. - **Licensing:** **CC BY 4.0**, with the SRD 5.2.1 attribution sentence word for word (a test checks it). There's no 5etools data and no setting nouns; species use the `ancestry` kind. `README.md` lists the entry fields PR 6's adapters must write. **Fixtures (11):** - **Tam Ridley, Fighter 3, exactly as drawn:** - scores and saves (Str +5, Con +4 proficient); proficiency bonus +2 = 2 + ⌊(3−1)/4⌋; - AC 18 = armour 16 + shield 2; - HP 31 = 10 + 2 × (d10 → 8, 7) + Con 2 × 3; hit dice 2 of 3; death saves; - Athletics +5, passive Perception 11; longsword +5 "1d8+3 Slashing". - **Tam at level 4:** HP 40; Str 18. - **Others:** - a level-1 rogue from the standard array; - casters: a medium-armour ranger (half caster), a full-caster cleric, a pact-magic warlock; - exhaustion and other conditions; - a monk with an AC override while grappled; - three creature blocks, one of them projected from Tam. **The drawing now follows the rules** (`lane9.html`): - **Tam's hit points:** the drawing's "d10 → 6, 5" adds up to 27, but 31 appears on the sheet, the rest still and the level-up still. The label is now "d10 → 8, 7". - **The long rest:** the drawing said "half the total" (the 2014 rule); SRD 5.2.1 restores **all** Hit Point Dice. - **Ossian's bulk** is 4.9, not 4.6: arrows are L per 10 (PR 5a). **Tests:** - `test_dnd5e_definitions.py` (29): validates clean (0 errors, 0 warnings), and every fixture passes. It also checks that the point-buy still costs exactly 27, the licence sentence, `legacy_map` completeness and that the projection resolves. - `tests/sheets` passes (471), ruff is clean, and `changelog.py check` passes. **Language gaps and what they mean** (PR 2b adds `label_expr` and `first`/`join`): - AC's term can't name the armour ("Chain mail 16"), and the hit-point term can't list its rolls. - The level-up page enforces the cap of 20. - Multiclassing isn't modelled. Changelog: `changelog.d/737-lane11-5e.added.md`. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
docs(prototype): drawn numbers follow the rules — Tam's HP rolls 8 and 7 (31), a long rest restores all Hit Point Dice (SRD 5.2.1), Ossian's bulk is 4.9 (#737)
All checks were successful
CI / Summarisation accuracy eval harness (stub provider) (pull_request) Successful in 1m0s
CI / Backend lint (ruff) (pull_request) Successful in 1m16s
CI / Feedback site tests (pull_request) Successful in 53s
CI / Bot tests and audit (pull_request) Successful in 2m6s
CI / Does this change touch the recording path? (pull_request) Successful in 37s
CI / Synthetic session harness (no GPU, no LLM) (pull_request) Has been skipped
CI / Bot/backend version sync (pull_request) Successful in 1m2s
CI / Docker image build (pull_request) Successful in 1m5s
CI / Frontend (shard 1/2) (pull_request) Successful in 8m38s
CI / Frontend (shard 2/2) (pull_request) Successful in 12m7s
CI / End-to-end journeys (phone) (pull_request) Successful in 8m5s
CI / End-to-end journeys (keyboard) (pull_request) Successful in 15m29s
CI / End-to-end journeys (desktop) (pull_request) Successful in 15m34s
CI / Backend migration, tests, and audit (pull_request) Successful in 19m41s
5e09ff3ba9
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Sign in to join this conversation.
No description provided.