Skip to content

Type Alias: DiceGroup ​

ts
type DiceGroup = object;

Defined in: src/dice.ts:114

Some dice of one kind, with their own rules: the 2d20kh1 of 2d20kh1+1d4. The optional fields are left out of a group that does not use them.

Properties ​

count ​

ts
count: number;

Defined in: src/dice.ts:116

How many dice: at least 1, and no more than MAX_DICE over the whole roll.


sides ​

ts
sides: Sides;

Defined in: src/dice.ts:118

The kind of die: 2 to 1000 sides, or "F" for a Fate die.


keep ​

ts
keep: Keep;

Defined in: src/dice.ts:120

Which dice count towards the total.


keepCount? ​

ts
optional keepCount?: number;

Defined in: src/dice.ts:122

How many dice highest or lowest keep. Left out when it is one.


explode? ​

ts
optional explode?: true;

Defined in: src/dice.ts:124

A die showing its highest face throws another, which may do the same. Left out when the dice do not explode.


reroll? ​

ts
optional reroll?: number;

Defined in: src/dice.ts:126

A die showing this face or lower is thrown again, once, and the new face stands: ro< in notation. Left out when nothing is rerolled once.


rerollUntil? ​

ts
optional rerollUntil?: number;

Defined in: src/dice.ts:128

A die showing this face or lower is thrown again until it shows more, up to MAX_REROLLS times: r< in notation. Left out when nothing is rerolled until clear.


rerollWhen? ​

ts
optional rerollWhen?: Compare;

Defined in: src/dice.ts:130

A die meeting this is thrown again, once: ro>=5, ro=3. For the comparisons reroll cannot say; left out otherwise.


rerollUntilWhen? ​

ts
optional rerollUntilWhen?: Compare;

Defined in: src/dice.ts:132

A die meeting this is thrown again until it does not, up to MAX_REROLLS times: r=3, r>=5. For the comparisons rerollUntil cannot say; left out otherwise.


explodeWhen? ​

ts
optional explodeWhen?: Compare;

Defined in: src/dice.ts:134

With explode: the faces that explode, when they are not just the highest. !>=5 in notation. Left out when only the highest face explodes.


explodeKind? ​

ts
optional explodeKind?: ExplodeKind;

Defined in: src/dice.ts:136

With explode: how the extra dice are added up. Left out for ordinary explosions.


floor? ​

ts
optional floor?: number;

Defined in: src/dice.ts:138

The least a die counts for: a face below it counts as it. min2 in notation.


ceiling? ​

ts
optional ceiling?: number;

Defined in: src/dice.ts:140

The most a die counts for: a face above it counts as it. max5 in notation.


success? ​

ts
optional success?: Compare;

Defined in: src/dice.ts:142

The dice are counted, not added: each die meeting this is one success, and the total is how many. >=8 in notation.


failure? ​

ts
optional failure?: Compare;

Defined in: src/dice.ts:144

With success: each die meeting this takes one success away. f=1 in notation.


critical? ​

ts
optional critical?: Compare;

Defined in: src/dice.ts:146

Dice meeting this are marked as critical successes. Only a mark: the total is the same. cs>=19 in notation.


fumble? ​

ts
optional fumble?: Compare;

Defined in: src/dice.ts:148

Dice meeting this are marked as critical failures. Only a mark. cf<=2 in notation.


sort? ​

ts
optional sort?: "ascending" | "descending";

Defined in: src/dice.ts:150

The order the dice are shown in: sa ascending, sd descending. The order thrown is kept in the roll.


unique? ​

ts
optional unique?: true;

Defined in: src/dice.ts:152

The dice all show different faces: each is thrown from the faces not yet showing, which comes to the same as rerolling any duplicate until there is none. u in notation.


faces? ​

ts
optional faces?: CustomFace[];

Defined in: src/dice.ts:158

A custom die: its faces, in order, and sides is how many there are. A face written twice comes up twice as often. A roll records a custom face by its place, from 1. Left out of a numbered die and a Fate die.


weights? ​

ts
optional weights?: number[];

Defined in: src/dice.ts:165

A loaded die: how heavily each face is weighted, from the lowest face up, where a fair die has every face at 1. [1, 1, 1, 1, 1, 3] is a d6 that shows its 6 three times in eight. Left out of a fair die, and never present by accident: isFair is false for any roll that has it.

MIT © John Morris