reroll {dndR}R Documentation

Re-Roll 1s from a Prior Dice Roll

Description

Re-rolls only the dice that "landed on" 1 from a prior use of 'roll'. Retains other dice results from the first roll but replaces the ones.

Usage

reroll(dice_faces, first_result = NULL)

Arguments

dice_faces

(numeric) number of faces on the die/dice to re-roll

first_result

(numeric) vector of original dice results (including 1s to reroll)

Value

(numeric) vector of non-1 original dice results with re-rolled dice results appended

Examples

# Re-roll ones from a prior result
reroll(dice_faces = 8, first_result = c(1, 3, 1))


[Package dndR version 2.0.0 Index]