Hierarchy

  • ItemAction

Constructors

Properties

_sheet: ItemActionSheet = null
apps: Record<number, Application<ApplicationOptions>> = {}
conditionals: undefined | Collection<any>
data: InsertKeys<{
    _id: any;
    ability: any;
    actionType: any;
    activation: any;
    alignments: any;
    ammo: any;
    area: any;
    attackBonus: any;
    attackName: any;
    attackNotes: any;
    conditionals: any;
    critConfirmBonus: any;
    damage: any;
    description: any;
    duration: any;
    effectNotes: any;
    enh: any;
    extraAttacks: any;
    formula: any;
    held: any;
    img: any;
    material: any;
    measureTemplate: any;
    name: any;
    naturalAttack: any;
    nonlethal: any;
    powerAttack: any;
    range: any;
    save: any;
    soundEffect: any;
    spellEffect: any;
    tag: any;
    target: any;
    touch: any;
    uses: any;
}, OmitByValue<{}, never>>

Type declaration

  • _id: any
  • ability: any
  • actionType: any
  • activation: any
  • alignments: any
  • ammo: any
  • area: any
  • attackBonus: any
  • attackName: any
  • attackNotes: any
  • conditionals: any
  • critConfirmBonus: any
  • damage: any
  • description: any
  • duration: any
  • effectNotes: any
  • enh: any
  • extraAttacks: any
  • formula: any
  • held: any
  • img: any
  • material: any
  • measureTemplate: any
  • name: any
  • naturalAttack: any
  • nonlethal: any
  • powerAttack: any
  • range: any
  • save: any
  • soundEffect: any
  • spellEffect: any
  • tag: any
  • target: any
  • touch: any
  • uses: any
parent: ItemPF = null

