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

    Class AbilityTemplate

    A helper class for building MeasuredTemplates for PF1 spells and abilities

    Hierarchy (View Summary)

    Index

    Constructors

    • Parameters

      • document: MeasuredTemplateDocument

        The Document instance which is represented by this object

      Returns AbilityTemplate

    Properties

    SNAP_MODE: number = ...
    SUPPORTED_TYPES: Set<"rect" | "circle" | "cone" | "ray"> = ...

    Supported template types

    Accessors

    • get origin(): void | Item<"base" | ModuleSubType> | ItemAction

      Return origin item if any.

      Returns void | Item<"base" | ModuleSubType> | ItemAction

    Methods

    • Protected

      Get highlighted square coordinates.

      Supports only circle, cone and ray templates.

      Returns Point[]

      • Array of grid coordinates
    • Cancel the workflow (right-click)

      Parameters

      • event: Event

      Returns void

    • Parameters

      • event: any

      Returns void

    • Parameters

      • event: any

      Returns any

    • Parameters

      • event: Event

      Returns void

    • Parameters

      • event: any

      Returns void

    • Rotate the template by 3 degree increments (mouse-wheel)

      Parameters

      • event: Event

      Returns void

    • Returns void

    • Activate listeners for the template preview

      Parameters

      • initialLayer: CanvasLayer

        The initially active CanvasLayer to re-activate after the workflow is complete

      Returns Promise<object>

      Returns result object

    • Creates a preview of the spell template

      Parameters

      • _event: Event

        The initiating click event

      Returns Promise<object>

      • Result
    • Determine tokens residing within the template bounds, based on either grid highlight logic or token center.

      Returns Token[]

      Tokens sufficiently within the template.

    • A factory method to create an AbilityTemplate instance using provided data

      Parameters

      • data: {
            color?: string;
            distance: number;
            flags?: object;
            texture?: string;
            type: "rect" | "circle" | "cone" | "ray";
        }

        Data used to create the template

        • Optionalcolor?: string

          Template color

        • distance: number

          The distance/size of the template

        • Optionalflags?: object

          Additional flags stored on the template

        • Optionaltexture?: string

          Path to template texture

        • type: "rect" | "circle" | "cone" | "ray"

          The type of template

      • Optionaloptions: { action?: ItemAction } = {}

      Returns null | AbilityTemplate

      • The template object, or null if the data does not produce a template