A specialized Roll class which is used to evaluate damage rolls. Provides additional utility getters for data relevant to damage rolls (e.g. damage type).

Hierarchy

Constructors

  • Parameters

    • formula: string

      The formula to parse.

    • data: object

      The data object against which to parse attributes within the formula.

    • options: object = {}

      Additional options which customize the created Roll instance.

    Returns DamageRoll

Properties

TYPES: {
    CRITICAL: string;
    NON_CRITICAL: string;
    NORMAL: string;
} = ...

Types of damage rolls with regard to their critical status.

Type declaration

  • CRITICAL: string
  • NON_CRITICAL: string
  • NORMAL: string

Accessors

Methods

  • Render the tooltip HTML for a RollPF instance

    Returns Promise<string>

    The rendered HTML tooltip as a string

  • 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 Promise<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.
  • Synchronous and thrown error consuming roll evaluation.

    Parameters

    • formula: any

      Roll formula

    • rollData: {} = {}

      Data supplied to roll

      • context: any

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

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

        Additional options

        • suppressError: undefined | boolean

          If true, no error will be printed

      • evalOpts: {} = {}

        Additional options to pass to Roll.evaluate()

        Returns RollPF

        • Evaluated roll

        Remarks

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

      Generated using TypeDoc