dicelang
Version:
JavaScript interpreter of the Roll20 dice language
35 lines (34 loc) • 995 B
TypeScript
import { RandomDevice } from '../Common/Random';
import { DiceMod } from './DiceMod';
export declare class Dice {
static roll(d: number, n?: number, device?: RandomDevice): number[];
private static _maxD;
static maxD: number;
private static _maxN;
static maxN: number;
protected static readonly diceRegExp: RegExp;
private static checkD(d);
private static checkN(n);
private _device;
private _minRoll;
private _n;
private _d;
private _fate;
private _mod;
private _binding;
private _result;
private _rolls;
private _rawRolls;
constructor(diceExpr?: string, binding?: object, device?: RandomDevice);
n: number;
d: number;
fate: boolean;
readonly mod: DiceMod;
readonly minRoll: number;
roll(n?: number): number;
readonly result: number;
readonly rolls: number[];
readonly rawRolls: number[];
toString(): string;
toStringPlaintext(): string;
}