Accessors

  • get alignments(): null | string
  • The action's alignment attributes, or null if the action has no alignment attributes

    Returns null | string

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

    • custom: string
    • values: never[]
  • get defaultData(): {
        _id: string;
        ability: {
            attack: string;
            critMult: number;
            critRange: number;
            damage: string;
            damageMult: number;
        };
        actionType: string;
        activation: {
            cost: number;
            type: string;
            unchained: {
                cost: number;
                type: string;
            };
        };
        alignments: {
            chaotic: null;
            evil: null;
            good: null;
            lawful: null;
        };
        ammo: {
            cost: number;
            type: string;
        };
        area: string;
        attackBonus: string;
        attackName: string;
        attackNotes: never[];
        conditionals: never[];
        critConfirmBonus: string;
        damage: {
            critParts: never[];
            nonCritParts: never[];
            parts: never[];
        };
        description: string;
        duration: {
            units: string;
            value: null;
        };
        effectNotes: never[];
        enh: {
            value: null;
        };
        extraAttacks: {
            formula: {
                bonus: string;
                count: string;
                label: string;
            };
            manual: never[];
            type: string;
        };
        formula: string;
        held: string;
        img: string;
        material: {
            addon: never[];
            normal: string;
        };
        measureTemplate: {
            color: string;
            size: string;
            texture: string;
            type: string;
        };
        name: string;
        naturalAttack: {
            primaryAttack: boolean;
            secondary: {
                attackBonus: string;
                damageMult: number;
            };
        };
        nonlethal: boolean;
        powerAttack: {
            critMultiplier: number;
            damageBonus: number;
            multiplier: null;
        };
        range: {
            maxIncrements: number;
            minUnits: string;
            minValue: null;
            units: string;
            value: null;
        };
        save: {
            dc: string;
            description: string;
            type: string;
        };
        soundEffect: string;
        spellEffect: string;
        tag: string;
        target: {
            value: string;
        };
        touch: boolean;
        uses: {
            autoDeductChargesCost: string;
            self: {
                maxFormula: string;
                per: string;
                value: number;
            };
        };
    }
  • Returns {
        _id: string;
        ability: {
            attack: string;
            critMult: number;
            critRange: number;
            damage: string;
            damageMult: number;
        };
        actionType: string;
        activation: {
            cost: number;
            type: string;
            unchained: {
                cost: number;
                type: string;
            };
        };
        alignments: {
            chaotic: null;
            evil: null;
            good: null;
            lawful: null;
        };
        ammo: {
            cost: number;
            type: string;
        };
        area: string;
        attackBonus: string;
        attackName: string;
        attackNotes: never[];
        conditionals: never[];
        critConfirmBonus: string;
        damage: {
            critParts: never[];
            nonCritParts: never[];
            parts: never[];
        };
        description: string;
        duration: {
            units: string;
            value: null;
        };
        effectNotes: never[];
        enh: {
            value: null;
        };
        extraAttacks: {
            formula: {
                bonus: string;
                count: string;
                label: string;
            };
            manual: never[];
            type: string;
        };
        formula: string;
        held: string;
        img: string;
        material: {
            addon: never[];
            normal: string;
        };
        measureTemplate: {
            color: string;
            size: string;
            texture: string;
            type: string;
        };
        name: string;
        naturalAttack: {
            primaryAttack: boolean;
            secondary: {
                attackBonus: string;
                damageMult: number;
            };
        };
        nonlethal: boolean;
        powerAttack: {
            critMultiplier: number;
            damageBonus: number;
            multiplier: null;
        };
        range: {
            maxIncrements: number;
            minUnits: string;
            minValue: null;
            units: string;
            value: null;
        };
        save: {
            dc: string;
            description: string;
            type: string;
        };
        soundEffect: string;
        spellEffect: string;
        tag: string;
        target: {
            value: string;
        };
        touch: boolean;
        uses: {
            autoDeductChargesCost: string;
            self: {
                maxFormula: string;
                per: string;
                value: number;
            };
        };
    }

    • _id: string
    • ability: {
          attack: string;
          critMult: number;
          critRange: number;
          damage: string;
          damageMult: number;
      }
      • attack: string
      • critMult: number
      • critRange: number
      • damage: string
      • damageMult: number
    • actionType: string
    • activation: {
          cost: number;
          type: string;
          unchained: {
              cost: number;
              type: string;
          };
      }
      • cost: number
      • type: string
      • unchained: {
            cost: number;
            type: string;
        }
        • cost: number
        • type: string
    • alignments: {
          chaotic: null;
          evil: null;
          good: null;
          lawful: null;
      }
      • chaotic: null
      • evil: null
      • good: null
      • lawful: null
    • ammo: {
          cost: number;
          type: string;
      }
      • cost: number
      • type: string
    • area: string
    • attackBonus: string
    • attackName: string
    • attackNotes: never[]
    • conditionals: never[]
    • critConfirmBonus: string
    • damage: {
          critParts: never[];
          nonCritParts: never[];
          parts: never[];
      }
      • critParts: never[]
      • nonCritParts: never[]
      • parts: never[]
    • description: string
    • duration: {
          units: string;
          value: null;
      }
      • units: string
      • value: null
    • effectNotes: never[]
    • enh: {
          value: null;
      }
      • value: null
    • extraAttacks: {
          formula: {
              bonus: string;
              count: string;
              label: string;
          };
          manual: never[];
          type: string;
      }
      • formula: {
            bonus: string;
            count: string;
            label: string;
        }
        • bonus: string
        • count: string
        • label: string
      • manual: never[]
      • type: string
    • formula: string
    • held: string
    • img: string
    • material: {
          addon: never[];
          normal: string;
      }
      • addon: never[]
      • normal: string
    • measureTemplate: {
          color: string;
          size: string;
          texture: string;
          type: string;
      }
      • color: string
      • size: string
      • texture: string
      • type: string
    • name: string
    • naturalAttack: {
          primaryAttack: boolean;
          secondary: {
              attackBonus: string;
              damageMult: number;
          };
      }
      • primaryAttack: boolean
      • secondary: {
            attackBonus: string;
            damageMult: number;
        }
        • attackBonus: string
        • damageMult: number
    • nonlethal: boolean
    • powerAttack: {
          critMultiplier: number;
          damageBonus: number;
          multiplier: null;
      }
      • critMultiplier: number
      • damageBonus: number
      • multiplier: null
    • range: {
          maxIncrements: number;
          minUnits: string;
          minValue: null;
          units: string;
          value: null;
      }
      • maxIncrements: number
      • minUnits: string
      • minValue: null
      • units: string
      • value: null
    • save: {
          dc: string;
          description: string;
          type: string;
      }
      • dc: string
      • description: string
      • type: string
    • soundEffect: string
    • spellEffect: string
    • tag: string
    • target: {
          value: string;
      }
      • value: string
    • touch: boolean
    • uses: {
          autoDeductChargesCost: string;
          self: {
              maxFormula: string;
              per: string;
              value: number;
          };
      }
      • autoDeductChargesCost: string
      • self: {
            maxFormula: string;
            per: string;
            value: number;
        }
        • maxFormula: string
        • per: string
        • value: number

Methods

  • Parameters

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

      Additional options to configure behavior.

      • rollData: undefined | object

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

    Returns number

    Cost in charges for this action.

  • 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 | string;
        } = {}

        Additional options to configure behavior.

        • rollData: undefined | object

          Specific roll data to pass.

        • type: undefined | string

          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.

    • Parameters

      • __namedParameters: {
            formula: undefined | null;
            rollData: any;
        } = {}
        • formula: undefined | null
        • rollData: any

      Returns undefined | number

    • 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

      • root0: {
            bonus: undefined | null;
            data: undefined | null;
            extraParts: undefined | any[];
            primaryAttack: undefined | boolean;
        } = {}
        • bonus: undefined | null
        • data: undefined | null
        • extraParts: undefined | any[]
        • primaryAttack: undefined | boolean

      Returns Promise<Evaluated<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

    • Creates an action.

      Parameters

      • data: object[]

        Data to initialize the action(s) with.

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

        An object containing context information.

        • parent: undefined | ItemPF

          The parent entity to create the action within.

      Returns Promise<(undefined | ItemAction)[]>

      The resulting actions, or an empty array if nothing was created.

    Generated using TypeDoc