Reference · Rolls and exact odds
mayRerollUntilfunction
Whether a die may be rerolled until it clears this face: the reroll must match the lowest face and no more than half of them.
Import it
import { mayRerollUntil } from "@johnmorrisdotca/korokoro";
Definition
function mayRerollUntil(sides: Sides, reroll: unknown): reroll is number
Parameters
| Name | Type | Description |
|---|---|---|
sides | Sides | A numbered die size or F for Fate dice. |
reroll | unknown | The highest face eligible for a reroll. |
Returns
boolean
Whether a die may be rerolled until it clears this face: the reroll must match the lowest face and no more than half of them.
Examples
import { mayRerollUntil } from "@johnmorrisdotca/korokoro";
console.log(mayRerollUntil(6, 2), mayRerollUntil(6, 4));true falseWhat it prints (run when this page was built)