Foundry Virtual Tabletop - API Documentation - Version 14
    Preparing search index...

    Function passCards

    • A hook event that fires when Cards are passed from one stack to another.

      Parameters

      • origin: documents.Cards

        The origin Cards document

      • destination: documents.Cards

        The destination Cards document

      • context: {
            action: string;
            fromDelete: object[];
            fromUpdate: object[];
            toCreate: object[];
            toUpdate: object[];
        }

        Additional context which describes the operation

        • action: string

          The action name being performed, i.e. "pass", "play", "discard", "draw"

        • fromDelete: object[]

          Card deletion operations to be performed in the origin Cards document

        • fromUpdate: object[]

          Card update operations to be performed in the origin Cards document

        • toCreate: object[]

          Card creation operations to be performed in the destination Cards document

        • toUpdate: object[]

          Card update operations to be performed in the destination Cards document

      Returns void