Skip to main content
Module

x/fortuna/mod.ts>GachaMachine

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

Gacha system.

Constructors

new
GachaMachine(items: GachaChoice<T>[])

Properties

writeonly
items: GachaChoice<T>[]

Methods

get(count: number): T[]

Roll items from the gacha machine.

const machine = new GachaMachine(items);
machine.get(11)

If you are looking for the distinct rolls, try importing GachaMachine3 instead of GachaMachine.