Skip to the content

Korokoroコロコロ

Roll mixed dice or type notation, compare exact probabilities, keep a history and replay seeded rolls.

Korokoro describes something small rolling in Japanese. About the name

Contents

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

NameTypeDescription
presetPreset
rollRoll

The roll, or for a set such as ability scores, the last roll of it.

rollsRoll[]

Every roll thrown: one, or a set.

readingsPresetReading[]

What the game makes of each roll, in order.

readingPresetReading

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);
3

What it prints (run when this page was built)

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/korokoro 1.16.0.