Skip to content

@dice-roller/rpg-dice-roller / modifiers / reRollHandler

Variable: reRollHandler ​

const reRollHandler: ModifierHandler<ReRollNode>

Defined in: src/modifiers/handlers/re-roll.ts:18

r, ro: re-rolls rolls that match the compare point (the die's min by default), replacing the value (the initial value is kept).

r repeats until the roll no longer matches (up to ctx.limits.maxIterations per roll, default 1000, flag re-roll); the final value can still match at the limit. ro re-rolls once (flag re-roll-once).

Throws ​

the pool die or rollDie is missing, or the die can only roll one value, even if no roll matches

MIT Licensed · Credits