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

x/fortuna/src/limited_machine.ts

A TypeScript module for random events and gacha.
Latest
import * as fortuna from "https://deno.land/x/fortuna@v4.1.4/src/limited_machine.ts";

Classes

Gacha system for rolling n distinct items from the weighted collection.

Interfaces

Data transformed by the constructor, fed to the binary search function. The result property holds the result that will be returned after rolling. cumulativeChance is used to make it fit for binary search.

Data fed to the constructor. The result property holds the result that will be returned after rolling. chance is the weight of the result.