diff options
author | Frans Bongers <fransbongers@franss-mbp.home> | 2024-12-27 19:45:21 +0100 |
---|---|---|
committer | Frans Bongers <fransbongers@franss-mbp.home> | 2024-12-27 19:45:21 +0100 |
commit | 9d0630a33e0358f943e68008823f355bceb71be1 (patch) | |
tree | bbb5b0cd5e1b8381d767ee1694f928f24f8a5ac9 /data.ts | |
parent | 5dc1ee327e16431b6700f3977469943f002a0c7c (diff) | |
download | land-and-freedom-9d0630a33e0358f943e68008823f355bceb71be1.tar.gz |
setup for event effects
Diffstat (limited to 'data.ts')
-rw-r--r-- | data.ts | 79 |
1 files changed, 47 insertions, 32 deletions
@@ -5,6 +5,7 @@ const COLLECTIVIZATION = 1; const GOVERNMENT = 2; const SOVIET_SUPPORT = 3; const FOREIGN_AID = 4; +const LIBERTY_OR_COLLECTIVIZATION = 5; const MORALE_BONUS = 0; const TEAMWORK_BONUS = 1; @@ -32,9 +33,9 @@ const SELF = 'self'; const OTHER_PLAYERS = 'other'; const TRASH = 'trash'; -const ANARCHISTS_ID = 'a' as FactionId; -const COMMUNISTS_ID = 'c' as FactionId; -const MODERATES_ID = 'm' as FactionId; +const ANARCHISTS_ID: FactionId = 'a'; +const COMMUNISTS_ID: FactionId = 'c'; +const MODERATES_ID: FactionId = 'm'; const ANARCHIST = 'Anarchist' as Player; const COMMUNIST = 'Communist' as Player; @@ -43,6 +44,7 @@ const MODERATE = 'Moderate' as Player; const VICTORY = 'Victory'; const DEFEAT = 'Defeat'; +// Medallion ids const STRATEGY_MEDALLION_ID = 3; const PROPAGANDA_MEDALLION_ID = 4; const INTELLIGENCE_MEDALLION_ID = 5; @@ -50,6 +52,10 @@ const VOLUNTEERS_MEDALLION_ID = 6; const ARCHIVES_MEDALLION_ID = 7; const ORGANIZATION_MEDALLION_ID = 8; +// Abilities granted by cards +const ANARCHIST_EXTRA_HERO_POINT = 0; +const COMMUNIST_EXTRA_HERO_POINT = 1; + function create_effect( type: Effect['type'], target: Effect['target'], @@ -66,6 +72,7 @@ function create_effect( export { create_effect, + ALL_PLAYERS, ANARCHIST, COMMUNIST, MODERATE, @@ -100,6 +107,13 @@ export { VOLUNTEERS_MEDALLION_ID, ARCHIVES_MEDALLION_ID, ORGANIZATION_MEDALLION_ID, + MADRID, + ARAGON, + SOUTHERN, + NORTHERN, + ANARCHIST_EXTRA_HERO_POINT, + COMMUNIST_EXTRA_HERO_POINT, + LIBERTY_OR_COLLECTIVIZATION, }; const data: StaticData = { @@ -109,7 +123,7 @@ const data: StaticData = { id: 1, effects: [ create_effect('track', FOREIGN_AID, 2), - // create_effect('track', FOREIGN_AID, 2), // Conditional support + create_effect('function', 'card1_event2', 0), create_effect('track', SOVIET_SUPPORT, -1), ], icons: ['foreign_aid', 'add_to_front', 'd_soviet_support'], @@ -133,7 +147,7 @@ const data: StaticData = { id: 3, effects: [ create_effect('front', CLOSEST_TO_DEFEAT, 3), - // create_effect('track', FOREIGN_AID, 2), // conditional effect + create_effect('function', 'card3_event2', 0), create_effect('draw_card', SELF, 1), ], icons: ['add_to_front', 'government', 'draw_card'], @@ -170,7 +184,7 @@ const data: StaticData = { id: 6, effects: [ create_effect('bonus', ANY, ON), - // create_effect('front', ANY, ON), // REMOVE attacks from front + create_effect('state', 'remove_attack_from_fronts', 6), // REMOVE attacks from front create_effect('track', GOVERNMENT, 1), create_effect('draw_card', SELF, 1), ], @@ -231,8 +245,8 @@ const data: StaticData = { id: 10, effects: [ create_effect('track', FOREIGN_AID, 4), - // create_effect('track', FOREIGN_AID, 3) // conditional draw cards - create_effect('add_to_tableau', SELF, 1), + create_effect('function', 'card10_event2', 0), + create_effect('add_card_to_tableau', ANY, 1), ], icons: ['foreign_aid', 'draw_card'], strength: 1, @@ -254,7 +268,7 @@ const data: StaticData = { { id: 12, effects: [ - // create_effect('hero_points', OTHER_PLAYERS, -2), // take from other player + create_effect('take_hero_points', OTHER_PLAYERS, 2), create_effect('track', SOVIET_SUPPORT, -3), create_effect('track', COLLECTIVIZATION, -3), ], @@ -291,7 +305,7 @@ const data: StaticData = { { id: 15, effects: [ - // create_effect('track', ) Choose track, + create_effect('track', LIBERTY_OR_COLLECTIVIZATION, -4), create_effect('track', FOREIGN_AID, 2), create_effect('return_card', TRASH, 1), ], @@ -303,8 +317,8 @@ const data: StaticData = { { id: 16, effects: [ - // create_effect('front', ANY, -2) // move attacks - // create_effect('track', FOREIGN_AID, 4) // conditional + create_effect('state', 'move_attacks', 2), // move attacks + create_effect('function', 'card16_event2', 0), ], icons: ['add_to_front', 'foreign_aid'], strength: 1, @@ -316,7 +330,7 @@ const data: StaticData = { effects: [ create_effect('track', FOREIGN_AID, 1), create_effect('track', GOVERNMENT, 1), - // create_effect('track', COLLECTIVIZATION,-4) // conditional + create_effect('function', 'card17_event3', 0), ], icons: ['foreign_aid', 'government', 'd_collectivization'], strength: 1, @@ -352,7 +366,7 @@ const data: StaticData = { effects: [ create_effect('bonus', ANY, ON), create_effect('track', SOVIET_SUPPORT, 2), - // create_effect('front') // conditional on track + create_effect('function', 'card20_event3', 0), ], icons: ['teamwork_on', 'soviet_support', 'add_to_front'], strength: 2, @@ -377,7 +391,7 @@ const data: StaticData = { effects: [ create_effect('track', LIBERTY, -2), create_effect('track', SOVIET_SUPPORT, 1), - // create_effect('track', GOVERNMENT, -2) // conditional + create_effect('function', 'card22_event3', 0), ], icons: ['d_liberty', 'soviet_support', 'government'], strength: 2, @@ -387,7 +401,7 @@ const data: StaticData = { { id: 23, effects: [ - // create_effect('front', ANY, 4) // conditional on track + create_effect('function', 'card23_event1', 0), create_effect('track', FOREIGN_AID, -2), create_effect('draw_card', SELF, 2), ], @@ -426,7 +440,8 @@ const data: StaticData = { { id: 26, effects: [ - // create_effect('front', MADRID, 1), // ability active + create_effect('function', 'card26_event1', 0), + create_effect('front', MADRID, 1), create_effect('track', LIBERTY, -2), create_effect('track', GOVERNMENT, -1), ], @@ -465,7 +480,7 @@ const data: StaticData = { id: 29, effects: [ create_effect('track', GOVERNMENT, -2), - // create_effect('track', LIBERTY, -3) // conditional + create_effect('function', 'card29_event2', 0), ], icons: ['government', 'd_liberty'], strength: 1, @@ -499,10 +514,10 @@ const data: StaticData = { { id: 32, effects: [ - // create_effect('hero_points', OTHER_PLAYERS, 1) // take 1 from others + create_effect('take_hero_points', OTHER_PLAYERS, 1), create_effect('front', ANY, 1), create_effect('track', SOVIET_SUPPORT, 1), - // create_effect('track') // choose one of two tracks + create_effect('track', LIBERTY_OR_COLLECTIVIZATION, -3), ], icons: [ 'add_to_front', @@ -543,7 +558,7 @@ const data: StaticData = { id: 35, effects: [ create_effect('front', ANY, 2), - // create_effect('track', SOVIET_SUPPORT,2) // conditional + create_effect('function', 'card35_event2', 0), create_effect('draw_card', SELF, 2), ], icons: ['add_to_front', 'soviet_support', 'draw_card'], @@ -557,7 +572,7 @@ const data: StaticData = { create_effect('track', SOVIET_SUPPORT, 2), create_effect('track', COLLECTIVIZATION, -3), create_effect('draw_card', SELF, 2), - create_effect('add_to_tableau', ANY, 1), + create_effect('add_card_to_tableau', ANY, 1), ], icons: ['soviet_support', 'd_collectivization', 'draw_card'], strength: 1, @@ -599,7 +614,7 @@ const data: StaticData = { { id: 39, effects: [ - // create_effect('move attacks ') + create_effect('state', 'remove_attack_from_fronts', 39), // REMOVE attacks from front create_effect('track', COLLECTIVIZATION, 1), create_effect('draw_card', SELF, 2), ], @@ -638,7 +653,7 @@ const data: StaticData = { create_effect('track', LIBERTY, 2), create_effect('front', ARAGON, 2), create_effect('front', MADRID, 1), - // create_effect('ability') // activate ability + create_effect('function', 'card42_event3', 0), ], icons: ['liberty', 'add_to_front'], strength: 2, @@ -662,7 +677,7 @@ const data: StaticData = { { id: 44, effects: [ - // create_effect('hero_points', OTHER_PLAYERS, -1) // take from other player + create_effect('take_hero_points', OTHER_PLAYERS, 1), create_effect('front', MADRID, 2), create_effect('track', LIBERTY, 1), create_effect('track', FOREIGN_AID, -1), @@ -676,7 +691,7 @@ const data: StaticData = { id: 45, effects: [ create_effect('front', ANY, 2), - // create_effect('track', COLLECTIVIZATION, 1) // conditional + create_effect('function', 'card45_event2', 0), create_effect('track', FOREIGN_AID, -3), ], icons: ['add_to_front', 'collectivization', 'd_foreign_aid'], @@ -689,7 +704,7 @@ const data: StaticData = { effects: [ create_effect('bonus', ANY, ON), create_effect('track', LIBERTY, 2), - // create_effect('special') // Peek at Fascist cards + create_effect('state', 'peek_fascist_cards', 0), ], icons: ['teamwork_on', 'liberty', 'add_to_front'], strength: 1, @@ -736,7 +751,7 @@ const data: StaticData = { id: 50, effects: [ create_effect('track', COLLECTIVIZATION, 1), - // create_effect('front', ARAGON, 3) // conditional + create_effect('function', 'card50_event2', 0), create_effect('track', FOREIGN_AID, -1), ], icons: ['collectivization', 'add_to_front', 'd_foreign_aid'], @@ -760,7 +775,7 @@ const data: StaticData = { id: 52, effects: [ create_effect('front', ANY, 1), - // create_effect('track') // choose + create_effect('track', LIBERTY_OR_COLLECTIVIZATION, 3), create_effect('track', GOVERNMENT, TOWARDS_CENTER), ], icons: [ @@ -777,7 +792,7 @@ const data: StaticData = { id: 53, effects: [ create_effect('track', LIBERTY, 1), - // create_effect('front', ANY, 3) // conditional + create_effect('function', 'card53_event2', 0), create_effect('hero_points', SELF, 1), ], icons: ['liberty', 'add_to_front'], @@ -788,9 +803,9 @@ const data: StaticData = { { id: 54, effects: [ - // create_effect('track', LIBERTY, 3) // conditional + create_effect('function', 'card54_event1', 0), create_effect('track', SOVIET_SUPPORT, -1), - create_effect('add_to_tableau', ANY, 1), + create_effect('add_card_to_tableau', ANY, 1), ], icons: ['liberty', 'd_soviet_support', 'draw_card'], strength: 1, |