Archived
55 lines
1.5 KiB
TypeScript
55 lines
1.5 KiB
TypeScript
import type { ICard, IGame, IGameObject, IPlayer } from "./index.js"
|
|
|
|
export enum ContainerVisibility {
|
|
NONE = "none",
|
|
ONLY_LAST = "only_last",
|
|
ALL = "all",
|
|
PROTECTED = "protected"
|
|
}
|
|
|
|
export interface IContainer<T> extends IGameObject {
|
|
owner: T
|
|
readonly visibility: ContainerVisibility
|
|
}
|
|
|
|
export interface IInteractibleContainer extends IContainer<IPlayer> {
|
|
readonly visibility: ContainerVisibility.ALL | ContainerVisibility.PROTECTED
|
|
request_sacrifice: (card: ICard) => void
|
|
}
|
|
|
|
export interface IPlayableContainer extends IInteractibleContainer {
|
|
request_discard: (card: ICard) => void
|
|
}
|
|
|
|
export interface IMarketStack extends IContainer<IGame> {
|
|
readonly visibility: ContainerVisibility.NONE
|
|
}
|
|
|
|
export interface IMarket extends IContainer<IGame> {
|
|
readonly visibility: ContainerVisibility.ALL
|
|
request_buy: (card: ICard) => void
|
|
request_buyInHand: (card: ICard) => void
|
|
request_buyInStack: (card: ICard) => void
|
|
}
|
|
|
|
export interface IFireGemsStack extends IMarket {
|
|
|
|
}
|
|
|
|
export interface IPlayerStack extends IContainer<IPlayer> {
|
|
readonly visibility: ContainerVisibility.NONE
|
|
}
|
|
|
|
export interface IPlayerDiscard extends IInteractibleContainer {
|
|
readonly visibility: ContainerVisibility.ALL
|
|
request_putOnStack: (card: ICard) => void
|
|
}
|
|
|
|
export interface IPlayerHand extends IPlayableContainer {
|
|
readonly visibility: ContainerVisibility.PROTECTED
|
|
}
|
|
|
|
export interface IPlayerBoard extends IPlayableContainer {
|
|
readonly visibility: ContainerVisibility.ALL
|
|
request_stunChampion: (card: ICard) => void
|
|
} |