Level-up and class addition handler.

Hierarchy

  • FormApplication
    • LevelUpForm

Constructors

Properties

actor: ActorPF
config: {
    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;
} = ...

Temporary clone of the class to simulate changes.

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;
    }
simulacra: ActorPF

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

token: TokenDocument

Relevant token if any.

useBackgroundSkills: unknown = ...
ICONS: {
    fcb: { alt: string; hp: string; none: string; skill: string };
    health: { auto: string; manual: string; roll: string };
} = ...

Accessors

  • get title(): string
  • An Application window should define its own title definition logic which may be dynamic depending on its data

    Returns string

  • get defaultOptions(): InsertKeys<{}, OmitByValue<{}, never>>
  • Assign the default options which are supported by the entity edit sheet.

    Returns InsertKeys<{}, OmitByValue<{}, never>>

    The default options for this FormApplication class

    Application.defaultOptions

    foundry.utils.mergeObject(super.defaultOptions, {
    classes: ["form"],
    closeOnSubmit: true,
    editable: true,
    sheetConfig: false,
    submitOnChange: false,
    submitOnClose: false
    });

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

  • Internal

    Spoof roll, for maximized, auto and manual health.

    Parameters

    • roll: Roll<any>
    • value: number

    Returns Roll<any>

  • Returns
        | undefined
        | {
            itemData: {
                img: "systems/pf1/icons/skills/affliction_10.jpg";
                name: "PF1.LevelUp.AbilityScore.Item.Name";
                system: {
                    description: { value: "PF1.LevelUp.AbilityScore.Item.Desc" };
                    subType: "misc";
                };
                type: "feat";
            };
            update: boolean;
        }
        | { itemData: { _id: any; "system.changes": any }; update: boolean }

  • This method is called upon form submission after form data is validated

    Parameters

    • event: any

      The initial triggering submission event

    • formData: any

      The object of validated form data with which to update the object

    Returns Promise<unknown>

    A Promise which resolves once the update operation has completed

  • Parameters

    • html: JQuery<HTMLElement>

    Returns void

  • Returns Promise<
        {
            abilityScore: { new: number; used: number; get available(): number };
            actor: ActorPF;
            config: config;
            document: ItemClassPF;
            fcb: { available: boolean; choice: string; unavailable: boolean };
            feats: number;
            health: { manual: null; type: null; value: number };
            icons: any;
            item: PropertiesToSource<ItemDataBaseProperties>;
            labels: { fcb: { alt: string; hp: string; none: string; skill: string } };
            useBackgroundSkills: unknown;
            visibility: null;
            visibilityOptions: {
                blindroll: "PF1.Chat.Visibility.Blind";
                gmroll: "PF1.Chat.Visibility.Private";
                publicroll: "PF1.Chat.Visibility.Public";
                selfroll: "PF1.Chat.Visibility.Self";
            };
        },
    >

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

  • Parameters

    • actor: Actor

      Owning actor

    • itemData: object

      Class item data

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

      Additional options

      • Optionaltoken?: TokenDocument

        Associated token

    Returns Promise<null | Item>

  • Parameters

    • actor: Actor

      Owning actor

    • item: Item

      Class item

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

      Additional options

      • Optionaltoken?: TokenDocument

        Associated token

    Returns Promise<undefined | null | Item>

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