Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/fortuna/mod.ts>rollDie

A TypeScript module for random events and gacha.
Latest
function rollDie
import { rollDie } from "https://deno.land/x/fortuna@v4.1.4/mod.ts";

Roll an unbiased die. A biased die can be implemented using GachaMachine.

Parameters

exp: string

Die expression

optional
separate: boolean

whether to consider each roll individually

Returns

number | number[]

Roll an unbiased die. A biased die can be implemented using GachaMachine.

Parameters

options: RollOptions

Options for rolling the die.

Returns

number | number[]

Returns

number