Skip to content

Type Alias: Roll ​

ts
type Roll = object;

Defined in: src/dice.ts:225

One throw of the dice: what was asked for, every die thrown, and the total.

Properties ​

id ​

ts
id: string;

Defined in: src/dice.ts:227

Unique within one history.


spec ​

ts
spec: RollSpec;

Defined in: src/dice.ts:228


faces ​

ts
faces: number[];

Defined in: src/dice.ts:230

Every die's face, in the order thrown: rerolled dice and the dice an explosion added are among them.


kept ​

ts
kept: boolean[];

Defined in: src/dice.ts:232

Which faces count: all of them unless some are dropped or rerolled.


total ​

ts
total: number;

Defined in: src/dice.ts:234

The kept faces added up, plus the bonus.


at ​

ts
at: number;

Defined in: src/dice.ts:236

Epoch milliseconds.


seed ​

ts
seed: string | null;

Defined in: src/dice.ts:238

The seed this roll came from, when it is reproducible.


dice? ​

ts
optional dice?: DieRoll[];

Defined in: src/dice.ts:240

What happened to each die, one entry per face. Every roll this package makes has it; diceOf reads it or works it out.


held? ​

ts
optional held?: boolean[];

Defined in: src/dice.ts:242

On a roll that held some dice from the roll before: which faces were held and not thrown again. Left out of an ordinary roll.


loaded? ​

ts
optional loaded?: true;

Defined in: src/dice.ts:244

True on a roll of loaded dice, and left out of every other: a loaded roll always says so.


set? ​

ts
optional set?: object;

Defined in: src/dice.ts:246

On a roll thrown as one of a set: which set, which roll of it from 0, and how many there are. Left out of a roll thrown on its own.

id ​

ts
id: string;

index ​

ts
index: number;

of ​

ts
of: number;

MIT © John Morris