Hierarchy

  • ActionUse

Constructors

Properties

action: ItemAction

The action this action use is based on.

actor: ActorPF

The actor this action use is based on.

formData: undefined | {}

Type declaration

    item: ItemPF

    The item this action use is based on.

    The shared data object holding all relevant data for this action use.

    token: TokenDocument

    The actor this action use is based on.

    Methods

    • Internal

      Determine if item is valid for use as ammo.

      Parameters

      • item: Item

        Item to filter

      • ammoCost: number = 1

        Ammo usage per attack

      Returns boolean

    • Determines conditional parts used in a specific attack.

      Parameters

      • atk: object

        The attack used.

      • Optional index: number

        The index of the attack, in order of enabled attacks.

      Returns object

      The conditional parts used.

    • Adds generic property labels to an attack's chat card.

      Returns string[]

      The resulting property labels.

    • Alters roll (and shared) data based on user input during the attack's dialog.

      Parameters

      • formData: object = {}

        The attack dialog's form data

      Returns Promise<any>

    • Checks all requirements to make the attack. This is after the attack dialog's data has been parsed.

      Returns number | Promise<number>

      0 if successful, otherwise one of the ERR_REQUIREMENT constants.

    • Enrich notes

      Parameters

      • notes: string[]

        Notes

      • title: string

        Notes section title

      • css: string

        CSS selectors

      Returns string

      • Enriched HTML as text
    • Executes the item's script calls.

      Parameters

      • Optional category: "use" | "postUse" = "use"

        Script call category

      Returns Promise<void>

    • Generates metadata for this attack for the chat card to store.

      Returns object

      The resulting metadata object.

    • Armor as DR defense DC determination.

      Parameters

      • attack: any

      Returns RollPF

      • Defense DC

      Remarks

      • Does not account for critical feats.
      • Does not account for size difference between target and attacker.
    • Subtracts ammo for this attack, updating relevant items with new quantities.

      Parameters

      • Optional value: number = 1

        How much ammo to subtract.

      Returns Promise<any>

    Generated using TypeDoc