Part of #942
Phase 1: Core roll and degrees of success
Updated 2026-03-24: Game packages now use .randsum.json specs + codegen, not standalone TypeScript packages. See existing games in packages/games/ for the pattern.
Scope
Implement the PF2e core roll mechanic: 1d20 + modifier vs DC, with full degrees of success including the natural 1/20 shift rule.
Acceptance Criteria
Mechanics Reference
- Beat DC by 10+: Critical Success
- Meet or beat DC: Success
- Miss DC by 1-9: Failure
- Miss DC by 10+: Critical Failure
- Natural 20: shift result one step up
- Natural 1: shift result one step down
- Shifts are clamped
Out of Scope
Part of #942
Phase 1: Core roll and degrees of success
Scope
Implement the PF2e core roll mechanic: 1d20 + modifier vs DC, with full degrees of success including the natural 1/20 shift rule.
Acceptance Criteria
pf2e.randsum.jsonspec inpackages/games/expressing 1d20 + modifier vs DCsrc/pf2e.generated.ts— accessible viaimport { roll } from '@randsum/games/pf2e'DegreeOfSuccessresult values:CRITICAL_SUCCESS,SUCCESS,FAILURE,CRITICAL_FAILUREMechanics Reference
Out of Scope