From e32cc3efe1c1ef5378cef422555e8c8289449938 Mon Sep 17 00:00:00 2001 From: Frans Bongers Date: Sun, 1 Dec 2024 20:07:32 +0100 Subject: add card effects --- types.d.ts | 46 +++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 45 insertions(+), 1 deletion(-) (limited to 'types.d.ts') diff --git a/types.d.ts b/types.d.ts index a79c951..b470acc 100644 --- a/types.d.ts +++ b/types.d.ts @@ -37,7 +37,7 @@ export interface Game { medaillons: Array; tableaus: Record; tracks: number[]; - + triggered_track_effects: number[][]; result?: string; victory?: string; @@ -93,4 +93,48 @@ export interface LeafNode { p: FactionId; // Player a?: any; // args r?: 0 | 1; // 1 if resolved +} + +export interface CardBase { + id: number; + title: string; +} + +export type Card = EventCard | PlayerCard; + +export interface EventCard extends CardBase { + type: 'ec'; + year: number; + effects: Effect[]; +} + +export interface PlayerCard extends CardBase { + type: 'pc'; + strength: number; + effects: Effect[]; +} + +export interface Effect { + type: 'attack' | 'track' | 'bonus' | 'hero_points' | 'front' | 'medaillon' | 'draw_card' | 'swap_card_tableau_hand' | 'add_to_tableau' | 'remove_blank_marker' | 'return_card'; + target: string | number; + value: number; +} + +export interface StaticData { + cards: Card[]; + fronts: Array<{ + id: string; + name: string; + left: number; + top: number; + }>; + medaillons: Array<{ + id: number; + name: string; + }>; + tracks: Array<{ + id: number; + name: string; + triggers: Array; + }>; } \ No newline at end of file -- cgit v1.2.3