Reference · Rolls and exact odds
CustomFacetype
One face of a custom die: what it says, what it is worth in a total if it is worth anything, and a colour for it. The words are text and only ever shown as text.
Import it
import type { CustomFace } from "@johnmorrisdotca/korokoro";
Definition
type CustomFace = {
label: string;
value?: number;
colour?: string;
};
Members
| Name | Type | Description |
|---|---|---|
label | string | What the face says: 1 to |
value (optional) | number | undefined | What it adds to a total. Left out of a face that is only words, which adds nothing. |
colour (optional) | string | undefined | A colour for the face, as |
Examples
import type { CustomFace } from "@johnmorrisdotca/korokoro";
const value: CustomFace = { label: "Hit", value: 1, colour: "#2f5d4a" };
console.log(value.label);HitWhat it prints (run when this page was built)