Hierarchy

Constructors

  • Parameters

    • formula: string

      The string formula to parse

    • Optional data: any

      The data object against which to parse attributes within the formula (default: {})

    • Optional options: InexactPartial<EvaluationOptions>

      (default: {})

    Returns RollPF

Accessors

  • get dice(): DiceTerm[]
  • Return an Array of the individual DiceTerm instances contained within this Roll. Override to recognize dice in SizeRollTerm.

    Returns DiceTerm[]

Methods

  • Render the tooltip HTML for a RollPF instance

    Returns Promise<string>

    The rendered HTML tooltip as a string

  • Variant of _splitMathArgs that takes system terms into consideration.

    Parameters

    • expression: string

    Returns RollTerm[]

  • Synchronous and thrown error consuming roll evaluation.

    Parameters

    • formula: string

      Roll formula

    • rollData: object = {}

      Data supplied to roll

    • context: object

      If error occurs, this will be included in the error message.

    • Optional options: {
          suppressError: undefined | boolean;
      } = {}

      Additional options

      • suppressError: undefined | boolean

        If true, no error will be printed even if one occurs.

    • Optional evalOpts: object = {}

      Additional options to pass to Roll.evaluate()

    Returns RollPF

    • Evaluated roll, or placeholder if error occurred.

    Remarks

    • Returned roll has .err set if an error occurred during evaluation.
    • If error occurs, the returned roll will have its formula replaced.
  • Parameters

    • formula: any
    • data: any

    Returns undefined | number

  • Parameters

    • terms: any

    Returns any

Generated using TypeDoc