113 lines
2.6 KiB
TypeScript
113 lines
2.6 KiB
TypeScript
export enum CardEffects {
|
|
//Base
|
|
GOLD = "gold",
|
|
DAMAGE = "damage",
|
|
HEAL = "heal",
|
|
PREPARE = "prepare",
|
|
STUN = "stun",
|
|
SACRIFICE = "sacrifice",
|
|
DRAW = "draw",
|
|
DRAW_AND_DISCARD = "draw_and_discard",
|
|
MAKE_DISCARD = "make_discard",
|
|
RESTACK_DISCARDED_CHAMPION = "restack_discarded_champion",
|
|
RESTACK_DISCARDED_CARD = "restack_discarded_card",
|
|
STACK_NEXT_ACTION_BOUGHT = "stack_next_action_bought",
|
|
STACK_NEXT_CARD_BOUGHT = "stack_next_card_bought",
|
|
PLAY_NEXT_CARD_BOUGHT = "play_next_card_bought",
|
|
|
|
//DLCs
|
|
BUY_FOR_FREE = "buy_for_free",
|
|
|
|
//Journeys
|
|
DAMAGE_ALL_CHAMPIONS = "damage_all_champions",
|
|
|
|
//Journeys: Hunters
|
|
DISCARD_X_AND_DRAW_X = "discard_x_and_draw_x",
|
|
PREPARE_ANOTHER_CHAMPION = "prepare_another_champion",
|
|
//Journey: Travelers
|
|
PREPARE_ALL_CHAMPIONS = "prepare_all_champions",
|
|
CHEAPER_CHAMPION = "cheaper_champion",
|
|
CHEAPER_CHAMPIONS_PASSIVE = "cheaper_champions_passive",
|
|
CHEAPER_ACTION = "cheaper_action",
|
|
CONTROL_OPPOSING_CHAMPION_PASSIVE = "control_opposing_champion_passive",
|
|
|
|
RESTACK_DISCARDED_ACTION = "restack_discarded_action",
|
|
|
|
//Ancestry
|
|
KEEP_IN_HAND = "keep_in_hand",
|
|
BUY_GEM_FOR_FREE = "buy_gem_for_free",
|
|
CHEAPER_SKILLS_PASSIVE = "cheaper_skills_passive",
|
|
CHEAPER_CARD_IF_HIGHER_PRICE = "cheaper_card_if_higher_price",
|
|
PICK_FACTION = "pick_faction",
|
|
}
|
|
|
|
export enum CardType {
|
|
HERO = "hero",
|
|
HERO_ABILITY = "hero_ability",
|
|
CURRENCY = "currency",
|
|
WEAPON = "weapon",
|
|
CHAMPION = "champion",
|
|
ACTION = "action",
|
|
ITEM = "item",
|
|
}
|
|
|
|
export interface GameObject {
|
|
_id: string;
|
|
}
|
|
|
|
export interface PlayingTurn {
|
|
currentTeam: string;
|
|
cardsLocked: string[];
|
|
lockedEffects: string[];
|
|
tokens: Effect[];
|
|
damage: number;
|
|
gold: number;
|
|
}
|
|
|
|
export interface Game extends GameObject {
|
|
fireGems: Container;
|
|
market: Container;
|
|
marketStack: Container;
|
|
teams: Team[];
|
|
currentTurn: PlayingTurn;
|
|
started: boolean;
|
|
owner: User;
|
|
}
|
|
|
|
export interface Team extends GameObject {
|
|
players: Player[];
|
|
health: number;
|
|
}
|
|
|
|
export interface Player extends GameObject {
|
|
board: Container;
|
|
discard: Container;
|
|
hand: Container;
|
|
stack: Container;
|
|
user: User;
|
|
discardMarkers: number;
|
|
fuckUMarkers: number;
|
|
}
|
|
|
|
export interface User extends GameObject {
|
|
userId: string;
|
|
avatar: string;
|
|
username: string;
|
|
}
|
|
|
|
export interface Container extends GameObject {
|
|
cards: Card[];
|
|
shuffling?: boolean;
|
|
}
|
|
|
|
export interface Effect extends GameObject {
|
|
effect: CardEffects;
|
|
}
|
|
export interface Card extends GameObject {
|
|
cardId: number;
|
|
cardType: CardType;
|
|
effects: Effect[];
|
|
defense?: number;
|
|
guard?: boolean;
|
|
}
|