Action pseudo-document

Hierarchy

  • any
    • ItemAction

Constructors

Properties

activation: any
conditionals: any
FALLBACK_IMAGE: string = "systems/pf1/icons/skills/gray_04.jpg"

Accessors

  • get defaultDamageType(): {
        custom: string;
        values: never[];
    }
  • Returns {
        custom: string;
        values: never[];
    }

    • custom: string
    • values: never[]

Methods

  • Generate attacks.

    Parameters

    • Optional options: {
          bonuses: undefined | boolean;
          conditionals: undefined | boolean;
          full: undefined | boolean;
          resolve: undefined | boolean;
          rollData: undefined | object;
      } = {}

      Options

      • bonuses: undefined | boolean

        Include other bonuses. Requires resolve to be enabled.

      • conditionals: undefined | boolean

        Include conditional modifications. Requires resolve to be enabled.

      • full: undefined | boolean

        Full attack

      • resolve: undefined | boolean

        If the bonuses are to be resolved directly.

      • rollData: undefined | object

        Roll data

    Returns object[]

    • Array of attack data
  • Parameters

    • Optional options: {
          maximize: undefined | boolean;
          minimize: undefined | boolean;
          rollData: undefined | object;
      } = {}

      Additional options to configure behavior.

      • maximize: undefined | boolean
      • minimize: undefined | boolean
      • rollData: undefined | object

        Pre-determined roll data to pass for determining the charge cost.

    Returns null | Roll<any>

    • Cost in charges for this action. Null if not charged.
  • Parameters

    • Optional options: {
          maximize: undefined | boolean;
          minimize: undefined | boolean;
          rollData: undefined | object;
      } = {}

      Additional options to configure behavior.

      • maximize: undefined | boolean
      • minimize: undefined | boolean
      • rollData: undefined | object

        Pre-determined roll data to pass for determining the charge cost.

    Returns null | Roll<any>

    • Cost in charges for this action. Null if not charged.
  • Generates ChatData for this action's parent item, but with this action's data, regardless of whether it is the first action or not.

    Parameters

    • Optional chatDataOptions: object = {}

      Options passed to ItemPF#getChatData affecting the chat data

    Returns Promise<ChatData>

    Chat data for this action's parent and this action

  • Generates lists of conditional subtargets this attack can have.

    Parameters

    • target: string

      The target key, as defined in PF1.conditionTargets.

    Returns {}

    A list of conditionals

    • Parameters

      • Optional rollData: object = null

        Data to pass to the roll. If none is given, get new roll data.

      Returns number

      The Difficulty Class for this action.

    • Returns labels related to this particular action

      Parameters

      • Optional options: {
            rollData: undefined | object;
        } = {}
        • rollData: undefined | object

          Pre-determined roll data. If not provided, finds the action's own roll data.

      Returns Record<string, string>

      This action's labels

    • Get power attack, deadly aim or piranha strike multiplier.

      Parameters

      • Optional options: {
            rollData: undefined | object;
        } = {}

        Additional options

        • rollData: undefined | object

          Roll data instance

      Returns number

      • Effective multiplier
    • Parameters

      • Optional options: {
            rollData: undefined | object;
            type: undefined | "min" | "max" | "single";
        } = {}

        Additional options to configure behavior.

        • rollData: undefined | object

          Specific roll data to pass.

        • type: undefined | "min" | "max" | "single"

          What type of range to query. Either "single" (for a single range increment), "max" or "min".

      Returns null | number

      The given range, in system configured units, or null if no range is applicable.

    • Render all connected application instances.

      Parameters

      • Optional force: boolean = false

        Force rendering

      • Optional context: object = {}

        Optional context

      Returns void

    • Place an attack roll using an item (weapon, feat, spell, or equipment)

      Parameters

      • Optional options: {
            bonus: undefined | string;
            data: undefined | object;
            extraParts: undefined | string[];
            primary: undefined | boolean;
        } = {}

        Options

        • bonus: undefined | string

          Additional attack bonus

        • data: undefined | object

          Roll data

        • extraParts: undefined | string[]

          Additional attack parts

        • primary: undefined | boolean

          Treat as primary natural attack

      Returns D20RollPF

    • Roll damage for an action.

      Parameters

      • Optional options: {
            conditionalParts: undefined | object;
            critical: undefined | boolean;
            data: undefined | null | object;
            extraParts: undefined | string[];
            primaryAttack: undefined | boolean;
        } = {}

        Options configuring the damage roll

        • conditionalParts: undefined | object

          Conditional data sets

        • critical: undefined | boolean

          Whether to roll critical damage

        • data: undefined | null | object

          rollData to be used

        • extraParts: undefined | string[]

          Additional strings added to the roll formula

        • primaryAttack: undefined | boolean

          Whether this is the primary attack

      Returns Promise<DamageRoll[]>

      Created damage rolls, one roll per damage part

    • Update the action

      TODO: BROKEN

      Parameters

      • updateData: object

        Update data

      • context: object = {}

        Update context

      Returns Promise<void>

    • Creates an action.

      Parameters

      • data: object[]

        Data to initialize the action(s) with.

      • context: {
            parent: undefined | ItemPF;
        } = {}

        An object containing update context information.

        • parent: undefined | ItemPF

          The parent entity to create the action within.

      Returns ItemAction[]

      • The resulting actions

      Throws

      • If the action has no parent

    Generated using TypeDoc