Reference · Rolls and exact odds
PresetRolltype
A game's dice thrown and read.
Import it
import type { PresetRoll } from "@johnmorrisdotca/korokoro";
Definition
type PresetRoll = {
preset: Preset;
roll: Roll;
rolls: Roll[];
readings: PresetReading[];
reading: PresetReading;
};
Members
| Name | Type | Description |
|---|---|---|
preset | Preset | |
roll | Roll | The roll, or for a set such as ability scores, the last roll of it. |
rolls | Roll[] | Every roll thrown: one, or a set. |
readings | PresetReading[] | What the game makes of each roll, in order. |
reading | PresetReading | What the game makes of the roll: of the last, for a set. |
Examples
import type { PresetRoll } from "@johnmorrisdotca/korokoro";
import { rollPreset, seededSource } from "@johnmorrisdotca/korokoro";
const value: PresetRoll = rollPreset("cho-han", { source: seededSource("docs"), at: 0 });
console.log(value.roll.total);3What it prints (run when this page was built)