mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
Labels
No labels
android
bug
bugfix
ci
client
code freeze pause
container
dependencies
docs
documentation
duplicate
enhancement
feature
feature
feature
feature-creep
fixed-in-refactor
fixed-in-staging
good first issue
help wanted
in-pr
in-pr
needs-codeowner-decision
normal-scope
old-codebase
old-codebase
pull-request
qol
question
refactor
regression
revisit later
roadmap
scope-risk
scope-risk
server
server
shared
soup
upstream
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Engine#8634
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/8495
Author: @kolacheee
Created: 10/30/2026
Status: ✅ Merged
Merged: 10/30/2026
Merged by: @kolacheee
Base:
staging← Head:claude/project-thread-mhcusi📝 Commits (5)
a242e59Let dice callers pass their own roller40ae448Roll every plain die with the secure roller2f37c76Read the roll macro and narration dice with the shared grammard8bcad2Keep the macros doc's table layout as it was35332e7Keep near-limit roll macros literal and pin the secure die in tests📊 Changes
11 files changed (+215 additions, -67 deletions)
View changed files
📝
docs/prompts/macros.md(+1 -1)📝
packages/client/src/components/game/game-narration-format.ts(+16 -13)📝
packages/server/src/services/game/dice-rng.ts(+8 -23)📝
packages/server/src/services/game/skill-check.service.ts(+3 -4)📝
packages/shared/src/utils/dice-notation.ts(+47 -9)📝
packages/shared/src/utils/macro-engine.ts(+15 -8)📝
scripts/regressions/combat-conditions.regression.ts(+12 -0)📝
scripts/regressions/dice-notation.regression.ts(+59 -9)📝
scripts/regressions/game-tool-controls.regression.ts(+11 -0)📝
scripts/regressions/prompt.regression.ts(+31 -0)📝
scripts/regressions/roleplay-commands.regression.ts(+12 -0)📄 Description
Linked issue
Part of #8489 (steps 1 to 3 of the plan in this comment). Extension dice formats and ruleset combat follow in later PRs.
Why this change
Dice were rolled by several separate generators and read by several separate parsers, so the same notation could roll differently depending on where it was typed. This gives every roller one shape, lets the code that reads a roll take its dice from whoever calls it, puts the plain rolls on the same fair die, and puts the roll macro on the same grammar. Ruleset fights keep their seeded stream, because the shared code now takes a roller passed in by the caller.
What changed
/roll, composer dice, theroll_dicetool, multiplayer/roll, legacy combat, encounters and the skill-check d20 now roll with the same secure die as the dice pool and one-request dice (Web Crypto, in both the browser and the server), notMath.random(). Results look the same to players.{{roll:}}accepts the same notation as/roll, so{{roll:d20}}and{{roll:1d8+3}}now roll; before, they stayed as literal text. Its randomness is unchanged: a chat with a message seed still rolls the same faces it always did, an unseeded one still usesMath.random(), and its own looser count and face limits (and{{roll:0d6}}→ "0") stay as they were.[dice: ...]badge in Game Mode narration reads its notation with the shared grammar (it matches exactly the same text as before).DieRollerlives in@marinara-engine/shared,rollParsedDice(parsed, roll?)takes a roller, and the server'sdice-rng.tsre-exports the sharedrollDieSecurely.Validation
pnpm checkpasses locallyCONTRIBUTING.mdRegressions run locally and passing: dice-notation (new roller and secure-die cases), prompt (new seeded
{{roll:}}face check, the new notation forms and the exact-total edge), dice-display, game-dice-commands, game-mode-dice-tool, game-text-dice, gm-skill-check-resolution, one-request-dice-gate/branch/pool/placeholders, game-ruleset-dice-pool, assembler-macro-budget, capability-gm-verbs, combat-conditions, roleplay-commands, game-tool-controls. Server, shared and client lint and type checks pass.Manual verification notes
/roll 2d6+3and/rollin a chat still post a roll card with sensible faces.{{roll:d20}}and{{roll:1d8+3}}in a message resolve to numbers in range.[dice: 1d20 = 14]record still shows the dice badge.Docs and release impact
docs-i18nbranch updated to match, or a[docs-i18n]follow-up issue opened (see CONTRIBUTING.md § Translated documentation)docs/prompts/macros.mdgains one sentence about the{{roll:}}forms; it is added to the docs-i18n catch-up issue #7512.UI evidence (if applicable)
No visual change.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.