Body, Mind & Soul — API Reference
    Preparing search index...

    Class BodyMindSoulActiveEffect

    Hierarchy

    • any
      • BodyMindSoulActiveEffect
    Index
    • Find this effect's remaining resolution time in the BMS combat tracker. Searches all started combats rather than only game.combat (the active scene's combat) so that effects in non-viewed scenes resolve correctly.

      Returns number | null

      Remaining downs, or null if not in tracker.

    • Build forwarded data from an origin document.

      Parameters

      • originDoc: Document

        The resolved origin (page or AE)

      Returns { doc: object; system: object } | null

      Document-level and system-level data, or null.

    • Determine whether this effect is the canonical/original definition (irreplaceable, authored directly on its current parent) versus a disposable instance dynamically applied to some other document. Used to gate cross-document delete attempts.

      Returns boolean

      true if this effect should be treated as protected from deletion.

    • Parameters

      • data: any
      • options: any
      • userId: any

      Returns Promise<void>

    • Parameters

      • options: any
      • userId: any

      Returns void

    • Parameters

      • changed: any
      • options: any
      • userId: any

      Returns Promise<void>

    • Defense-in-depth guard against destructive cross-document deletes.

      This does not gate ordinary deletes (sheet delete buttons, drag-delete, removeEffectByName's current actor-only search, etc.) — it only fires when a caller opts in via options.bmsCrossDocumentSearch: true, a flag convention matching other options-flags already used across this codebase to mark a write as originating from a specific cross-document code path (bmsResolving/bmsAdvance/bmsAccelerated on combat.update(), bmsPropagate on linked-document updates — see .claude/contexts/combat.md and .claude/contexts/active-effects.md). Intended for any future automated delete path that searches beyond an actor's own embedded effects (e.g. via getAllActiveEffectSources()) — not currently used by any outcome, since removeEffectByName deliberately keeps its search scope actor-only (see .claude/contexts/triggers.md).

      When set, refuses the delete if this effect is the canonical/original definition (see _isCanonicalDefinition) rather than a disposable applied copy — e.g. a gear item's own built-in effect, which must never be permanently destroyed by a cross-document search that only meant to remove an applied copy.

      Parameters

      • options: object

        Delete options. options.bmsCrossDocumentSearch: true opts into the canonical-definition guard.

      • user: string

        Id of the user requesting the delete.

      Returns Promise<boolean | void>

      false to block the delete when the guard trips; otherwise defers to super._preDelete.

    • Resolve the origin document synchronously. Returns the source document (a JournalEntryPage for bmsEffect pages, or an ActiveEffect) or null.

      Returns Document | null

    • Show scrolling floating text on the actor's token when this effect is gained or lost.

      Parameters

      • gained: boolean

        true = gained (green), false = lost (red)

      Returns void

    • Returns void

    • Parameters

      • source: boolean = true

      Returns any

    • Parameters

      • id: any

      Returns TriggerProxy | null

    • Override updateDuration to inject BMS tracker-based remaining downs. Always installs live-reading getters for remaining/label on this.duration so they reflect tracker changes without requiring a full re-prepare. Falls back to native Foundry values when the effect is not in the tracker.

      Returns any