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

    Class ActionUse

    Index

    Constructors

    Properties

    action: Action

    The action this action use is based on.

    The actor this action use is based on.

    The item this action use is based on.

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

    token: TokenDocument

    The actor's token this action use is based on.

    TEMPLATES: string[] = ...

    Accessors

    • get rollData(): object

      Roll Data

      Returns object

    Methods

    • Internal

      Returns void

    • Filter targets based on its combatant state and on the action targets properties. Used by getTargets.

      Parameters

      • targets: Set<TokenPF>

        List of targets to filter.

      Returns Set<TokenPF>

      Filtered targets.

    • Determines conditional parts used in a specific attack.

      Parameters

      • atk: AttackInstance

        The attack used.

      • Optionalindex: number

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

      Returns ConditionalParts

      The conditional parts used.

    • Adds ChatAttack entries to an attack's shared context.

      Returns Promise<void>

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

      Returns string[]

      The resulting property labels.

      Object format

    • Adds a ChatAttack entry for damage to an attack's shared context.

      Returns Promise<void>

    • Add effect notes for each individual attack.

      Returns Promise<void>

    • Returns Promise<void>

    • Returns Promise<void>

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

      Returns string[]

      The resulting property labels.

      Object format

    • Apply configuration from form data

      Returns void

    • Returns Promise<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 pf1.const.ACTION_ERRORS constants.

    • Returns Promise<number>

    • Enrich effect notes.

      Returns Promise<void>

    • 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 components.AttackData[]

      The generated default attacks.

    • Generates ChatAttack entries based off the attack type.

      Returns Promise<void>

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

      Returns object

      The resulting metadata object.

    • Fetch valid ammo items from actor.

      Returns AttackAmmo[]

      • Available ammo options
    • Armor as DR defense DC determination.

      Parameters

      Returns RollPF

      • Defense DC
      • Does not account for critical feats.
      • Does not account for size difference between target and attacker.
    • Adds an attack's chat card data to the shared object.

      Returns Promise<void>

    • Returns Promise<object>

      The roll data object for this attack.

    • Collect valid targets.

      Returns Promise<void>

    • Returns Promise<void>

    • Handles Dice So Nice integration.

      Returns Promise<void>

    • Posts the attack's chat card.

      Returns Promise<any>

    • Returns Promise<void>

    • Process everything

      Parameters

      • Optionaloptions: { skipDialog?: boolean } = {}

        Additional options

        • OptionalskipDialog?: boolean

          Skip dialog

      Returns Promise<void | ActionUse | SharedActionData>

    • Prompts the user for an area, based on the attack's measure template.

      Returns Promise<false | MeasureTemplateResult | null>

      Whether an area was selected, false if template placement is skipped, null if cancelled.

    • 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.

    • Creates and renders an attack roll dialog, and returns a result.

      Returns Promise<ActionFormData | null>

      • Attack dialog result or null 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.
    • Update remaining ammo in ChatAttacks

      Returns void