UNPKG

@typed-tabletop-simulator/lib

Version:
41 lines (40 loc) 1.59 kB
/** @noSelfInFile */ import { BaseProperties } from "./baseObject"; export interface CustomDeckProperties extends BaseProperties { /** The type of each card. */ type?: CardType; /** URL to the front image of the deck sheet. */ front: string; /** URL to the back image of the deck sheet. */ back: string; /** If `true`, the back image is considered to be a sheet iteself instead of a single image. */ uniqueBack?: boolean; /** Number of cards in each row of the sheet. */ width: number; /** Number of cards in each column of the sheet. */ height: number; /** The cards inside the deck. */ cards: CardProperties[]; } export interface CardProperties extends BaseProperties { /** Zero-based index of the card in the sheet. */ index: number; } /** * Sets the starting deck id that will be used. * This is useful if multiple processes create content for the same TTS save, since otherwise their deck ids would clash. */ export declare const setCurrentDeckId: (id: number) => number; /** * Creates a new deck with the given properties. * * By default the `BackIsHidden` property is set to `true`. */ export declare const createDeck: (properties: CustomDeckProperties) => DeckCustomData; /** * Combines the given decks into a single deck. The result deck has the properties (name, tags, etc.) of the first deck in the list. * Only the cards of the other decks will be added to the first deck. * * *NOTE*: This operation mutates the first deck! */ export declare const combineDecks: (decks: DeckCustomData[]) => DeckCustomData;