V1.26.0: dice that tumble, rolled by the server, seen by the DM

- Each die is drawn as its own shape, tumbles in and lands on its result;
  a natural 20 glows, a natural 1 shakes; respects reduced motion
- In a campaign the server makes every digital roll and keeps it
- The DM sees each roll as it lands: an "Everyone's rolls" tab in the
  roller, a pop-up beside the dice button, and a list on the encounter page
- Players see everyone's rolls or only their own, by the campaign setting;
  the DM can roll hidden
- Physical dice are typed in, one box per die, and checked; with "both",
  each person chooses in the roller
- game/dice.js: parsing, rolling, checking typed dice, critical damage

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-12 08:46:22 +02:00
co-authored by Claude Opus 5.5
parent c3f2b0dfa7
commit 8811f14732
22 changed files with 1345 additions and 167 deletions
+32 -9
View File
@@ -862,9 +862,11 @@ calculations but is only ever set if the DM supplies it during step 5.
### Rolling from the sheet
Numbers with a dotted underline roll when clicked. The dice roller opens with
the result under a label saying what it was ("Aria: Stealth"), the die that
came up, the bonus and the total. A natural 20 or 1 is called out.
Numbers with a dotted underline roll when clicked. The dice roller opens
under a label saying what the roll is ("Aria: Stealth"): the dice tumble in,
each drawn as its own shape (a d4's triangle, a d20's hexagon…), land on what
they rolled, and the total follows with the bonus. A natural 20 glows and a
natural 1 shakes.
| Click | Rolls |
|---|---|
@@ -883,10 +885,30 @@ came up, the bonus and the total. A natural 20 or 1 is called out.
- **Advantage and disadvantage.** The roller has Disadv. / Normal / Adv.
buttons. Whichever is lit applies to every d20 rolled until it is changed:
two d20s are rolled and the higher or lower kept, and both are shown.
- A roll is made in the browser of whoever clicked. It is not sent to the
server, nobody else sees it, and it changes nothing: a damage roll is not
applied, a spell slot is not spent, and an initiative roll still has to be
typed into its field.
- **The server rolls.** In a campaign every digital roll is made by the
server, never by the browser, and is kept. A roll changes nothing by
itself: a damage roll is not applied, a spell slot is not spent, and an
initiative roll still has to be typed into its field.
- **The DM sees every roll.** Each roll is announced to the table as it is
made. The roller's second tab ("Everyone's rolls" for the DM, "Table" for a
player) lists them, newest first: who rolled, what for, the dice as they
fell, the total, and whether it was a natural 20 or 1, rolled with
advantage, or rolled with real dice. Somebody else's roll also pops up
beside the dice button for a few seconds as it lands, and an encounter page
has the same list in its side column for the DM. What a **player** sees
follows the campaign's "Who sees a roll" setting: everyone's rolls, or only
their own.
- **Hidden rolls.** The DM can tick "🙈 Roll hidden" in the roller: such a
roll is the DM's alone, whatever the setting.
- **Real dice.** The campaign's "Dice at this table" setting decides how a
roll is made. *Digital*: the app rolls. *Physical*: the roller asks for the
dice to be rolled at the table and typed in, one box per die (both d20s
with advantage or disadvantage), and the server checks each value is on its
die. *Both*: the app rolls unless the roller's "🎯 I roll real dice" is
ticked, which each person chooses for themselves. A typed-in roll is marked
"at the table" in the list.
- Rolls are kept for two weeks. Outside a campaign (nothing opened yet) the
roller still works, rolling in the browser and showing nobody.
- Of dice written with more after them ("2d8+3 fire") the dice are rolled.
Text that does not start with dice (a DM may type anything as an item's or
a spell's dice) is shown as plain text.
@@ -900,8 +922,9 @@ advantage or disadvantage; untick anyone who is not rolling. Each character
gets their own d20 and their own bonus, and with a DC each is marked "made it"
or "failed", with how many made it and whether a group check (at least half)
succeeds. On the party overview it offers every finished character who is not
dead; in an encounter, the characters in it who are still up. These rolls are
the DM's own, like any other: the players do not see them.
dead; in an encounter, the characters in it who are still up. These are the
DM's own quick rolls, made on the DM's page: they are not in the table's list
and the players do not see them.
## 10. Gear pools, starting options and gear levels