Repository navigation
feat: report reroll, explosion and drop counts for a roll - #14
Merged
Merged
Conversation
Capture the design for exposing how many dice were rerolled, added by explosions, or dropped by keep/drop limits (issue #10). Rerolls count every reroll, compounded explosions count each feeding explosion, and a penetrating die elided at zero is not counted. Includes how the counters aggregate and how the website should surface them. 💘 Generated with Crush Assisted-by: Crush:deepseek-v4.1-flash
The result now records how many rerolls a roll performed, so callers can tell how much work the expression did beyond the surviving dice. 💘 Generated with Crush Assisted-by: Crush:deepseek-v4.1-flash
The result now records how many explosions contributed a die: each extra exploding or penetrating die, and each explosion feeding a compound. A penetrating die elided at zero contributes nothing and is not counted. 💘 Generated with Crush Assisted-by: Crush:deepseek-v4.1-flash
Keep/drop limits now record how many dice they removed, for both dice terms and groups. 💘 Generated with Crush Assisted-by: Crush:deepseek-v4.1-flash
Binary combinations and groups now add up the reroll, explosion and drop counts of their operands, so the top-level result reflects the whole expression including nested groups. 💘 Generated with Crush Assisted-by: Crush:deepseek-v4.1-flash
Locks in that events from a dynamic die's side expression (rerolls, explosions, drops) do not appear in the outer result's counts. 💘 Generated with Crush Assisted-by: Crush:deepseek-v4.1-flash
The wasm response now carries the roll counts and flags for whether the expression contains each modifier, and the result card shows a stats line only when a modifier is present. A modifier that is present but did not fire is shown as zero. 💘 Generated with Crush Assisted-by: Crush:deepseek-v4.1-flash
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Resultnow reports how many dice were rerolled, added by explosions, or dropped by keep/drop limits. Counters aggregate across the whole expression (including nested groups) and exclude events from dynamic die face calculations.!/!pdie and each explosion feeding a!!compound); a penetrating die elided at zero contributes nothing and is not counted.0when a present modifier did not fire (e.g.4d6!with no sixes).Adds
counts_test.go, engine coverage, updates the design spec/plan, and rebuilds the wasm bundle.Fixes #10
💘 Generated with Crush