mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #6418] [MERGED] Support situational modifiers and DC in Roleplay dice commands #7169
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#7169
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/6418
Author: @SpicyMarinara
Created: 9/20/2026
Status: ✅ Merged
Merged: 9/20/2026
Merged by: @SpicyMarinara
Base:
staging← Head:codex/roleplay-roll-modifiers📝 Commits (2)
c924b2achore: start roleplay roll modifiers and DC (#6417)ca2c9e1feat(roleplay): support situational roll modifiers and DC (#6417)📊 Changes
12 files changed (+186 additions, -24 deletions)
View changed files
📝
CHANGELOG.md(+2 -0)📝
e2e/roleplay-commands.e2e.ts(+41 -16)📝
packages/client/src/components/dice/AnimatedDiceRoll.tsx(+10 -1)📝
packages/client/src/lib/dice-roll-result.ts(+2 -1)📝
packages/server/src/routes/generate.routes.ts(+4 -0)📝
packages/server/src/services/game/dice.service.ts(+3 -1)📝
packages/server/src/services/generation/roleplay-commands.ts(+9 -1)📝
packages/server/src/services/tools/tool-executor.ts(+12 -2)📝
packages/shared/src/features/function-calls/tools/roll-dice/manifest.ts(+13 -0)📝
packages/shared/src/types/game.ts(+2 -0)📝
packages/shared/src/types/roleplay-command.ts(+9 -1)📝
scripts/regressions/roleplay-commands.regression.ts(+79 -1)📄 Description
Linked issue
Closes #6417
Why this change
Roleplay can now account for helpful equipment or adverse conditions and declare the difficulty before rolling. For example, the Narrator can roll for Mari with
modifier: 2for a lockpick ormodifier: -2for a downpour, plus an optionaldc.What changed
modifieranddcto the existingroll_diceJSON schema and textual Roleplay command. Reuse the executor to add the situational adjustment once, alongside notation and automatic attribute bonuses, and return whether the total meets the DC.Validation
Passed locally:
pnpm install,pnpm check(including localization and production build),pnpm regression:prompt, and the Roleplay command, dice notation, Game dice tool, and dice display regressions. The production Docker image built and served both/api/healthand the frontend successfully.The focused browser matrix passed all 12 cases across desktop Chromium, mobile Chromium, and mobile WebKit, with light/dark display, native/textual commands, Narrator targeting both persona formats, saved command/result fields, reload and translation-only rendering. Screenshots were inspected for DC readability and card fit. These flows use a local scripted provider with the real Engine API, stream, random dice and persistence; they do not claim external-model or physical-phone testing.
Local CodeRabbit review completed. Its one trivial suggestion concerned the pre-existing fallback from a nonnumeric result modifier to zero in
parseRollDiceToolResult. That behavior is unchanged, the executor emits a numeric modifier, and changing legacy result parsing is outside this feature; the new optional DC is strictly validated. No substantive findings remain.pnpm checkpasses locallyCONTRIBUTING.mdManual verification notes
Claim boundary
Prompt/tool request shaping and persisted optional result fields are the risk boundary. Deterministic tests fix only the random face and exercise positive/negative/zero adjustments, assigned attributes, notation bonuses, participants without stats, equality at the DC, failure below it, omitted fields, malformed values, and unsafe totals. Browser assertions check the model's real tool result against the saved result and displayed total. No storage migration is needed.
Docs and release impact
User-focused Unreleased changelog entry added. No version bump, install/update change, or user-guide edits.
docs-i18nbranch updated to match, or a[docs-i18n]follow-up issue openedUI evidence (if applicable)
Proof, screenshots and logs. The before image is the actual staging dice card from #6396's proof; after images are from this PR's passing run.
Summary by CodeRabbit
New Features
Bug Fixes
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.