Reference · Rolls and exact odds
DiceSettype
A set of dice with a name: a roll somebody wants to find again, such as
"Longsword" for 1d8+3 or "Skirmish" for 2d[Hit=1,Miss=0,Miss=0]. It is
kept as notation, so it holds custom and loaded dice as readily as plain
ones, and is as easy to share as to keep. Sets live on the device, in the
browser's storage: there is no account and no server.
Import it
import type { DiceSet } from "@johnmorrisdotca/korokoro";
Definition
type DiceSet = {
name: string;
notation: string;
};
Members
| Name | Type | Description |
|---|---|---|
name | string | What the set is called: 1 to |
notation | string | The dice, as notation in its one canonical spelling. |
Examples
import type { DiceSet } from "@johnmorrisdotca/korokoro";
import { makeSet } from "@johnmorrisdotca/korokoro";
const value: DiceSet = makeSet("Longsword", "1d8+3")!;
console.log(value.notation);1d8+3What it prints (run when this page was built)