module Rolling.PBTA20 (roll) where import Rolling.Common roll :: Int -> Prob Result roll m = normalize $ do a <- die 20 let r = a + m return (if r < 10 then Failure else if r < 16 then Partial else Success)