The shape of system on a mysticalability item — i.e. item.system (equivalently item.logic.data) when item.type === "mysticalability". The backing DataModel implements this interface.

interface MysticalAbilityData<
    TLogic extends
        MysticalAbilityLogic<MysticalAbilityData> = MysticalAbilityLogic<any>,
> {
    actionDefs: sohl.entity.action.SohlAction.Data[];
    actorLogic: null
    | SohlActorLogic<any>;
    assocAffiliationCode?: null | string;
    assocSkillCode?: null | string;
    charges: { max: null | number; value: null | number };
    docHtml: HTMLString;
    id: string;
    improveFlag: boolean;
    isOwner: boolean;
    kind: string;
    lastRun?: Record<string, number>;
    levelBase: null | number;
    logic: TLogic;
    masteryLevelBase: number;
    name: string;
    notes: HTMLString;
    parent: null | SohlItem;
    scheduledActions?: ScheduledAction[];
    shortcode: string;
    subType: MysticalAbilitySubType;
    type: string;
    uuid: string;
    get item(): SohlItem;
    getFlag(scope: string, key: string): unknown;
    label(options?: { withName: boolean; withSubType: boolean }): string;
    setFlag(scope: string, key: string, value: unknown): Promise<unknown>;
    update(data: object): Promise<unknown>;
}

Type Parameters

Hierarchy (View Summary)

Properties

Serialized action definitions used to build the logic's actions map.

actorLogic: null | SohlActorLogic<any>

The logic of the owning actor — this actor's own logic when the data is an actor's, the owning actor's logic when it is an item's, or null.

assocAffiliationCode?: null | string

Shortcode of the faction/Affiliation whose standing this ability draws on (a religion, arcane/alchemical school, or ancestor/totem/spirit), or null when the ability is not affiliation-associated. Resolved to MysticalAbilityLogic.affiliation during MysticalAbilityLogic.evaluate.

assocSkillCode?: null | string

Shortcode of the skill used to activate this ability

charges: { max: null | number; value: null | number }

Usage tracking: current charges and maximum. Whether the ability uses charges at all is carried by max alone — there is no separate flag.

Type declaration

  • max: null | number

    Maximum number of charges. 0 means no maximum; null means the ability does not use charges.

  • value: null | number

    Current number of charges remaining. null means infinite.

docHtml: HTMLString

Rich-text description shown on the item's sheet and chat cards.

id: string

The owning document's id.

improveFlag: boolean

Whether this item is flagged for mastery improvement via SDR

isOwner: boolean

Whether the current user owns the document (edit permission).

kind: string

The document kind (its actor or item type id).

lastRun?: Record<string, number>

Generic run record (issue #579) — a map of actionName → the world time (seconds) that action last performed on this document, stamped at the action chokepoint for actions flagged recordsLastRun. The past-tense mirror of scheduledActions: "when did X last happen here?" for any action, without a bespoke field, and it survives after a schedule ends. For an event-driven trigger (no computable next fire) it is the only meaningful temporal fact.

levelBase: null | number

Power level of this ability, or null when it has no level.

logic: TLogic

The logic instance built from this data.

masteryLevelBase: number

Mastery level of this mystical ability if assocSkillCode is blank

name: string

The owning document's name.

notes: HTMLString

Rich-text GM/player notes for the item.

parent: null | SohlItem

The Foundry document (actor or item) this data belongs to, or null.

scheduledActions?: ScheduledAction[]

Persisted recurring/deferred schedules for this document (issue #588) — each entry defers actionName to anchor + interval. The generic store that replaces the retired bespoke last*Date anchors; a recurring effect's finalize() re-arms these into the event queue on every preparation. Only documents whose data model extends the base SohlDataModel (actors, items, combatants) carry it — hence optional here. See https://kb.heroiclands.org/dev/reference/event-queue/.

shortcode: string

Short identity code for this document.

Ability type (Incantation, Rite, Talent, etc.)

type: string

The owning document's type (its actor or item kind).

uuid: string

The owning document's globally-unique id, treated as an opaque identity token: pass it through (e.g. into chat-card data) and resolve it back to logic via fvttLogicFromUuid / fvttLogicFromUuidSync — never fromUuid it to a Foundry document inside the logic layer.

Accessors

Methods

  • The item's display label; with withName, includes the item's name, and with withSubType, includes its sub-type.

    Parameters

    • Optionaloptions: { withName: boolean; withSubType: boolean }

    Returns string

  • Write a namespaced flag on the owning document.

    Parameters

    • scope: string
    • key: string
    • value: unknown

    Returns Promise<unknown>