diff options
Diffstat (limited to 'types.d.ts')
-rw-r--r-- | types.d.ts | 46 |
1 files changed, 45 insertions, 1 deletions
@@ -37,7 +37,7 @@ export interface Game { medaillons: Array<number | null>; tableaus: Record<FactionId, CardId[]>; 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<null | Effect>; + }>; }
\ No newline at end of file |