UNPKG

@seroh/roll

Version:

An RPG dice-rolling library with a variety of built-in roll mechanics.

29 lines 876 B
import { Randomizer } from "./Randomizer"; export interface KarmicRandomizerConfig { highRollThreshold?: number; lowRollThreshold?: number; biasFactor?: number; historyLimit?: number; } declare enum HistoryEntry { HIGH = 0, LOW = 1, NEUTRAL = 2 } export declare class KarmicRandomizer extends Randomizer { static readonly HistoryEntry: typeof HistoryEntry; private historyQueue; historyLimit: number; highRollThreshold: number; lowRollThreshold: number; biasFactor: number; constructor({ highRollThreshold, lowRollThreshold, biasFactor, historyLimit }?: KarmicRandomizerConfig); protected generator(): number; private applyBias; get recentHighRolls(): number; get recentLowRolls(): number; private evaluateRoll; private generateRawRoll; } export {}; //# sourceMappingURL=KarmicRandomizer.d.ts.map