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

    Class default

    Hierarchy

    • any
      • default
    Index
    • Returns default

    • Classify which actions and effects are affected by advancing steps downs. Returns live DataModel instances so callers can use .actor, .combatant, etc.

      Parameters

      • steps: number

      Returns { expiredEffects: TrackerEffectModel[]; resolvingActions: TrackerActionModel[] }

    • Find a live TrackerActionModel across all downs.

      Parameters

      • downNumber: any
      • actionId: any

      Returns any

    • Find a live CombatDownModel by its downNumber.

      Parameters

      • downNumber: any

      Returns any

    • Find a live TrackerEffectModel across all downs.

      Parameters

      • downNumber: any
      • effectId: any

      Returns any

    • Find the index of the first non-empty down after index 0, or -1 if none. Used by advanceToNextResolution to determine step count.

      Returns any

    • Get down-0 actions that are due to resolve (resolutionTime <= 0) but haven't resolved yet (resolved !== true). This is the exact state a natural advance's decrement/sweep loop (_processCombatSteps in module/documents/combat.mjs) would unconditionally decrement to -1 and sweep out of the persisted downs array on its next call — the root cause of the data-loss bug resolveCurrentDown() exists to make unreachable (see .claude/contexts/combat.md → "Resolve Mode vs Advance Mode"). Used both by BodyMindSoulCombat#resolveCurrentDown() to find what to resolve, and by the advance-guard in advanceTracker()/ advanceToNextResolution() to refuse to run while any exist.

      Two exclusions, both required to avoid gating on entries that can never transition to resolved: true through the real resolve pipeline (which would otherwise permanently deadlock the advance guard):

      • hold-type actions: a hold intentionally sits pinned at resolutionTime === 0 with resolved permanently false (see ResolvePass#markResolved's hold exemption).
      • Actions with no actionItemId and not the surveyEnvironment pseudo- action: BodyMindSoulCombat#resolve() only ever resolves (and calls pass.markResolved for) actions matching a?.actionItemId || a.embeddedActionId === "surveyEnvironment" — everything else is a bookkeeping-only tracker entry (e.g. a backswing marker) that's meant to simply decrement to -1 and sweep out naturally on a normal advance, never routed through resolve/markResolved at all.

      Returns TrackerActionModel[]

      Live tracker action instances on down 0 that are genuinely stuck due-and-unresolved, excluding holds and non-resolvable bookkeeping entries.

    • Returns { bms: any }

    • Redistribute all actions and effects in a plain-object downs array to their correct down slots by resolutionTime. Mutates the array in place. Called from _preUpdate before Foundry validation.

      Parameters

      • downs: object[]

        Plain-object downs array from toObject()

      Returns void