Pathfinder 1e for Foundry VTT
    Preparing search index...

    Class ActionUse

    Index

    Constructors

    Properties

    action: ItemAction

    The action this action use is based on.

    actor: ActorPF

    The actor this action use is based on.

    formData: undefined | {}
    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<"base" | ModuleSubType>

        Item to filter

      • ammoCost: number = 1

        Ammo usage per attack

      Returns boolean

      • Whether the provide ammo is valid.
    • Determines conditional parts used in a specific attack.

      Parameters

      • atk: object

        The attack used.

      • Optionalindex: number

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

      Returns object

      The conditional parts used.

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

      Returns string[]

      The resulting property labels.

      Object format

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

      Returns string[]

      The resulting property labels.

      Object format

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

      Parameters

      • formData: object = {}

        The attack dialog's form data

      Returns void

    • 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 Promise<string>

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

      Parameters

      • Optionalcategory: "use" | "postUse" = "use"

        Script call category

      Returns Promise<void>

    • Generates attacks for an item's action.

      Parameters

      • OptionalforceFullAttack: boolean = false

        Generate full attack data, e.g. as base data for an ActionDialog

      Returns AttackData[]

      The generated default attacks.

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

      Returns object

      The resulting metadata object.

    • Prompts the user for areas, based on the attack's measure templates.

      Returns Promise<boolean>

      True if the placement process was skipped or successful, false if cancelled.

    • Subtracts ammo for this attack, updating relevant items with new quantities.

      Parameters

      • Optionalvalue: number = 1

        How much ammo to subtract.

      Returns Promise<any>

      • Promise that resolves once ammo update is complete.