How to use the rpg function from chance

Find comprehensive JavaScript chance.rpg code examples handpicked from public code repositorys.

19
20
21
22
23
24
25
26
27
28
//ability score focused on for blurb display
const [abilityOnFocus, setAbilityOnFocus] = useState<string>(!props.pageData.hasRolledScores ? '' : 'str')

const rollAbilityScores = () => {

    const randAbilityScore = () =>  chance.rpg(`3d6`, {sum: true});

    let newScores: AbilityScores = {
        str: randAbilityScore(),
        dex: randAbilityScore(),
fork icon0
star icon0
watch icon1

+ 5 other calls in file