An application offering the user an interface to use the point-buy rules described in the Pathfinder CRB to determine their characters ability scores.

Hierarchy

  • any
    • PointBuyCalculator

Constructors

Properties

abilities: {
    key: string;
    name:
        | "PF1.AbilityStr"
        | "PF1.AbilityDex"
        | "PF1.AbilityCon"
        | "PF1.AbilityInt"
        | "PF1.AbilityWis"
        | "PF1.AbilityCha";
    value: any;
}[]

The actors current ability scores.

max: number

The maximum value an ability score can be set to.

min: number

The minimum value an ability score can be set to.

DEFAULT_OPTIONS: {
    actions: {
        control: (...this: any, event: any, target: any) => Promise<void>;
    };
    classes: string[];
    form: {
        closeOnSubmit: boolean;
        handler: (...this: any) => Promise<void>;
        submitOnChange: boolean;
        submitOnClose: boolean;
    };
    position: { width: number };
    sheetConfig: boolean;
    tag: string;
    window: { minimizable: boolean; resizable: boolean };
} = ...
PARTS: { footer: { template: string }; form: { template: string } } = ...

Accessors

Methods

  • Internal

    Returns Promise<
        {
            abilities: {
                key: string;
                name: | "PF1.AbilityStr"
                | "PF1.AbilityDex"
                | "PF1.AbilityCon"
                | "PF1.AbilityInt"
                | "PF1.AbilityWis"
                | "PF1.AbilityCha";
                value: any;
            }[];
            buttons: { icon: string; label: string; type: string }[];
            closest: string;
            invalidPoints: boolean;
            limits: (
                | {
                    key: string;
                    label: "PF1.Application.PointBuy.Type.low";
                    points: 10;
                }
                | {
                    key: string;
                    label: "PF1.Application.PointBuy.Type.standard";
                    points: 15;
                }
                | {
                    key: string;
                    label: "PF1.Application.PointBuy.Type.high";
                    points: 20;
                }
                | {
                    key: string;
                    label: "PF1.Application.PointBuy.Type.epic";
                    points: 25;
                }
            )[];
            max: number;
            min: number;
            points: number;
        },
    >

  • Internal

    Update ability score value display and remaining points on subtract/add operations.

    Parameters

    • ...this: any
    • event: any
    • target: any

    Returns Promise<void>