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

NotationOptionstype

How to read a notation.

Import it

import type { NotationOptions } from "@johnmorrisdotca/korokoro";

Definition

type NotationOptions = {
    legacyReroll?: boolean;
    maxDice?: number;
};

Members

NameTypeDescription
legacyReroll (optional)boolean | undefined

Read r< as 1.2.0 and 1.3.0 wrote it: reroll once. For text kept from those versions, such as an old shared link.

maxDice (optional)number | undefined

The most dice the roll may have, from 10 (the default) to MAX_DICE_BY_CODE. Past ten, every kind has to be plain dice, all added or one kept.

Examples

import type { NotationOptions } from "@johnmorrisdotca/korokoro";
const value: NotationOptions = { legacyReroll: true, maxDice: 20 };
console.log(value.legacyReroll);
true

What it prints (run when this page was built)

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