Meet or beat a target
At the table
You roll 2d10 with a +3 bonus and need a total of 15 or higher to succeed. You want one number: how often that happens.
Try it
In the playground, open this lesson in the playground and click Run (or press Shift+Enter).
The script
↗roll = 2d10 + 3
output("p_at_least_15", roll.p_ge(15))
p_ge(15)is the probability the roll is ≥ 15 (meet or beat the target).- The output is a single probability, not a full table.
Reading the result
In the text tab, a line like output p_at_least_15: P=0.… is your success chance (between 0 and 1).
Try this
- Change
15to your game’s difficulty class and run again. - Change the
3modifier and run again.
This lesson is about the total after the roll. Pool games (“any die shows a 1”) use p_any on a DicePool in lesson 9.
Builtin details: function reference.
p_at_least_15 · Prob
| outcome | % | frac | X |
|---|---|---|---|
| p_at_least_15 | 45.0 | 9/20 | 0.450 |