UNPKG

dicelang

Version:

JavaScript interpreter of the Roll20 dice language

51 lines (50 loc) 2.21 kB
import { Dice } from './Dice'; export declare class DiceMod { static comparePointToString(cp: '<' | '>' | '='): string; static comparePoint(cp: '<' | '>' | '=', n: number, value: number): boolean; static readonly maxN: number; protected static readonly successesModRegExpr: RegExp; protected static readonly explodeModRegExpr: RegExp; protected static readonly keepDropModRegExp: RegExp; protected static readonly rerollModRegExp: RegExp; protected static readonly sortModRegExp: RegExp; protected static sortAscComparator(a: number, b: number): number; protected static sortDesComparator(a: number, b: number): number; private static checkN(n); private _successes; private _failures; private _exploding; private _compounding; private _penetrating; private _keepDrop; private _reroll; private _sort; constructor(modExpr?: string); rolled(roll: number, result: number[], dice: Dice): void; modResult(result: number[]): number; readonly successes: string; readonly successesPlaintext: string; readonly exploding: string; readonly explodingPlaintext: string; readonly compounding: string; readonly compoundingPlaintext: string; readonly penetrating: string; readonly penetratingPlaintext: string; readonly keepDrop: string; readonly keepDropPlaintext: string; readonly reroll: string; readonly rerollPlaintext: string; readonly sort: string; readonly sortPlaintext: string; toString(): string; toStringPlaintext(): string; protected _parseExplodeResult(result: RegExpExecArray): void; protected _parseKeepDropResult(result: RegExpExecArray): void; protected _parseRerollResult(result: RegExpExecArray): void; protected _parseSucessesResult(result: RegExpExecArray): void; protected _parseSortResult(result: RegExpExecArray): void; protected _applyHotModifiers(roll: number, dice: Dice): number[]; protected _applySettledModifiers(result: number[]): number; protected _applyCompounding(roll: number, dice: Dice): number; protected _applyKeepDrop(result: number[]): void; }