roll-parser - v3.0.0-beta.0
    Preparing search index...

    Type Alias RollOptions

    Options for the roll function.

    type RollOptions = {
        context?: Record<string, number>;
        maxDice?: number;
        maxExplodeIterations?: number;
        maxRerollIterations?: number;
        onMissingVariable?: "throw" | "zero";
        rng?: RNG;
        seed?: string | number;
    }
    Index
    context?: Record<string, number>

    Variable context for @name / @{name} references (default: empty)

    maxDice?: number

    Maximum total dice allowed per evaluation (default: 10,000)

    maxExplodeIterations?: number

    Maximum explosion iterations allowed per die (default: 1,000)

    maxRerollIterations?: number

    Maximum reroll iterations allowed per die (default: 1,000)

    onMissingVariable?: "throw" | "zero"

    Behavior when a referenced variable is missing from context (default: 'throw')

    rng?: RNG

    Custom RNG instance (takes precedence over seed)

    seed?: string | number

    Seed for deterministic rolls (ignored if rng provided)