User guide All lessons Cookbook Function reference Open playground

Filtering faces (keep, remove, convert, ignore)

At the table

Rules often treat faces differently: “only 5s and 6s can appear,” or “1–4 don’t count toward the total.” Those are face filters on each die—not the same as “total ≥ 15” from lesson 4.

Try it

Copy the script into the playground editor and click Run.

The script

output("high_die", d(6).keep(5..))
output("conditional_pool_sum", dice_pool(3, 6).keep(5..).sum())
output("ignored_pool_sum", dice_pool(3, 6).ignore(1..4).sum())

high_die · DieRoll · mean 5.500

outcome%fracX/36
550.01/218
650.01/218

conditional_pool_sum · DieRoll · mean 16.500

outcome%fracX/36
1512.51/85
1637.53/814
1737.53/814
1812.51/85

ignored_pool_sum · DieRoll · mean 5.500

outcome%fracX/36
029.68/2711
522.22/98
622.22/98
105.561/182
1111.11/94
125.561/182
150.461/2160
161.391/721
171.391/721
180.461/2160