Reference · Rolls and exact odds
isPlainDicefunction
Whether a kind of dice is plain enough to be rolled in any number: a fair numbered or Fate die, all added or one kept, under no other rule.
Import it
import { isPlainDice } from "@johnmorrisdotca/korokoro";
Definition
function isPlainDice(g: DiceGroup): boolean
Parameters
| Name | Type | Description |
|---|---|---|
g | DiceGroup | One kind of dice and its rules. |
Returns
boolean
Whether a kind of dice is plain enough to be rolled in any number: a fair numbered or Fate die, all added or one kept, under no other rule.
Examples
import { isPlainDice } from "@johnmorrisdotca/korokoro";
import { normalizeSpec } from "@johnmorrisdotca/korokoro";
const spec = normalizeSpec({ count: 2, sides: 6 });
console.log(isPlainDice(spec));trueWhat it prints (run when this page was built)