Reference · Rolls and exact odds
mayRerollfunction
Whether a reroll at this face leaves something to do: it must reroll the lowest face and spare the highest.
Import it
import { mayReroll } from "@johnmorrisdotca/korokoro";
Definition
function mayReroll(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 reroll at this face leaves something to do: it must reroll the lowest face and spare the highest.
Examples
import { mayReroll } from "@johnmorrisdotca/korokoro";
console.log(mayReroll(6, 2), mayReroll(6, 6));true falseWhat it prints (run when this page was built)