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

    Level-up and class addition wizard.

    Hierarchy

    • HandlebarsApplication<this> & ApplicationV2<
          RenderContext,
          Configuration,
          RenderOptions,
          this,
      >
      • LevelUpForm
    Index

    Constructors

    • Internal

      Parameters

      • options: {
            actor: Actor<"base" | ModuleSubType>;
            item: Item<"base" | ModuleSubType>;
            token: Token;
        }

      Returns LevelUpForm

    Properties

    Temporary clone of the class to simulate changes.

    _simulacra: ActorPF

    Temporary clone of the actor for seeing the results of various modifications with.

    levelUp: {
        abilityScore: { new: number; used: number; get available(): number };
        fcb: { available: boolean; choice: string; unavailable: boolean };
        feats: number;
        health: { manual: null; type: null; value: number };
        visibility: null;
    } = ...
    newLevel:
        | undefined
        | {
            bab: any;
            feats: number;
            fort: any;
            hd: number;
            hp: any;
            mythicTier: number;
            ref: any;
            skills: { bg: number; value: number };
            totalHD: any;
            totalMythicTier: any;
            will: any;
        }
    DEFAULT_OPTIONS: {
        actions: {
            adjustAbility: Object;
            commit: Object;
            openSheet: Object;
            skip: Object;
        };
        classes: string[];
        form: {
            closeOnSubmit: boolean;
            handler: Object;
            submitOnChange: boolean;
            submitOnClose: boolean;
        };
        id: string;
        position: { width: number };
        tag: string;
        window: { icon: string; minimizable: boolean; resizable: boolean };
    } = ...
    ICONS: {
        fcb: { alt: string; hp: string; none: string; skill: string };
        health: { auto: string; manual: string; roll: string };
    } = ...
    item: undefined | ItemClassPF
    PARTS: {
        abilities: { template: string };
        fcb: { template: string };
        footer: { template: string };
        form: { root: boolean; template: string };
        health: { template: string };
        summary: { template: string };
    } = ...

    Accessors

    • get promise(): Promise<null | Item<"base" | ModuleSubType>>

      Promise for when the wizard finishes.

      Resolves either into the added or updated class item, or null if cancelled.

      Returns Promise<null | Item<"base" | ModuleSubType>>

    • get title(): string

      A convenience reference to the title of the Application window.

      Returns string

    Methods

    • Internal

      Parameters

      • key: string

        Ability score key

      • op: string = null

        Operator clicked

      Returns -1 | 0 | 1

      • Direction of adjustment
    • Return cost of the adjustment.

      For homebrew support.

      Parameters

      • key: string
      • value: number

      Returns number

    • Parameters

      • options: any

      Returns any

    • Internal

      Initialize and diff level values

      Calculates many effects of the different levels.

      • Skills
      • Ability score effects
      • HD changes etc.

      Returns void

    • Parameters

      • options: any

      Returns any

    • Parameters

      • config: any
      • event: any

      Returns void

    • Parameters

      • options: any

      Returns void

    • Actions performed after any render of the Application.

      Parameters

      • context: any

        Prepared context data

      • options: any

        Provided render options

      Returns void

    • Parameters

      • options: any

      Returns Promise<
          {
              abilityScore: { new: number; used: number; get available(): number };
              actor: ActorPF;
              config: ./config.mjs;
              document: ItemClassPF;
              fcb: { available: boolean; choice: string; unavailable: boolean };
              feats: number;
              health: { manual: null; type: null; value: number };
              icons: any;
              item: {};
              labels: {};
              ready: boolean;
              visibility: null;
          },
      >

    • Prepare context that is specific to only a single rendered part.

      It is recommended to augment or mutate the shared context so that downstream methods like _onRender have visibility into the data that was used for rendering. It is acceptable to return a different context object rather than mutating the shared context at the expense of this transparency.

      Parameters

      • partId: any

        The part being rendered

      • context: any

        Shared context provided by _prepareContext

      • options: any

        Options which configure application rendering behavior

      Returns any

      Context data for a specific part

    • Internal

      Spoof roll, for maximized, auto and manual health.

      Parameters

      • roll: Roll<EmptyObject>
      • value: number

      Returns Roll<EmptyObject>

    • Returns
          | undefined
          | {
              itemData: { _id: null
              | string; "system.changes": any };
              update: boolean;
          }
          | {
              itemData: {
                  img: "systems/pf1/icons/skills/affliction_10.jpg";
                  name: "Added Ability Scores";
                  system: {
                      description: {
                          value: "<p>This feature is used for tracking your ability score changes from gaining hit die.</p>";
                      };
                      subType: "misc";
                  };
                  type: "feat";
              };
              update: boolean;
          }

    • Parameters

      • level: any

      Returns {
          bab: any;
          feats: number;
          fort: any;
          hd: number;
          hp: any;
          mythicTier: number;
          ref: any;
          skills: { bg: number; value: number };
          totalHD: any;
          totalMythicTier: any;
          will: any;
      }

    • Returns boolean

      Whether this form's associated class is a favoured class.

      Add better logic for determining this <26-01-22, Furyspark>

    • Add class to actor

      Parameters

      • actor: Actor<"base" | ModuleSubType>

        Owning actor

      • itemData: object

        Class item data

      • Optionaloptions: { token?: TokenDocument } = {}

        Additional options

        • Optionaltoken?: TokenDocument

          Associated token

      Returns Promise<null | Item<"base" | ModuleSubType>>

    • Increase level of a class

      Parameters

      • actor: Actor<"base" | ModuleSubType>

        Owning actor

      • item: Item<"base" | ModuleSubType>

        Class item

      • Optionaloptions: { token?: TokenDocument } = {}

        Additional options

        • Optionaltoken?: TokenDocument

          Associated token

      Returns Promise<undefined | null | Item<"base" | ModuleSubType>>

      • Updated class item if updated or null if process was cancelled. Undefined if this re-opened existing dialog.