UNPKG

rndlib

Version:

Easy to use randomizer functions with TypeScript support

62 lines (61 loc) 1.58 kB
export interface DiceResults { sum: number; rolls: number[]; dieType: number; } /** * Get results for string die roll like 2d10+3 * * @param dieString * @returns */ export declare function roll(dieString: string): DiceResults; /** * Roll d4 n Times and return the results of each roll * * @param times How many 4 sided die are rolled. * @returns */ export declare function d4(times?: number): number[]; /** * Roll d6 n Times and return the results of each roll * * @param times How many 6 sided die are rolled. * @returns */ export declare function d6(times?: number): number[]; /** * Roll d8 n Times and return the results of each roll * * @param times How many 4 sided die are rolled. * @returns */ export declare function d8(times?: number): number[]; /** * Roll d10 n Times and return the results of each roll * * @param times How many 4 sided die are rolled. * @returns */ export declare function d10(times?: number): number[]; /** * Roll d12 n Times and return the results of each roll * * @param times How many 4 sided die are rolled. * @returns */ export declare function d12(times?: number): number[]; /** * Roll d20 n Times and return the results of each roll * * @param times How many 4 sided die are rolled. * @returns */ export declare function d20(times?: number): number[]; /** * Roll d100 n Times and return the results of each roll * * @param times How many 4 sided die are rolled. * @returns */ export declare function d100(times?: number): number[];