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

rulesTextfunction

The modifiers of one kind of dice as notation writes them, in the one order they are written: >=8f=1!, r<3kh3. Two kinds with the same die and the same text here are the same dice under the same rules.

Import it

import { rulesText } from "@johnmorrisdotca/korokoro";

Definition

function rulesText(group: DiceGroup): string

Parameters

NameTypeDescription
groupDiceGroup

One kind of dice and its rules.

Returns

string

The modifiers of one kind of dice as notation writes them, in the one order they are written: >=8f=1!, r<3kh3. Two kinds with the same die and the same text here are the same dice under the same rules.

Examples

import { rulesText } from "@johnmorrisdotca/korokoro";
import { parseNotation } from "@johnmorrisdotca/korokoro";
console.log(rulesText(parseNotation("4d6kh3")!));
kh3

What it prints (run when this page was built)

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