From 19068933ebd1ce3a3703375de94bb68606f9dc2c Mon Sep 17 00:00:00 2001 From: Developer Date: Fri, 30 Oct 2026 10:42:36 -0500 Subject: [PATCH 1/2] feat: the formula box on a roll's ADD and AGAINST and a rest's amounts: words, the sample rolling its stat, dice as least to most, fixes, shapes (formula box 2) --- CHANGELOG.md | 10 ++ README.md | 10 +- .../system_builder_formula_preview.test.js | 50 ++++++++++ backend/systemBuilder/formulaPreview.js | 79 +++++++++++++--- backend/systemBuilder/tierRolls.js | 2 +- e2e/COVERAGE.md | 2 +- e2e/README.md | 2 +- e2e/tests/builder-formula-box.spec.ts | 55 +++++++++++ frontend/src/components/GraphPanel.tsx | 2 +- frontend/src/components/RestsPage.tsx | 90 ++++++++++-------- frontend/src/components/RollsTab.tsx | 29 ++++-- .../hooks/__tests__/useFormulaBox.test.tsx | 47 +++++++++- frontend/src/hooks/useFormulaBox.tsx | 52 +++++++--- .../src/sheets/__tests__/formulaBox.test.ts | 39 ++++++++ frontend/src/sheets/builderHelp.ts | 6 +- frontend/src/sheets/formulaBox.ts | 94 +++++++++++++++---- frontend/src/sheets/systemsApi.ts | 2 +- 17 files changed, 465 insertions(+), 106 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 59f23c32..caf02433 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -53,6 +53,16 @@ Format follows [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ### Added +- **The formula box on ROLLS and RESTS.** A roll's ADD and AGAINST, and a rest's refill amounts, + now get the same box as CHOICES. A line under each says it in words with what it comes to for + the sample character: "against your rolled stat · sample, rolling Strength, rolled stat 16: + target 16", "1d8 + CON modifier · sample CON modifier 2: 3 to 10". A roll's box rolls the first + stat in ROLLED BY. Dice in a rest are said as the least and most they can come to. A misspelt + name shows in red with a fix (`@thsi` offers USE @this). A typo in ADD or AGAINST used to count + as 0 at the table without a word. The formula button writes common ones for you: THE STAT + ROLLED and ITS MODIFIER on a roll, DICE and DICE AND A STAT on a rest (pick how many, which die + and which stat or formula). INSERT lists what each box can read, the stat being rolled first on + a roll. - **Subclasses follow their class's level.** A list a feature opens, like Fighter's Martial Archetype opening the archetypes at 3, now takes the level of the pick that opened it. Champion's features get AT LEVEL on CHOICES, grouped by level, and unlock by the Fighter's level: Improved diff --git a/README.md b/README.md index f87bf9df..06b07701 100644 --- a/README.md +++ b/README.md @@ -449,7 +449,7 @@ CITY_NET/ │ │ ├── choices.js # A system's choices (7a1a; approved mockup builder-choices, 2026-10-27): the lists a character picks from (classes, backgrounds, feats), each named one and many, picked once, so many times or any, levelled or not, and MORE THAN ONCE for multiclassing; options with an optional requirement (a formula) and features, each unlocking at a level in a levelled list and doing any of: modifiers on a stat, formula or health field, uses refilled by a rest, rolls it gives, a change it lets a roll take, another list to pick from, or only words. Option and feature ids share one set; an option's level is read as @