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

    Function applyEffectToActor

    • Apply a single effect (ActiveEffect or journal page) to a target actor. Resolves the source, checks for existing copies by origin, and creates or enables as needed. This shared core logic is used by both the applyEffects trigger outcome and party-push feature.

      Parameters

      • sourceUuid: string

        UUID of the effect or journal page to apply

      • targetActor: Actor

        The actor to apply the effect to

      • OptionalsourceActor: any = null

        The actor that owns the source (for self-apply detection and legacy UUID resolution)

      • Optionaloptions: {
            allowSelfApply?: boolean;
            bumpStackCount?: boolean;
            featureItem?: any;
            initialStackCount?: number;
            parentItem?: any;
        } = {}

        Configuration options

        • OptionalallowSelfApply?: boolean

          If true and applying to self, enable in-place; if false, always create copy

        • OptionalbumpStackCount?: boolean

          If true, bump existing copies (applyEffects behavior); if false, set to initialStackCount (party-push behavior)

        • OptionalfeatureItem?: any

          Feature item (for legacy UUID resolution)

        • OptionalinitialStackCount?: number

          Stack count for stackable effects (for initial creation)

        • OptionalparentItem?: any

          Parent item (for legacy UUID resolution)

      Returns Promise<any>

      The applied effect, or null if resolution failed