Reference · Rolls and exact odds
mayExplodefunction
Whether the dice may explode: numbered dice of a hundred sides or fewer, all of them kept. A custom die never does.
Import it
import { mayExplode } from "@johnmorrisdotca/korokoro";
Definition
function mayExplode(sides: Sides, keep: Keep): boolean
Parameters
| Name | Type | Description |
|---|---|---|
sides | Sides | A numbered die size or F for Fate dice. |
keep | Keep | Whether all dice, the highest or the lowest count. |
Returns
boolean
Whether the dice may explode: numbered dice of a hundred sides or fewer, all of them kept. A custom die never does.
Examples
import { mayExplode } from "@johnmorrisdotca/korokoro";
console.log(mayExplode(6, "all"), mayExplode(1000, "all"));true falseWhat it prints (run when this page was built)