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

    Class BodyMindSoulCombat

    Hierarchy

    • Combat
      • BodyMindSoulCombat

    Indexable

    • [key: string]: any
    Index
    • get initiativeTokenIds(): Set<string>

      Get the set of token IDs for combatants that currently "have initiative" (no actions queued on any down of the tracker). Defeated combatants are excluded.

      Returns Set<string>

    • get resolvingTokenIds(): Map<string, string>

      Get a map of token IDs → action type for combatants with an action at resolutionTime === 0 (i.e., currently resolving this down). Defeated combatants are excluded. Type is taken from the first action found for each combatant.

      Returns Map<string, string>

    • After resolve() fires, reconcile the snapshot downs with the live DB state:

      • New entries (trigger-spawned during resolve): merged in from the live DB.
      • Original entries moved to a different down: removed from their snapshot position and inserted at the live down using the live DB version (which has the updated resolutionTime and cleared resolved flag).
      • Original entries deleted from the live DB: removed from the snapshot so they aren't re-added by the final write.

      Parameters

      • downs: any
      • originalActionIds: any
      • originalEffectIds: any
      • sweptActionIds: Set<any> = ...
      • sweptEffectIds: Set<any> = ...

      Returns void

    • Parameters

      • parent: any
      • collection: any
      • documents: any
      • data: any
      • options: any
      • userId: any

      Returns void

    • Parameters

      • options: any
      • userId: any

      Returns void

    • Parameters

      • parent: any
      • collection: any
      • documents: any
      • ids: any
      • options: any
      • userId: any

      Returns void

    • Parameters

      • trackerEffect: any

      Returns Promise<void>

    • Parameters

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

      Returns void

    • Parameters

      • parent: any
      • collection: any
      • documents: any
      • changes: any
      • options: any
      • userId: any

      Returns void

    • Parameters

      • changed: any
      • options: any
      • user: any

      Returns Promise<void>

    • Parameters

      • steps: any

      Returns Promise<
          {
              downs: any;
              expiredEffects: any;
              originalActionIds: Set<any>;
              originalEffectIds: Set<any>;
              resolvingActions: any;
              sweptActionIds: Set<any>;
              sweptEffectIds: Set<any>;
          },
      >

    • Returns void

    • Parameters

      • downIndex: any
      • actionData: any

      Returns Promise<BodyMindSoulCombat | undefined>

    • Parameters

      • downIndex: any
      • effectData: any

      Returns Promise<BodyMindSoulCombat | undefined>

    • Returns Promise<void>

    • Returns Promise<void>

    • Returns Promise<any>

    • Queue an action from the character sheet into the combat tracker.

      Parameters

      • actorOrId: any

        The actor object (preferred) or base actor ID string. Passing the actor object is required for correct resolution of NPC delta actors (unlinked tokens), where multiple combatants may share the same actorId.

      • actionItemId: string

        The action item's ID

      • options: {} = {}

      Returns Promise<BodyMindSoulCombat | undefined>

    • Queue an embedded item action from the actor sheet. Decrements quantity for usable non-equipable items after queueing.

      Parameters

      • actor: Actor
      • parentItemId: string
      • embeddedActionId: string
      • OptionalswingIndex: number = 0
      • options: {} = {}

      Returns Promise<BodyMindSoulCombat | undefined>

    • Queue a single swing onto the combat tracker.

      Parameters

      • combatantId: string

        The combatant's ID

      • actionItem: Item

        The action Item document

      • swingData: object

        The swing data { duration, type }

      • swingIndex: number

        The index of this swing in the action's swings array

      • extraData: {} = {}

      Returns Promise<BodyMindSoulCombat | undefined>

    • Parameters

      • downNumber: any
      • actionId: any

      Returns Promise<void>

    • Parameters

      • combatantId: any

      Returns Promise<any>

    • Parameters

      • downNumber: any
      • effectId: any

      Returns Promise<any>

    • Resolve one or more actions whose resolution time has reached zero.

      GM-centralised: all swing triggers execute on the lead GM client. Interactive dialogs (target pickers, templates, compel checks, etc.) route to the appropriate user via promptFor. Multiple resolves run in parallel — each system.resolve pushes any next-swing / channel-loop entries into downs[0].actions (atomic Array.push, so the union is the final state even under interleaving).

      Parameters

      • downs: object[]

        Mutable downs snapshot shared with the caller.

      • resolvingActions: TrackerActionModel[] = []

        Live DataModel instances.

      Returns Promise<void>

    • Parameters

      • value: any

      Returns Promise<any>

    • Parameters

      • downIndex: any
      • actionId: any
      • actionData: any

      Returns Promise<any>

    • Parameters

      • downNumber: any
      • effectId: any
      • effectData: any

      Returns Promise<any>