javalent / dice-roller

Inline dice rolling for Obsidian.md
274 stars 28 forks source link

D6 explode with count of results higher than 7 #350

Open dustyghost opened 1 month ago

dustyghost commented 1 month ago

Check for existing bug reports before submitting.

Expected Behavior

dice: 4d6!!>=7

Thought this would roll, explode and combine, then count results over 7, but it seems not to explode at all.

Current behaviour

4d6!!>=7 -> [4, 4, 6, 6] -> 20 4d6!!>=7 -> [6, 1, 3, 4] -> 14

**EDIT: I have just seen in the docs this is expected behaviour, see my replies below for requested outcome ***

Reproduction

Put this in an obsidian document: dice: 4d6!!>=7

Which Operating Systems are you using?

Obsidian Version Check

1.6.7

Plugin Version

11.3.2

Confirmation

Possible solution

No response

dustyghost commented 1 month ago

Sorry I have just seen in the documentation this will mean the explode will only happen to rolls >= 7 which will never be.

So how do I show a count of rolls were the explode and combine end up as >= 7 in each result?

And yep, I am a Shadowrun player. :) The rule there is roll any number of D6, on a 6 roll again that dice and add result. This can happen many times. so would love to see something like.

 [8+, 1, 3, 4] -> 1
 [8!, 1, 9!, 4] -> 2
dustyghost commented 1 month ago

Edited replies and original comment

valentine195 commented 1 month ago

You have to apply the condition to the dice, not the modifier.

So this should do what you want: `dice: 4d6>=7!!`

dustyghost commented 3 weeks ago

Hey @valentine195 thank you for your answer. is there a way to show the detail of the role on the Dice Tray? image