Options
All
  • Public
  • Public/Protected
  • All
Menu

The client-side Card document which extends the common BaseCard document model.

mixes

ClientDocumentMixin

see

Cards The Cards document type which contains Card embedded documents

see

CardConfig The Card configuration application

Hierarchy

  • any
    • Card

Index

Constructors

  • Returns Card

Accessors

  • get currentFace(): any
  • The current card face

    Returns any

  • get img(): string
  • The image of the currently displayed card face or back

    Returns string

  • A reference to the source Cards document which defines this Card.

    Returns Cards

  • get isHome(): boolean
  • A convenience property for whether the Card is within its source Cards stack. Cards in decks are always considered home.

    Returns boolean

  • get showFace(): boolean
  • Whether to display the face of this card?

    Returns boolean

  • get hasNextFace(): boolean
  • Does this Card have a next face available to flip to?

    Returns boolean

  • get hasPreviousFace(): boolean
  • Does this Card have a previous face available to flip to?

    Returns boolean

Methods

  • prepareDerivedData(): void
  • override

    Returns void

  • flip(face: number): Promise<Card>
  • Flip this card to some other face. A specific face may be requested, otherwise: If the card currently displays a face the card is flipped to the back. If the card currently displays the back it is flipped to the first face.

    Parameters

    • face: number

    Returns Promise<Card>

    A reference to this card after the flip operation is complete

  • pass(to: Cards, [options={}]?: { updateData: any }): Promise<Card>
  • Pass this Card to some other Cards document.

    Parameters

    • to: Cards

      A new Cards document this card should be passed to

    • [options={}]: { updateData: any } = {}

      Options which modify the pass operation

      • updateData: any

    Returns Promise<Card>

    A reference to this card after it has been passed to another parent document

  • play(to: any, __namedParameters?: { updateData: {} }): Promise<any>
  • alias

    Card#pass

    see

    Card#pass

    inheritdoc

    Parameters

    • to: any
    • __namedParameters: { updateData: {} } = {}
      • updateData: {}

      Returns Promise<any>

    • discard(to: any, __namedParameters?: { updateData: {} }): Promise<any>
    • alias

      Card#pass

      see

      Card#pass

      inheritdoc

      Parameters

      • to: any
      • __namedParameters: { updateData: {} } = {}
        • updateData: {}

        Returns Promise<any>

      • recall(options?: any): Promise<Card>
      • Recall this Card to its original Cards parent.

        Parameters

        • options: any = {}

        Returns Promise<Card>

        A reference to the recalled card belonging to its original parent

      • toMessage(messageData?: any, options?: any): Promise<ChatMessage>
      • Create a chat message which displays this Card.

        Parameters

        • messageData: any = {}
        • options: any = {}

        Returns Promise<ChatMessage>

        The created chat message

      Properties

      name: any