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.ts | 294 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 257 insertions(+), 37 deletions(-) (limited to 'data.ts') diff --git a/data.ts b/data.ts index c1d62b3..3b4e29d 100644 --- a/data.ts +++ b/data.ts @@ -33,7 +33,16 @@ export interface StaticData { medaillons: Array<{ id: number; name: string; - }> + }>; + tracks: Array<{ + id: number; + name: string; + triggers: Array; + }>; } const LIBERTY = 0; @@ -50,6 +59,18 @@ const ON = 1; const PLAYER_WITH_MOST_HERO_POINTS = 0; +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'; + export { LIBERTY, COLLECTIVIZATION, @@ -394,12 +415,12 @@ const data: StaticData = { id: 55, effects: [ { - target: 's', + target: SOUTHERN, type: 'attack', value: 4, }, { - target: 'a', + target: ARAGON, type: 'attack', value: 1, }, @@ -417,12 +438,12 @@ const data: StaticData = { id: 56, effects: [ { - target: 's', + target: SOUTHERN, type: 'attack', value: 3, }, { - target: 'v', + target: CLOSEST_TO_VICTORY, type: 'attack', value: 2, }, @@ -440,9 +461,9 @@ const data: StaticData = { id: 57, effects: [ { - target: 'm', + target: MADRID, type: 'attack', - value: 5, + value: -5, }, { target: FOREIGN_AID, @@ -465,12 +486,12 @@ const data: StaticData = { { target: 'n', type: 'attack', - value: 5, + value: -5, }, { target: 'v', type: 'attack', - value: 1, + value: -1, }, { target: COLLECTIVIZATION, @@ -486,14 +507,14 @@ const data: StaticData = { 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, @@ -509,14 +530,14 @@ const data: StaticData = { 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, @@ -532,14 +553,14 @@ const data: StaticData = { 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, @@ -555,9 +576,9 @@ const data: StaticData = { id: 62, effects: [ { - target: 's', + target: SOUTHERN, type: 'attack', - value: 5, + value: -5, }, { target: MORALE_BONUS, @@ -577,25 +598,25 @@ const data: StaticData = { ], 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, @@ -604,40 +625,239 @@ const data: StaticData = { 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, + }, + ], + }, + ], }; export default data; -- cgit v1.2.3