import { GachaMachine } from "https://deno.land/x/fortuna@v2.0.3/mod.ts";
A gacha machine for weighted selection.
Properties
items: ComputedGachaData<ItemType>[]
tiers: ComputedTierData[]
Static Methods
rollWithBinarySearch<ItemType>(items: ComputedGachaData<ItemType>[], totalChance?: number): ItemType
Roll one item from a pool using binary search. Requires special transformation.
rollWithLinearSearch<ItemType>(choices: GachaChoice<ItemType>[], totalChance?): ItemType
Roll one item from a pool using linear search. Simple and great for smaller pools.