diff options
author | Frans Bongers <fransbongers@franss-mbp.home> | 2024-12-01 20:07:32 +0100 |
---|---|---|
committer | Frans Bongers <fransbongers@franss-mbp.home> | 2024-12-01 20:07:32 +0100 |
commit | e32cc3efe1c1ef5378cef422555e8c8289449938 (patch) | |
tree | 8635f5131bd3b261b1b690df9d9f72626cfdf440 /types.d.ts | |
parent | 74e1497d50a6ff81c74c593f2d0f7018d2995fd8 (diff) | |
download | land-and-freedom-e32cc3efe1c1ef5378cef422555e8c8289449938.tar.gz |
add card effects
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 |