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

    Methods

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