Base actor class with minimal functionality.

Provides only caching of .itemTypes and nothing else.

Hierarchy (View Summary)

Constructors

  • Parameters

    • data: undefined | ActorDataConstructorData

      Initial data provided to construct the Actor document

    • Optionalcontext: Context<TokenDocument>

      The document context, see foundry.abstract.Document

    Returns ActorBasePF

Properties

_initialized: undefined | boolean
_itemTypes: ItemTypesMap

Cached result of .itemTypes

_rollData: any
items: Collection<ItemPF>
statuses: Set<string>

Accessors

Methods

  • Get related combatants.

    Parameters

    • Optionalcombat: Combat = game.combat

      Combat instance

    Returns Combatant[]

    Related combatants.

  • Get item by its identifier tag.

    Parameters

    • tag: string

      Desired tag.

    Returns undefined | Item

    • Matching item or undefined if no item is found.
  • Override to support toggling buffs and operating the system's condition tracks

    Called by TokenHUD

    Parameters

    • statusId: string

      Status/condition ID

    • Optionaloptions: { active?: boolean; interaction?: boolean; overlay?: boolean } = {}

      Additional options

      • Optionalactive?: boolean

        Force active state

      • Optionalinteraction?: boolean

        Nonstandard. Is this triggered by user interaction?

      • Optionaloverlay?: boolean

        Overlay effect

    Returns Promise<undefined | boolean | ActiveEffect>

    Synced with Foundry v12.331 & v13.342

    Add separate listener for buffs