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

specOffunction

A spec from its kinds of dice and a bonus, brought into range.

Import it

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

Definition

function specOf(groups: readonly Partial<DiceGroup>[], modifier?: number): RollSpec

Parameters

NameTypeDescription
groupsreadonly Partial<DiceGroup>[]

The dice groups to combine, in order.

modifier (optional)number

The bonus added after the dice totals.

Returns

RollSpec

A spec from its kinds of dice and a bonus, brought into range.

Examples

import { specOf } from "@johnmorrisdotca/korokoro";
import { formatNotation } from "@johnmorrisdotca/korokoro";
console.log(formatNotation(specOf([{ count: 2, sides: 6 }, { count: 1, sides: 8 }], 3)));
2d6+1d8+3

What it prints (run when this page was built)

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