Level-up and class addition wizard.

Hierarchy

  • any
    • LevelUpForm

Constructors

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: (
            ...this: any,
            event: PointerEvent,
            button: HTMLElement,
        ) => void;
        commit: (event: Event) => Promise<void>;
        openSheet: (event: PointerEvent, button: HTMLElement) => Promise<void>;
        skip: (event: any) => Promise<void>;
    };
    classes: string[];
    form: {
        closeOnSubmit: boolean;
        handler: (
            event: Event,
            form: HTMLFormElement,
            formData: FormDataExtended,
        ) => Promise<void>;
        submitOnChange: boolean;
        submitOnClose: boolean;
    };
    id: string;
    position: { height: string; width: number };
    tag: string;
    window: { icon: string; resizable: boolean };
} = ...
ICONS: {
    fcb: { alt: string; hp: string; none: string; skill: string };
    health: { auto: string; manual: string; roll: string };
} = ...
item: any
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>
  • Promise for when the wizard finishes.

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

    Returns Promise<null | Item>

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

  • Initialize values

    Calculates many effects of the different levels.

    • Skills
    • Ability score effects
    • HD changes etc.

    Returns void

  • Parameters

    • options: any

    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: {};
            ready: boolean;
            visibility: null;
        },
    >

  • 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: "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;
        }
        | { itemData: { _id: any; "system.changes": any }; 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>

  • Parameters

    • ...this: any
    • event: PointerEvent
    • button: HTMLElement

    Returns void

  • Sync visible data to internal handling.

    Parameters

    • event: Event
    • form: HTMLFormElement
    • formData: FormDataExtended

    Returns Promise<void>

  • Protected

    Parameters

    • event: PointerEvent
    • button: HTMLElement

    Returns Promise<void>

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