Skip to content

@dice-roller/rpg-dice-roller / results / withFlags

Function: withFlags() โ€‹

withFlags<T>(item, ...flags): T

Defined in: src/results/die-result.ts:23

Returns a copy with flags deduplicated in first-occurrence order; does not change scoring.

Type Parameters โ€‹

T โ€‹

T extends ScoredItem

Parameters โ€‹

item โ€‹

T

flags โ€‹

...("max" | "min" | "explode-matching-batch" | "explode" | "drop" | "re-roll" | "unique" | "critical-success" | "critical-failure" | "compound" | "penetrate" | "explode-matching-batch-failure" | "re-roll-once" | "target-success" | "target-failure" | "unique-once")[]

Returns โ€‹

T

MIT Licensed ยท Credits