powered by
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.
reroll(dice_faces, first_result = NULL)
(numeric) vector of non-1 original dice results with re-rolled dice results appended
(numeric) number of sides on the die to be rerolled (i.e., type of dice without the "d" found in the `roll` function)
(numeric) vector of original dice results (including 1s to reroll)
# Re-roll ones from a prior result dndR::reroll(dice_faces = 8, first_result = c(1, 3, 1))
Run the code above in your browser using DataLab