From 74e1497d50a6ff81c74c593f2d0f7018d2995fd8 Mon Sep 17 00:00:00 2001 From: Frans Bongers Date: Sun, 1 Dec 2024 15:09:24 +0100 Subject: add stack data for triggers on tracks --- data.js | 280 +++++++++++++++++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 244 insertions(+), 36 deletions(-) (limited to 'data.js') diff --git a/data.js b/data.js index a028139..d60e7ee 100644 --- a/data.js +++ b/data.js @@ -21,6 +21,15 @@ const ON = 1; exports.ON = ON; const PLAYER_WITH_MOST_HERO_POINTS = 0; exports.PLAYER_WITH_MOST_HERO_POINTS = PLAYER_WITH_MOST_HERO_POINTS; +const ARAGON = 'a'; +const MADRID = 'm'; +const NORTHERN = 'n'; +const SOUTHERN = 's'; +const CLOSEST_TO_DEFEAT = 'd'; +const CLOSEST_TO_VICTORY = 'v'; +const TOWARDS_CENTER = 10; +const AWAY_FROM_CENTER = 11; +const ANY = 'any'; const data = { cards: [ {}, @@ -352,12 +361,12 @@ const data = { id: 55, effects: [ { - target: 's', + target: SOUTHERN, type: 'attack', value: 4, }, { - target: 'a', + target: ARAGON, type: 'attack', value: 1, }, @@ -375,12 +384,12 @@ const data = { id: 56, effects: [ { - target: 's', + target: SOUTHERN, type: 'attack', value: 3, }, { - target: 'v', + target: CLOSEST_TO_VICTORY, type: 'attack', value: 2, }, @@ -398,9 +407,9 @@ const data = { id: 57, effects: [ { - target: 'm', + target: MADRID, type: 'attack', - value: 5, + value: -5, }, { target: FOREIGN_AID, @@ -423,12 +432,12 @@ const data = { { target: 'n', type: 'attack', - value: 5, + value: -5, }, { target: 'v', type: 'attack', - value: 1, + value: -1, }, { target: COLLECTIVIZATION, @@ -444,14 +453,14 @@ const data = { id: 59, effects: [ { - target: 'm', + target: MADRID, type: 'attack', - value: 4, + value: -4, }, { - target: 'v', + target: CLOSEST_TO_VICTORY, type: 'attack', - value: 2, + value: -2, }, { target: LIBERTY, @@ -467,14 +476,14 @@ const data = { id: 60, effects: [ { - target: 'n', + target: NORTHERN, type: 'attack', - value: 3, + value: -3, }, { - target: 'v', + target: CLOSEST_TO_VICTORY, type: 'attack', - value: 3, + value: -3, }, { target: LIBERTY, @@ -490,14 +499,14 @@ const data = { id: 61, effects: [ { - target: 'a', + target: ARAGON, type: 'attack', - value: 4, + value: -4, }, { - target: 'v', + target: CLOSEST_TO_VICTORY, type: 'attack', - value: 2, + value: -2, }, { target: PLAYER_WITH_MOST_HERO_POINTS, @@ -513,9 +522,9 @@ const data = { id: 62, effects: [ { - target: 's', + target: SOUTHERN, type: 'attack', - value: 5, + value: -5, }, { target: MORALE_BONUS, @@ -535,25 +544,25 @@ const data = { ], fronts: [ { - id: 'n', + id: NORTHERN, name: 'Northern', left: 89, top: 96, }, { - id: 'a', + id: ARAGON, name: 'Aragon', left: 340, top: 182, }, { - id: 'm', + id: MADRID, name: 'Madrid', left: 115, top: 262, }, { - id: 's', + id: SOUTHERN, name: 'Southern', left: 205, top: 426, @@ -562,40 +571,239 @@ const data = { medaillons: [ { id: 0, - name: 'Subterfuge' + name: 'Subterfuge', }, { id: 1, - name: 'Valor' + name: 'Valor', }, { id: 2, - name: 'Momentum' + name: 'Momentum', }, { id: 3, - name: 'Strategy' + name: 'Strategy', }, { id: 4, - name: 'Propaganda' + name: 'Propaganda', }, { id: 5, - name: 'Intelligence' + name: 'Intelligence', }, { id: 6, - name: 'Volunteers' + name: 'Volunteers', }, { id: 7, - name: 'Archives' + name: 'Archives', }, { id: 8, - name: 'Organization' + name: 'Organization', + }, + ], + tracks: [ + { + id: LIBERTY, + name: 'Liberty', + triggers: [ + { + type: 'bonus', + target: MORALE_BONUS, + value: OFF, + }, + { + type: 'attack', + target: MADRID, + value: -1, + }, + null, + { + type: 'track', + target: SOVIET_SUPPORT, + value: 1, + }, + null, + null, + null, + { + type: 'track', + target: GOVERNMENT, + value: TOWARDS_CENTER, + }, + { + type: 'front', + target: ANY, + value: 1, + }, + null, + { + type: 'medaillon', + target: ANY, + value: 1, + }, + ], + }, + { + id: COLLECTIVIZATION, + name: 'Collectivization', + triggers: [ + { + type: 'bonus', + target: MORALE_BONUS, + value: OFF, + }, + { + type: 'attack', + target: ARAGON, + value: -1, + }, + null, + { + type: 'track', + target: FOREIGN_AID, + value: 1, + }, + null, + null, + null, + { + type: 'front', + target: ANY, + value: 1, + }, + { + type: 'track', + target: LIBERTY, + value: 1, + }, + null, + { + type: 'medaillon', + target: ANY, + value: 1, + }, + ], + }, + { + id: GOVERNMENT, + name: 'Government', + triggers: [ + null, + { + type: 'medaillon', + target: ANY, + value: 1, + }, + null, + null, + { + type: 'track', + target: SOVIET_SUPPORT, + value: 1, + }, + null, + null, + { + type: 'track', + target: FOREIGN_AID, + value: 1, + }, + null, + null, + { + type: 'medaillon', + target: ANY, + value: 1, + }, + ], + }, + { + id: SOVIET_SUPPORT, + name: 'Soviet Support', + triggers: [ + { + type: 'bonus', + target: MORALE_BONUS, + value: OFF, + }, + { + type: 'attack', + target: SOUTHERN, + value: -1, + }, + null, + null, + null, + { + type: 'track', + target: LIBERTY, + value: -1, + }, + null, + { + type: 'front', + target: ANY, + value: 1, + }, + { + type: 'track', + target: GOVERNMENT, + value: -1, + }, + null, + { + type: 'medaillon', + target: ANY, + value: 1, + }, + ], + }, + { + id: FOREIGN_AID, + name: 'Foreign Aid', + triggers: [ + { + type: 'bonus', + target: MORALE_BONUS, + value: OFF, + }, + { + type: 'attack', + target: NORTHERN, + value: -1, + }, + null, + null, + null, + { + type: 'track', + target: LIBERTY, + value: -1, + }, + null, + { + type: 'front', + target: ANY, + value: 1, + }, + { + type: 'track', + target: GOVERNMENT, + value: 1, + }, + null, + { + type: 'medaillon', + target: ANY, + value: 1, + }, + ], }, - ] + ], }; exports.default = data; -- cgit v1.2.3