diff options
-rw-r--r-- | data.js | 855 | ||||
-rw-r--r-- | data.ts | 856 | ||||
-rw-r--r-- | rules.js | 73 | ||||
-rw-r--r-- | rules.ts | 7 | ||||
-rw-r--r-- | types.d.ts | 8 |
5 files changed, 1755 insertions, 44 deletions
@@ -1,6 +1,6 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -exports.TRASH = exports.TOWARDS_CENTER = exports.SELF = exports.PLAYER_WITH_MOST_HERO_POINTS = exports.OTHER_PLAYERS = exports.ON = exports.OFF = exports.TEAMWORK_BONUS = exports.MORALE_BONUS = exports.FOREIGN_AID = exports.SOVIET_SUPPORT = exports.GOVERNMENT = exports.COLLECTIVIZATION = exports.CLOSEST_TO_VICTORY = exports.CLOSEST_TO_DEFEAT = exports.LIBERTY = exports.ANY = void 0; +exports.TRASH = exports.TOWARDS_CENTER = exports.SELF = exports.PLAYER_WITH_MOST_HERO_POINTS = exports.OTHER_PLAYERS = exports.ON = exports.OFF = exports.TEAMWORK_BONUS = exports.MORALE_BONUS = exports.FOREIGN_AID = exports.SOVIET_SUPPORT = exports.GOVERNMENT = exports.COLLECTIVIZATION = exports.CLOSEST_TO_VICTORY = exports.CLOSEST_TO_DEFEAT = exports.LIBERTY = exports.ANY = exports.MODERATES_ID = exports.COMMUNISTS_ID = exports.ANARCHISTS_ID = void 0; const LIBERTY = 0; exports.LIBERTY = LIBERTY; const COLLECTIVIZATION = 1; @@ -21,6 +21,8 @@ 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 INITIATIVE_PLAYER = 'i'; +const ALL_PLAYERS = 'all'; const ARAGON = 'a'; const MADRID = 'm'; const NORTHERN = 'n'; @@ -40,6 +42,12 @@ const OTHER_PLAYERS = 'other'; exports.OTHER_PLAYERS = OTHER_PLAYERS; const TRASH = 'trash'; exports.TRASH = TRASH; +const ANARCHISTS_ID = 'a'; +exports.ANARCHISTS_ID = ANARCHISTS_ID; +const COMMUNISTS_ID = 'c'; +exports.COMMUNISTS_ID = COMMUNISTS_ID; +const MODERATES_ID = 'm'; +exports.MODERATES_ID = MODERATES_ID; function create_effect(type, target, value) { return { type, @@ -722,6 +730,12 @@ const data = { create_effect('attack', ARAGON, -1), create_effect('track', SOVIET_SUPPORT, -2), ], + test: { + front: SOUTHERN, + value: -1, + pass: create_effect('draw_card', COMMUNISTS_ID, 1), + fail: create_effect('track', COLLECTIVIZATION, -2), + }, title: 'SPANISH LEGION', type: 'ec', year: 1, @@ -733,6 +747,12 @@ const data = { create_effect('attack', CLOSEST_TO_VICTORY, -2), create_effect('bonus', MORALE_BONUS, OFF), ], + test: { + front: SOUTHERN, + value: 0, + pass: create_effect('track', SOVIET_SUPPORT, 1), + fail: create_effect('track', FOREIGN_AID, -3), + }, title: 'BRITISH TREACHERY AT GIBRALTAR', type: 'ec', year: 1, @@ -744,6 +764,12 @@ const data = { create_effect('track', FOREIGN_AID, -2), create_effect('hero_points', PLAYER_WITH_MOST_HERO_POINTS, -1), ], + test: { + front: MADRID, + value: 0, + pass: create_effect('draw_card', INITIATIVE_PLAYER, 1), + fail: create_effect('bonus', TEAMWORK_BONUS, OFF), + }, title: 'PARACUELLOS MASSACRES', type: 'ec', year: 1, @@ -755,6 +781,12 @@ const data = { create_effect('attack', CLOSEST_TO_VICTORY, -1), create_effect('track', COLLECTIVIZATION, -1), ], + test: { + front: NORTHERN, + value: -2, + pass: create_effect('hero_points', COMMUNISTS_ID, 1), + fail: create_effect('track', FOREIGN_AID, -2), + }, title: 'CARLISTS', type: 'ec', year: 1, @@ -766,6 +798,12 @@ const data = { create_effect('attack', CLOSEST_TO_VICTORY, -2), create_effect('track', LIBERTY, -1), ], + test: { + front: MADRID, + value: 0, + pass: create_effect('hero_points', ANARCHISTS_ID, 1), + fail: create_effect('track', GOVERNMENT, TOWARDS_CENTER), + }, title: 'ASSASSINATION OF GARCIA LORCA', type: 'ec', year: 1, @@ -777,6 +815,12 @@ const data = { create_effect('attack', CLOSEST_TO_VICTORY, -3), create_effect('track', LIBERTY, -1), ], + test: { + front: NORTHERN, + value: -1, + pass: create_effect('track', FOREIGN_AID, 2), + fail: create_effect('track', SOVIET_SUPPORT, 2), + }, title: 'GENERAL SANJURIO', type: 'ec', year: 1, @@ -788,6 +832,12 @@ const data = { create_effect('attack', CLOSEST_TO_VICTORY, -2), create_effect('hero_points', PLAYER_WITH_MOST_HERO_POINTS, -1), ], + test: { + front: ARAGON, + value: -2, + pass: create_effect('hero_points', ALL_PLAYERS, 1), + fail: create_effect('track', LIBERTY, -2), + }, title: 'FAILED INVASION OF MALLORCA', type: 'ec', year: 1, @@ -799,10 +849,813 @@ const data = { create_effect('bonus', MORALE_BONUS, OFF), create_effect('track', LIBERTY, -1), ], + test: { + front: SOUTHERN, + value: -2, + pass: create_effect('track', SOVIET_SUPPORT, 1), + fail: create_effect('track', GOVERNMENT, TOWARDS_CENTER), + }, title: 'AIRLIFT OF THE ARMY OF AFRICA', type: 'ec', year: 1, }, + { + id: 63, + effects: [ + create_effect('attack', CLOSEST_TO_VICTORY, -5), + create_effect('bonus', TEAMWORK_BONUS, OFF), + create_effect('track', COLLECTIVIZATION, -1), + ], + test: { + front: MADRID, + value: 0, + pass: create_effect('track', GOVERNMENT, AWAY_FROM_CENTER), + fail: create_effect('track', SOVIET_SUPPORT, -2), + }, + title: 'JUVENTUDES DE ACCION POPULAR', + type: 'ec', + year: 1, + }, + { + id: 64, + effects: [ + create_effect('attack', SOUTHERN, -4), + create_effect('attack', MADRID, -2), + create_effect('track', FOREIGN_AID, -1), + ], + test: { + front: SOUTHERN, + value: -1, + pass: create_effect('track', SOVIET_SUPPORT, 2), + fail: create_effect('track', COLLECTIVIZATION, -1), + }, + title: 'MASSACRE OF BADAJOZ', + type: 'ec', + year: 1, + }, + { + id: 65, + effects: [ + create_effect('attack', CLOSEST_TO_DEFEAT, -1), + create_effect('attack', MADRID, -4), + create_effect('track', SOVIET_SUPPORT, -2), + ], + test: { + front: MADRID, + value: -1, + pass: create_effect('draw_card', MODERATES_ID, 1), + fail: create_effect('track', GOVERNMENT, TOWARDS_CENTER), + }, + title: 'MASSACRE OF BADAJOZ', + type: 'ec', + year: 1, + }, + { + id: 66, + effects: [ + create_effect('attack', ARAGON, -3), + create_effect('attack', SOUTHERN, -2), + create_effect('track', FOREIGN_AID, -2), + ], + test: { + front: ARAGON, + value: 0, + pass: create_effect('hero_points', INITIATIVE_PLAYER, 1), + fail: create_effect('track', LIBERTY, -1), + }, + title: 'THE POPE VILIFIES THE REPUBLIC', + type: 'ec', + year: 1, + }, + { + id: 67, + effects: [ + create_effect('attack', NORTHERN, -4), + create_effect('attack', ARAGON, -2), + create_effect('track', COLLECTIVIZATION, -1), + ], + test: { + front: NORTHERN, + value: -1, + pass: create_effect('track', FOREIGN_AID, 1), + fail: create_effect('bonus', MORALE_BONUS, OFF), + }, + title: 'FALANGE', + type: 'ec', + year: 1, + }, + { + id: 68, + effects: [ + create_effect('attack', ARAGON, -4), + create_effect('attack', MADRID, -1), + create_effect('bonus', TEAMWORK_BONUS, OFF), + ], + test: { + front: ARAGON, + value: -1, + pass: create_effect('draw_card', ANARCHISTS_ID, 1), + fail: create_effect('bonus', MORALE_BONUS, OFF), + }, + title: 'DEATH OF DURRUTI', + type: 'ec', + year: 1, + }, + { + id: 69, + effects: [ + create_effect('attack', MADRID, -3), + create_effect('attack', NORTHERN, -2), + create_effect('bonus', TEAMWORK_BONUS, OFF), + ], + test: { + front: MADRID, + value: 0, + pass: create_effect('draw_card', ALL_PLAYERS, 1), + fail: create_effect('track', GOVERNMENT, TOWARDS_CENTER), + }, + title: 'UNIÓN MILITAR ESPAÑOLA', + type: 'ec', + year: 1, + }, + { + id: 70, + effects: [ + create_effect('attack', NORTHERN, -3), + create_effect('attack', MADRID, -3), + create_effect('track', FOREIGN_AID, -1), + ], + test: { + front: NORTHERN, + value: 0, + pass: create_effect('hero_points', MODERATES_ID, 1), + fail: create_effect('bonus', TEAMWORK_BONUS, OFF), + }, + title: 'PORTUGUESE WEAPON IMPORTS', + type: 'ec', + year: 1, + }, + { + id: 71, + effects: [ + create_effect('attack', CLOSEST_TO_DEFEAT, -3), + create_effect('attack', MADRID, -2), + create_effect('track', SOVIET_SUPPORT, -2), + ], + test: { + front: MADRID, + value: 0, + pass: create_effect('track', GOVERNMENT, AWAY_FROM_CENTER), + fail: create_effect('track', FOREIGN_AID, -2), + }, + title: '"VOLUNTEERS" FROM FASCIST ITALY', + type: 'ec', + year: 1, + }, + { + id: 72, + effects: [ + create_effect('attack', ARAGON, -3), + create_effect('attack', NORTHERN, -1), + create_effect('attack', CLOSEST_TO_VICTORY, -2), + ], + test: { + front: ARAGON, + value: 0, + pass: create_effect('track', COLLECTIVIZATION, 1), + fail: create_effect('track', SOVIET_SUPPORT, -3), + }, + title: 'AVIAZIONE LEGIONARIA', + type: 'ec', + year: 1, + }, + { + id: 73, + effects: [ + create_effect('attack', NORTHERN, -6), + create_effect('attack', CLOSEST_TO_VICTORY, -1), + create_effect('bonus', TEAMWORK_BONUS, OFF), + create_effect('hero_points', PLAYER_WITH_MOST_HERO_POINTS, -1), + ], + test: { + front: NORTHERN, + value: -1, + pass: create_effect('track', COLLECTIVIZATION, 1), + fail: create_effect('track', FOREIGN_AID, -3), + }, + title: 'ANSCHLUSS', + type: 'ec', + year: 2, + }, + { + id: 74, + effects: [ + create_effect('attack', MADRID, -2), + create_effect('attack', CLOSEST_TO_VICTORY, -5), + create_effect('track', SOVIET_SUPPORT, -2), + ], + test: { + front: MADRID, + value: 4, + pass: create_effect('draw_card', ALL_PLAYERS, 1), + fail: create_effect('hero_points', PLAYER_WITH_MOST_HERO_POINTS, -1), + }, + title: 'SECOND SINO-JAPANESE WAR', + type: 'ec', + year: 2, + }, + { + id: 75, + effects: [ + create_effect('attack', NORTHERN, -5), + create_effect('attack', CLOSEST_TO_VICTORY, -3), + create_effect('track', COLLECTIVIZATION, -1), + ], + test: { + front: NORTHERN, + value: 1, + pass: create_effect('hero_points', PLAYER_WITH_MOST_HERO_POINTS, 1), + fail: create_effect('track', FOREIGN_AID, -2), + }, + title: 'NAZI MINING', + type: 'ec', + year: 2, + }, + { + id: 76, + effects: [ + create_effect('attack', ARAGON, -5), + create_effect('attack', NORTHERN, -2), + create_effect('track', FOREIGN_AID, -2), + ], + test: { + front: ARAGON, + value: 0, + pass: create_effect('draw_card', INITIATIVE_PLAYER, 1), + fail: create_effect('track', LIBERTY, -1), + }, + title: 'THE DEUTSCHLAND INCIDENT', + type: 'ec', + year: 2, + }, + { + id: 77, + effects: [ + create_effect('attack', ARAGON, -5), + create_effect('attack', MADRID, -3), + create_effect('track', FOREIGN_AID, -1), + ], + test: { + front: ARAGON, + value: 1, + pass: create_effect('draw_card', ANARCHISTS_ID, 1), + fail: create_effect('hero_points', ALL_PLAYERS, -1), + }, + title: 'THE LAST GREAT CAVALRY CHARGE', + type: 'ec', + year: 2, + }, + { + id: 78, + effects: [ + create_effect('attack', MADRID, -6), + create_effect('attack', CLOSEST_TO_VICTORY, -1), + create_effect('track', LIBERTY, -1), + create_effect('track', SOVIET_SUPPORT, -1), + ], + test: { + front: MADRID, + value: -2, + pass: create_effect('track', FOREIGN_AID, 2), + fail: create_effect('track', GOVERNMENT, TOWARDS_CENTER), + }, + title: 'BATTLE OF BRUNETE', + type: 'ec', + year: 2, + }, + { + id: 79, + effects: [ + create_effect('attack', NORTHERN, -6), + create_effect('attack', MADRID, -1), + create_effect('bonus', TEAMWORK_BONUS, OFF), + create_effect('track', COLLECTIVIZATION, -1), + ], + test: { + front: NORTHERN, + value: 0, + pass: create_effect('draw_card', MODERATES_ID, 1), + fail: create_effect('bonus', MORALE_BONUS, OFF), + }, + title: 'EMILIO MOLA', + type: 'ec', + year: 2, + }, + { + id: 80, + effects: [ + create_effect('attack', CLOSEST_TO_DEFEAT, -3), + create_effect('attack', NORTHERN, -5), + create_effect('track', LIBERTY, -1), + ], + test: { + front: NORTHERN, + value: 2, + pass: create_effect('draw_card', ALL_PLAYERS, 1), + fail: create_effect('track', FOREIGN_AID, -3), + }, + title: 'TREASON OF SANTOÑA', + type: 'ec', + year: 2, + }, + { + id: 81, + effects: [ + create_effect('attack', MADRID, -5), + create_effect('attack', CLOSEST_TO_VICTORY, -2), + create_effect('track', FOREIGN_AID, -2), + ], + test: { + front: MADRID, + value: 0, + pass: create_effect('track', LIBERTY, 1), + fail: create_effect('track', GOVERNMENT, TOWARDS_CENTER), + }, + title: 'MEDIA ADORE GENERAL FRANCO', + type: 'ec', + year: 2, + }, + { + id: 82, + effects: [ + create_effect('attack', CLOSEST_TO_DEFEAT, -4), + create_effect('attack', CLOSEST_TO_VICTORY, -4), + create_effect('track', COLLECTIVIZATION, -1), + ], + test: { + front: MADRID, + value: 4, + pass: create_effect('hero_points', ALL_PLAYERS, 1), + fail: create_effect('track', SOVIET_SUPPORT, -3), + }, + title: 'DECREE OF UNIFICATION', + type: 'ec', + year: 2, + }, + { + id: 83, + effects: [ + create_effect('attack', ARAGON, -7), + create_effect('bonus', TEAMWORK_BONUS, OFF), + create_effect('track', FOREIGN_AID, -1), + ], + test: { + front: ARAGON, + value: -1, + pass: create_effect('track', GOVERNMENT, TOWARDS_CENTER), + fail: create_effect('track', COLLECTIVIZATION, -1), + }, + title: 'BATTLE OF TERUEL', + type: 'ec', + year: 2, + }, + { + id: 84, + effects: [ + create_effect('attack', CLOSEST_TO_DEFEAT, -1), + create_effect('attack', SOUTHERN, -5), + create_effect('bonus', TEAMWORK_BONUS, OFF), + create_effect('track', FOREIGN_AID, -2), + ], + test: { + front: SOUTHERN, + value: 0, + pass: create_effect('hero_points', MODERATES_ID, 1), + fail: create_effect('track', SOVIET_SUPPORT, -2), + }, + title: 'NON-INTERVENTION COMMITTEE', + type: 'ec', + year: 2, + }, + { + id: 85, + effects: [ + create_effect('attack', SOUTHERN, -6), + create_effect('attack', MADRID, -2), + create_effect('hero_points', PLAYER_WITH_MOST_HERO_POINTS, -1), + ], + test: { + front: SOUTHERN, + value: 2, + pass: create_effect('hero_points', COMMUNISTS_ID, 1), + fail: create_effect('bonus', TEAMWORK_BONUS, OFF), + }, + title: 'FALLING SOLDIER CONTROVERSY', + type: 'ec', + year: 2, + }, + { + id: 86, + effects: [ + create_effect('attack', CLOSEST_TO_DEFEAT, -2), + create_effect('attack', MADRID, -5), + create_effect('bonus', TEAMWORK_BONUS, OFF), + create_effect('track', SOVIET_SUPPORT, -1) + ], + test: { + front: MADRID, + value: 1, + pass: create_effect('track', GOVERNMENT, AWAY_FROM_CENTER), + fail: create_effect('bonus', MORALE_BONUS, OFF), + }, + title: 'FIFTH COLUMN', + type: 'ec', + year: 2, + }, + { + id: 87, + effects: [ + create_effect('attack', SOUTHERN, -4), + create_effect('attack', ARAGON, -3), + create_effect('track', SOVIET_SUPPORT, -2) + ], + test: { + front: SOUTHERN, + value: 2, + pass: create_effect('hero_points', COMMUNISTS_ID, 1), + fail: create_effect('hero_points', ALL_PLAYERS, -1), + }, + title: 'REGULARES', + type: 'ec', + year: 2, + }, + { + id: 88, + effects: [ + create_effect('attack', MADRID, -5), + create_effect('attack', SOUTHERN, -2), + create_effect('track', SOVIET_SUPPORT, -2) + ], + test: { + front: MADRID, + value: 1, + pass: create_effect('hero_points', INITIATIVE_PLAYER, 1), + fail: create_effect('bonus', TEAMWORK_BONUS, OFF), + }, + title: 'ITALIAN ARMOR', + type: 'ec', + year: 2, + }, + { + id: 89, + effects: [ + create_effect('attack', SOUTHERN, -7), + create_effect('bonus', TEAMWORK_BONUS, OFF), + create_effect('track', COLLECTIVIZATION, -1) + ], + test: { + front: SOUTHERN, + value: 0, + pass: create_effect('track', SOVIET_SUPPORT, 2), + fail: create_effect('bonus', MORALE_BONUS, OFF), + }, + title: 'PEASANTS FORCED OFF THE LAND', + type: 'ec', + year: 2, + }, + { + id: 90, + effects: [ + create_effect('attack', ARAGON, -4), + create_effect('attack', NORTHERN, -4), + create_effect('hero_points', PLAYER_WITH_MOST_HERO_POINTS, -1) + ], + test: { + front: ARAGON, + value: 2, + pass: create_effect('hero_points', ANARCHISTS_ID, 1), + fail: create_effect('track', SOVIET_SUPPORT, -3), + }, + title: 'GERMAN CONDOR LEGION', + type: 'ec', + year: 2, + }, + { + id: 91, + effects: [ + create_effect('attack', MADRID, -5), + create_effect('attack', SOUTHERN, -4), + create_effect('bonus', TEAMWORK_BONUS, OFF), + create_effect('track', SOVIET_SUPPORT, -2) + ], + test: { + front: MADRID, + value: 2, + pass: create_effect('hero_points', PLAYER_WITH_MOST_HERO_POINTS, 1), + fail: create_effect('bonus', MORALE_BONUS, OFF), + }, + title: 'FASCIST AIR SUPREMACY', + type: 'ec', + year: 3, + }, + { + id: 92, + effects: [ + create_effect('attack', ARAGON, -6), + create_effect('attack', CLOSEST_TO_VICTORY, -3), + create_effect('track', FOREIGN_AID, -2), + create_effect('track', COLLECTIVIZATION, -1), + ], + test: { + front: ARAGON, + value: 2, + pass: create_effect('hero_points', ANARCHISTS_ID, 1), + fail: create_effect('bonus', MORALE_BONUS, OFF), + }, + title: 'CATALONIA OFFENSIVE', + type: 'ec', + year: 3, + }, + { + id: 93, + effects: [ + create_effect('attack', NORTHERN, -4), + create_effect('attack', CLOSEST_TO_VICTORY, -6), + create_effect('track', FOREIGN_AID, -2), + ], + test: { + front: NORTHERN, + value: 1, + pass: create_effect('hero_points', MODERATES_ID, 1), + fail: create_effect('track', SOVIET_SUPPORT, -3), + }, + title: 'MARTYRS OF THE SPANISH CIVIL WAR', + type: 'ec', + year: 3, + }, + { + id: 94, + effects: [ + create_effect('attack', NORTHERN, -6), + create_effect('attack', SOUTHERN, -4), + create_effect('track', SOVIET_SUPPORT, -2), + ], + test: { + front: NORTHERN, + value: 1, + pass: create_effect('hero_points', ALL_PLAYERS, 1), + fail: create_effect('track', FOREIGN_AID, -3), + }, + title: 'NAVAL BLOCKADE', + type: 'ec', + year: 3, + }, + { + id: 95, + effects: [ + create_effect('attack', CLOSEST_TO_DEFEAT, -5), + create_effect('attack', SOUTHERN, -5), + create_effect('track', FOREIGN_AID, -2), + ], + test: { + front: SOUTHERN, + value: 1, + pass: create_effect('draw_card', COMMUNISTS_ID, 1), + fail: create_effect('track', GOVERNMENT, TOWARDS_CENTER), + }, + title: 'MUNICH AGREEMENT', + type: 'ec', + year: 3, + }, + { + id: 96, + effects: [ + create_effect('attack', MADRID, -4), + create_effect('attack', CLOSEST_TO_VICTORY, -6), + create_effect('track', COLLECTIVIZATION, -1), + ], + test: { + front: MADRID, + value: 1, + pass: create_effect('hero_points', INITIATIVE_PLAYER, 1), + fail: create_effect('track', GOVERNMENT, TOWARDS_CENTER), + }, + title: 'LAW OF POLITICAL RESPONSIBILITIES', + type: 'ec', + year: 3, + }, + { + id: 97, + effects: [ + create_effect('attack', MADRID, -6), + create_effect('attack', ARAGON, -4), + create_effect('track', SOVIET_SUPPORT, -2), + ], + test: { + front: MADRID, + value: 1, + pass: create_effect('draw_card', ALL_PLAYERS, 1), + fail: create_effect('hero_points', ALL_PLAYERS, -1), + }, + title: 'INTERNATIONAL BRIGADES SENT HOME', + type: 'ec', + year: 3, + }, + { + id: 98, + effects: [ + create_effect('attack', NORTHERN, -7), + create_effect('attack', MADRID, -2), + create_effect('bonus', TEAMWORK_BONUS, OFF), + create_effect('track', LIBERTY, -1), + ], + test: { + front: NORTHERN, + value: -2, + pass: create_effect('hero_points', INITIATIVE_PLAYER, 1), + fail: create_effect('track', FOREIGN_AID, -2), + }, + title: 'FRENCH CONCENTRATION CAMPS', + type: 'ec', + year: 3, + }, + { + id: 99, + effects: [ + create_effect('attack', NORTHERN, -6), + create_effect('attack', MADRID, -3), + create_effect('track', FOREIGN_AID, -2), + create_effect('hero_points', PLAYER_WITH_MOST_HERO_POINTS, -1), + ], + test: { + front: NORTHERN, + value: 0, + pass: create_effect('track', FOREIGN_AID, 2), + fail: create_effect('bonus', MORALE_BONUS, OFF), + }, + title: 'RESIGNATION OF PRESIDENT AZAÑA', + type: 'ec', + year: 3, + }, + { + id: 100, + effects: [ + create_effect('attack', SOUTHERN, -7), + create_effect('attack', CLOSEST_TO_DEFEAT, -2), + create_effect('track', FOREIGN_AID, -2), + create_effect('hero_points', PLAYER_WITH_MOST_HERO_POINTS, -1), + ], + test: { + front: SOUTHERN, + value: -1, + pass: create_effect('draw_card', INITIATIVE_PLAYER, 1), + fail: create_effect('track', SOVIET_SUPPORT, -3), + }, + title: "FDR'S CAUTIOUS APPROACH", + type: 'ec', + year: 3, + }, + { + id: 101, + effects: [ + create_effect('attack', ARAGON, -7), + create_effect('attack', MADRID, -3), + create_effect('track', SOVIET_SUPPORT, -2), + ], + test: { + front: ARAGON, + value: -1, + pass: create_effect('draw_card', MODERATES_ID, 1), + fail: create_effect('track', COLLECTIVIZATION, -1), + }, + title: 'MOLOTOV-RIBBENTROP PACT', + type: 'ec', + year: 3, + }, + { + id: 102, + effects: [ + create_effect('attack', MADRID, -6), + create_effect('attack', CLOSEST_TO_VICTORY, -4), + create_effect('track', FOREIGN_AID, -2), + ], + test: { + front: MADRID, + value: 0, + pass: create_effect('track', GOVERNMENT, AWAY_FROM_CENTER), + fail: create_effect('hero_points', PLAYER_WITH_MOST_HERO_POINTS, -1), + }, + title: 'EASTER ACCORDS', + type: 'ec', + year: 3, + }, + { + id: 103, + effects: [ + create_effect('attack', MADRID, -7), + create_effect('attack', NORTHERN, -2), + create_effect('bonus', TEAMWORK_BONUS, OFF), + create_effect('hero_points', PLAYER_WITH_MOST_HERO_POINTS, -1) + ], + test: { + front: MADRID, + value: 0, + pass: create_effect('play_card', INITIATIVE_PLAYER, 1), + fail: create_effect('track', FOREIGN_AID, -3), + }, + title: 'NATIONAL DEFENCE COUNCIL', + type: 'ec', + year: 3, + }, + { + id: 104, + effects: [ + create_effect('attack', SOUTHERN, -6), + create_effect('attack', ARAGON, -3), + create_effect('track', SOVIET_SUPPORT, -2), + create_effect('hero_points', PLAYER_WITH_MOST_HERO_POINTS, -1) + ], + test: { + front: SOUTHERN, + value: 1, + pass: create_effect('hero_points', COMMUNISTS_ID, 1), + fail: create_effect('bonus', TEAMWORK_BONUS, OFF), + }, + title: 'ACCIDENTAL BOMBING OF CABRA', + type: 'ec', + year: 3, + }, + { + id: 105, + effects: [ + create_effect('attack', ARAGON, -6), + create_effect('attack', NORTHERN, -4), + create_effect('track', LIBERTY, -1), + ], + test: { + front: ARAGON, + value: 1, + pass: create_effect('draw_card', ANARCHISTS_ID, 1), + fail: create_effect('bonus', TEAMWORK_BONUS, OFF), + }, + title: 'BOMBING OF BARCELONA', + type: 'ec', + year: 3, + }, + { + id: 106, + effects: [ + create_effect('attack', MADRID, -6), + create_effect('attack', CLOSEST_TO_VICTORY, -3), + create_effect('bonus', TEAMWORK_BONUS, OFF), + create_effect('track', LIBERTY, -1), + ], + test: { + front: MADRID, + value: 0, + pass: create_effect('play_card', INITIATIVE_PLAYER, 1), + fail: create_effect('bonus', MORALE_BONUS, OFF), + }, + title: 'MILITARY DICTATORSHIP', + type: 'ec', + year: 3, + }, + { + id: 107, + effects: [ + create_effect('attack', ARAGON, -8), + create_effect('attack', SOUTHERN, -1), + create_effect('track', COLLECTIVIZATION, -1), + create_effect('track', SOVIET_SUPPORT, -2), + ], + test: { + front: ARAGON, + value: -2, + pass: create_effect('track', SOVIET_SUPPORT, 2), + fail: create_effect('track', LIBERTY, -1), + }, + title: 'BATTLE OF THE EBRO', + type: 'ec', + year: 3, + }, + { + id: 108, + effects: [ + create_effect('attack', CLOSEST_TO_DEFEAT, -3), + create_effect('attack', SOUTHERN, -6), + create_effect('bonus', TEAMWORK_BONUS, OFF), + create_effect('hero_points', PLAYER_WITH_MOST_HERO_POINTS, -1) + ], + test: { + front: SOUTHERN, + value: -1, + pass: create_effect('hero_points', ALL_PLAYERS, 1), + fail: create_effect('track', SOVIET_SUPPORT, -2), + }, + title: 'CARTAGENA UPRISING', + type: 'ec', + year: 3, + }, ], fronts: [ { @@ -1,4 +1,4 @@ -import { Card, Effect, StaticData } from './types'; +import { Card, Effect, FactionId, StaticData } from './types'; const LIBERTY = 0; const COLLECTIVIZATION = 1; @@ -13,6 +13,8 @@ const OFF = 0; const ON = 1; const PLAYER_WITH_MOST_HERO_POINTS = 0; +const INITIATIVE_PLAYER = 'i'; +const ALL_PLAYERS = 'all'; const ARAGON = 'a'; const MADRID = 'm'; @@ -29,7 +31,14 @@ 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; + export { + ANARCHISTS_ID, + COMMUNISTS_ID, + MODERATES_ID, ANY, LIBERTY, CLOSEST_TO_DEFEAT, @@ -763,6 +772,12 @@ const data: StaticData = { create_effect('attack', ARAGON, -1), create_effect('track', SOVIET_SUPPORT, -2), ], + test: { + front: SOUTHERN, + value: -1, + pass: create_effect('draw_card', COMMUNISTS_ID, 1), + fail: create_effect('track', COLLECTIVIZATION, -2), + }, title: 'SPANISH LEGION', type: 'ec', year: 1, @@ -774,6 +789,12 @@ const data: StaticData = { create_effect('attack', CLOSEST_TO_VICTORY, -2), create_effect('bonus', MORALE_BONUS, OFF), ], + test: { + front: SOUTHERN, + value: 0, + pass: create_effect('track', SOVIET_SUPPORT, 1), + fail: create_effect('track', FOREIGN_AID, -3), + }, title: 'BRITISH TREACHERY AT GIBRALTAR', type: 'ec', year: 1, @@ -785,6 +806,12 @@ const data: StaticData = { create_effect('track', FOREIGN_AID, -2), create_effect('hero_points', PLAYER_WITH_MOST_HERO_POINTS, -1), ], + test: { + front: MADRID, + value: 0, + pass: create_effect('draw_card', INITIATIVE_PLAYER, 1), + fail: create_effect('bonus', TEAMWORK_BONUS, OFF), + }, title: 'PARACUELLOS MASSACRES', type: 'ec', year: 1, @@ -796,6 +823,12 @@ const data: StaticData = { create_effect('attack', CLOSEST_TO_VICTORY, -1), create_effect('track', COLLECTIVIZATION, -1), ], + test: { + front: NORTHERN, + value: -2, + pass: create_effect('hero_points', COMMUNISTS_ID, 1), + fail: create_effect('track', FOREIGN_AID, -2), + }, title: 'CARLISTS', type: 'ec', year: 1, @@ -807,6 +840,12 @@ const data: StaticData = { create_effect('attack', CLOSEST_TO_VICTORY, -2), create_effect('track', LIBERTY, -1), ], + test: { + front: MADRID, + value: 0, + pass: create_effect('hero_points', ANARCHISTS_ID, 1), + fail: create_effect('track', GOVERNMENT, TOWARDS_CENTER), + }, title: 'ASSASSINATION OF GARCIA LORCA', type: 'ec', year: 1, @@ -818,6 +857,12 @@ const data: StaticData = { create_effect('attack', CLOSEST_TO_VICTORY, -3), create_effect('track', LIBERTY, -1), ], + test: { + front: NORTHERN, + value: -1, + pass: create_effect('track', FOREIGN_AID, 2), + fail: create_effect('track', SOVIET_SUPPORT, 2), + }, title: 'GENERAL SANJURIO', type: 'ec', year: 1, @@ -829,6 +874,12 @@ const data: StaticData = { create_effect('attack', CLOSEST_TO_VICTORY, -2), create_effect('hero_points', PLAYER_WITH_MOST_HERO_POINTS, -1), ], + test: { + front: ARAGON, + value: -2, + pass: create_effect('hero_points', ALL_PLAYERS, 1), + fail: create_effect('track', LIBERTY, -2), + }, title: 'FAILED INVASION OF MALLORCA', type: 'ec', year: 1, @@ -840,10 +891,813 @@ const data: StaticData = { create_effect('bonus', MORALE_BONUS, OFF), create_effect('track', LIBERTY, -1), ], + test: { + front: SOUTHERN, + value: -2, + pass: create_effect('track', SOVIET_SUPPORT, 1), + fail: create_effect('track', GOVERNMENT, TOWARDS_CENTER), + }, title: 'AIRLIFT OF THE ARMY OF AFRICA', type: 'ec', year: 1, }, + { + id: 63, + effects: [ + create_effect('attack', CLOSEST_TO_VICTORY, -5), + create_effect('bonus', TEAMWORK_BONUS, OFF), + create_effect('track', COLLECTIVIZATION, -1), + ], + test: { + front: MADRID, + value: 0, + pass: create_effect('track', GOVERNMENT, AWAY_FROM_CENTER), + fail: create_effect('track', SOVIET_SUPPORT, -2), + }, + title: 'JUVENTUDES DE ACCION POPULAR', + type: 'ec', + year: 1, + }, + { + id: 64, + effects: [ + create_effect('attack', SOUTHERN, -4), + create_effect('attack', MADRID, -2), + create_effect('track', FOREIGN_AID, -1), + ], + test: { + front: SOUTHERN, + value: -1, + pass: create_effect('track', SOVIET_SUPPORT, 2), + fail: create_effect('track', COLLECTIVIZATION, -1), + }, + title: 'MASSACRE OF BADAJOZ', + type: 'ec', + year: 1, + }, + { + id: 65, + effects: [ + create_effect('attack', CLOSEST_TO_DEFEAT, -1), + create_effect('attack', MADRID, -4), + create_effect('track', SOVIET_SUPPORT, -2), + ], + test: { + front: MADRID, + value: -1, + pass: create_effect('draw_card', MODERATES_ID, 1), + fail: create_effect('track', GOVERNMENT, TOWARDS_CENTER), + }, + title: 'MASSACRE OF BADAJOZ', + type: 'ec', + year: 1, + }, + { + id: 66, + effects: [ + create_effect('attack', ARAGON, -3), + create_effect('attack', SOUTHERN, -2), + create_effect('track', FOREIGN_AID, -2), + ], + test: { + front: ARAGON, + value: 0, + pass: create_effect('hero_points', INITIATIVE_PLAYER, 1), + fail: create_effect('track', LIBERTY, -1), + }, + title: 'THE POPE VILIFIES THE REPUBLIC', + type: 'ec', + year: 1, + }, + { + id: 67, + effects: [ + create_effect('attack', NORTHERN, -4), + create_effect('attack', ARAGON, -2), + create_effect('track', COLLECTIVIZATION, -1), + ], + test: { + front: NORTHERN, + value: -1, + pass: create_effect('track', FOREIGN_AID, 1), + fail: create_effect('bonus', MORALE_BONUS, OFF), + }, + title: 'FALANGE', + type: 'ec', + year: 1, + }, + { + id: 68, + effects: [ + create_effect('attack', ARAGON, -4), + create_effect('attack', MADRID, -1), + create_effect('bonus', TEAMWORK_BONUS, OFF), + ], + test: { + front: ARAGON, + value: -1, + pass: create_effect('draw_card', ANARCHISTS_ID, 1), + fail: create_effect('bonus', MORALE_BONUS, OFF), + }, + title: 'DEATH OF DURRUTI', + type: 'ec', + year: 1, + }, + { + id: 69, + effects: [ + create_effect('attack', MADRID, -3), + create_effect('attack', NORTHERN, -2), + create_effect('bonus', TEAMWORK_BONUS, OFF), + ], + test: { + front: MADRID, + value: 0, + pass: create_effect('draw_card', ALL_PLAYERS, 1), + fail: create_effect('track', GOVERNMENT, TOWARDS_CENTER), + }, + title: 'UNIÓN MILITAR ESPAÑOLA', + type: 'ec', + year: 1, + }, + { + id: 70, + effects: [ + create_effect('attack', NORTHERN, -3), + create_effect('attack', MADRID, -3), + create_effect('track', FOREIGN_AID, -1), + ], + test: { + front: NORTHERN, + value: 0, + pass: create_effect('hero_points', MODERATES_ID, 1), + fail: create_effect('bonus', TEAMWORK_BONUS, OFF), + }, + title: 'PORTUGUESE WEAPON IMPORTS', + type: 'ec', + year: 1, + }, + { + id: 71, + effects: [ + create_effect('attack', CLOSEST_TO_DEFEAT, -3), + create_effect('attack', MADRID, -2), + create_effect('track', SOVIET_SUPPORT, -2), + ], + test: { + front: MADRID, + value: 0, + pass: create_effect('track', GOVERNMENT, AWAY_FROM_CENTER), + fail: create_effect('track', FOREIGN_AID, -2), + }, + title: '"VOLUNTEERS" FROM FASCIST ITALY', + type: 'ec', + year: 1, + }, + { + id: 72, + effects: [ + create_effect('attack', ARAGON, -3), + create_effect('attack', NORTHERN, -1), + create_effect('attack', CLOSEST_TO_VICTORY, -2), + ], + test: { + front: ARAGON, + value: 0, + pass: create_effect('track', COLLECTIVIZATION, 1), + fail: create_effect('track', SOVIET_SUPPORT, -3), + }, + title: 'AVIAZIONE LEGIONARIA', + type: 'ec', + year: 1, + }, + { + id: 73, + effects: [ + create_effect('attack', NORTHERN, -6), + create_effect('attack', CLOSEST_TO_VICTORY, -1), + create_effect('bonus', TEAMWORK_BONUS, OFF), + create_effect('hero_points', PLAYER_WITH_MOST_HERO_POINTS, -1), + ], + test: { + front: NORTHERN, + value: -1, + pass: create_effect('track', COLLECTIVIZATION, 1), + fail: create_effect('track', FOREIGN_AID, -3), + }, + title: 'ANSCHLUSS', + type: 'ec', + year: 2, + }, + { + id: 74, + effects: [ + create_effect('attack', MADRID, -2), + create_effect('attack', CLOSEST_TO_VICTORY, -5), + create_effect('track', SOVIET_SUPPORT, -2), + ], + test: { + front: MADRID, + value: 4, + pass: create_effect('draw_card', ALL_PLAYERS, 1), + fail: create_effect('hero_points', PLAYER_WITH_MOST_HERO_POINTS, -1), + }, + title: 'SECOND SINO-JAPANESE WAR', + type: 'ec', + year: 2, + }, + { + id: 75, + effects: [ + create_effect('attack', NORTHERN, -5), + create_effect('attack', CLOSEST_TO_VICTORY, -3), + create_effect('track', COLLECTIVIZATION, -1), + ], + test: { + front: NORTHERN, + value: 1, + pass: create_effect('hero_points', PLAYER_WITH_MOST_HERO_POINTS, 1), + fail: create_effect('track', FOREIGN_AID, -2), + }, + title: 'NAZI MINING', + type: 'ec', + year: 2, + }, + { + id: 76, + effects: [ + create_effect('attack', ARAGON, -5), + create_effect('attack', NORTHERN, -2), + create_effect('track', FOREIGN_AID, -2), + ], + test: { + front: ARAGON, + value: 0, + pass: create_effect('draw_card', INITIATIVE_PLAYER, 1), + fail: create_effect('track', LIBERTY, -1), + }, + title: 'THE DEUTSCHLAND INCIDENT', + type: 'ec', + year: 2, + }, + { + id: 77, + effects: [ + create_effect('attack', ARAGON, -5), + create_effect('attack', MADRID, -3), + create_effect('track', FOREIGN_AID, -1), + ], + test: { + front: ARAGON, + value: 1, + pass: create_effect('draw_card', ANARCHISTS_ID, 1), + fail: create_effect('hero_points', ALL_PLAYERS, -1), + }, + title: 'THE LAST GREAT CAVALRY CHARGE', + type: 'ec', + year: 2, + }, + { + id: 78, + effects: [ + create_effect('attack', MADRID, -6), + create_effect('attack', CLOSEST_TO_VICTORY, -1), + create_effect('track', LIBERTY, -1), + create_effect('track', SOVIET_SUPPORT, -1), + ], + test: { + front: MADRID, + value: -2, + pass: create_effect('track', FOREIGN_AID, 2), + fail: create_effect('track', GOVERNMENT, TOWARDS_CENTER), + }, + title: 'BATTLE OF BRUNETE', + type: 'ec', + year: 2, + }, + { + id: 79, + effects: [ + create_effect('attack', NORTHERN, -6), + create_effect('attack', MADRID, -1), + create_effect('bonus', TEAMWORK_BONUS, OFF), + create_effect('track', COLLECTIVIZATION, -1), + ], + test: { + front: NORTHERN, + value: 0, + pass: create_effect('draw_card', MODERATES_ID, 1), + fail: create_effect('bonus', MORALE_BONUS, OFF), + }, + title: 'EMILIO MOLA', + type: 'ec', + year: 2, + }, + { + id: 80, + effects: [ + create_effect('attack', CLOSEST_TO_DEFEAT, -3), + create_effect('attack', NORTHERN, -5), + create_effect('track', LIBERTY, -1), + ], + test: { + front: NORTHERN, + value: 2, + pass: create_effect('draw_card', ALL_PLAYERS, 1), + fail: create_effect('track', FOREIGN_AID, -3), + }, + title: 'TREASON OF SANTOÑA', + type: 'ec', + year: 2, + }, + { + id: 81, + effects: [ + create_effect('attack', MADRID, -5), + create_effect('attack', CLOSEST_TO_VICTORY, -2), + create_effect('track', FOREIGN_AID, -2), + ], + test: { + front: MADRID, + value: 0, + pass: create_effect('track', LIBERTY, 1), + fail: create_effect('track', GOVERNMENT, TOWARDS_CENTER), + }, + title: 'MEDIA ADORE GENERAL FRANCO', + type: 'ec', + year: 2, + }, + { + id: 82, + effects: [ + create_effect('attack', CLOSEST_TO_DEFEAT, -4), + create_effect('attack', CLOSEST_TO_VICTORY, -4), + create_effect('track', COLLECTIVIZATION, -1), + ], + test: { + front: MADRID, + value: 4, + pass: create_effect('hero_points', ALL_PLAYERS, 1), + fail: create_effect('track', SOVIET_SUPPORT, -3), + }, + title: 'DECREE OF UNIFICATION', + type: 'ec', + year: 2, + }, + { + id: 83, + effects: [ + create_effect('attack', ARAGON, -7), + create_effect('bonus', TEAMWORK_BONUS, OFF), + create_effect('track', FOREIGN_AID, -1), + ], + test: { + front: ARAGON, + value: -1, + pass: create_effect('track', GOVERNMENT, TOWARDS_CENTER), + fail: create_effect('track', COLLECTIVIZATION, -1), + }, + title: 'BATTLE OF TERUEL', + type: 'ec', + year: 2, + }, + { + id: 84, + effects: [ + create_effect('attack', CLOSEST_TO_DEFEAT, -1), + create_effect('attack', SOUTHERN, -5), + create_effect('bonus', TEAMWORK_BONUS, OFF), + create_effect('track', FOREIGN_AID, -2), + ], + test: { + front: SOUTHERN, + value: 0, + pass: create_effect('hero_points', MODERATES_ID, 1), + fail: create_effect('track', SOVIET_SUPPORT, -2), + }, + title: 'NON-INTERVENTION COMMITTEE', + type: 'ec', + year: 2, + }, + { + id: 85, + effects: [ + create_effect('attack', SOUTHERN, -6), + create_effect('attack', MADRID, -2), + create_effect('hero_points', PLAYER_WITH_MOST_HERO_POINTS, -1), + ], + test: { + front: SOUTHERN, + value: 2, + pass: create_effect('hero_points', COMMUNISTS_ID, 1), + fail: create_effect('bonus', TEAMWORK_BONUS, OFF), + }, + title: 'FALLING SOLDIER CONTROVERSY', + type: 'ec', + year: 2, + }, + { + id: 86, + effects: [ + create_effect('attack', CLOSEST_TO_DEFEAT, -2), + create_effect('attack', MADRID, -5), + create_effect('bonus', TEAMWORK_BONUS, OFF), + create_effect('track', SOVIET_SUPPORT, -1) + ], + test: { + front: MADRID, + value: 1, + pass: create_effect('track', GOVERNMENT, AWAY_FROM_CENTER), + fail: create_effect('bonus', MORALE_BONUS, OFF), + }, + title: 'FIFTH COLUMN', + type: 'ec', + year: 2, + }, + { + id: 87, + effects: [ + create_effect('attack', SOUTHERN, -4), + create_effect('attack', ARAGON, -3), + create_effect('track', SOVIET_SUPPORT, -2) + ], + test: { + front: SOUTHERN, + value: 2, + pass: create_effect('hero_points', COMMUNISTS_ID, 1), + fail: create_effect('hero_points', ALL_PLAYERS, -1), + }, + title: 'REGULARES', + type: 'ec', + year: 2, + }, + { + id: 88, + effects: [ + create_effect('attack', MADRID, -5), + create_effect('attack', SOUTHERN, -2), + create_effect('track', SOVIET_SUPPORT, -2) + ], + test: { + front: MADRID, + value: 1, + pass: create_effect('hero_points', INITIATIVE_PLAYER, 1), + fail: create_effect('bonus', TEAMWORK_BONUS, OFF), + }, + title: 'ITALIAN ARMOR', + type: 'ec', + year: 2, + }, + { + id: 89, + effects: [ + create_effect('attack', SOUTHERN, -7), + create_effect('bonus', TEAMWORK_BONUS, OFF), + create_effect('track', COLLECTIVIZATION, -1) + ], + test: { + front: SOUTHERN, + value: 0, + pass: create_effect('track', SOVIET_SUPPORT, 2), + fail: create_effect('bonus', MORALE_BONUS, OFF), + }, + title: 'PEASANTS FORCED OFF THE LAND', + type: 'ec', + year: 2, + }, + { + id: 90, + effects: [ + create_effect('attack', ARAGON, -4), + create_effect('attack', NORTHERN, -4), + create_effect('hero_points', PLAYER_WITH_MOST_HERO_POINTS, -1) + ], + test: { + front: ARAGON, + value: 2, + pass: create_effect('hero_points', ANARCHISTS_ID, 1), + fail: create_effect('track', SOVIET_SUPPORT, -3), + }, + title: 'GERMAN CONDOR LEGION', + type: 'ec', + year: 2, + }, + { + id: 91, + effects: [ + create_effect('attack', MADRID, -5), + create_effect('attack', SOUTHERN, -4), + create_effect('bonus', TEAMWORK_BONUS, OFF), + create_effect('track', SOVIET_SUPPORT, -2) + ], + test: { + front: MADRID, + value: 2, + pass: create_effect('hero_points', PLAYER_WITH_MOST_HERO_POINTS, 1), + fail: create_effect('bonus', MORALE_BONUS, OFF), + }, + title: 'FASCIST AIR SUPREMACY', + type: 'ec', + year: 3, + }, + { + id: 92, + effects: [ + create_effect('attack', ARAGON, -6), + create_effect('attack', CLOSEST_TO_VICTORY, -3), + create_effect('track', FOREIGN_AID, -2), + create_effect('track', COLLECTIVIZATION, -1), + ], + test: { + front: ARAGON, + value: 2, + pass: create_effect('hero_points', ANARCHISTS_ID, 1), + fail: create_effect('bonus', MORALE_BONUS, OFF), + }, + title: 'CATALONIA OFFENSIVE', + type: 'ec', + year: 3, + }, + { + id: 93, + effects: [ + create_effect('attack', NORTHERN, -4), + create_effect('attack', CLOSEST_TO_VICTORY, -6), + create_effect('track', FOREIGN_AID, -2), + ], + test: { + front: NORTHERN, + value: 1, + pass: create_effect('hero_points', MODERATES_ID, 1), + fail: create_effect('track', SOVIET_SUPPORT, -3), + }, + title: 'MARTYRS OF THE SPANISH CIVIL WAR', + type: 'ec', + year: 3, + }, + { + id: 94, + effects: [ + create_effect('attack', NORTHERN, -6), + create_effect('attack', SOUTHERN, -4), + create_effect('track', SOVIET_SUPPORT, -2), + ], + test: { + front: NORTHERN, + value: 1, + pass: create_effect('hero_points', ALL_PLAYERS, 1), + fail: create_effect('track', FOREIGN_AID, -3), + }, + title: 'NAVAL BLOCKADE', + type: 'ec', + year: 3, + }, + { + id: 95, + effects: [ + create_effect('attack', CLOSEST_TO_DEFEAT, -5), + create_effect('attack', SOUTHERN, -5), + create_effect('track', FOREIGN_AID, -2), + ], + test: { + front: SOUTHERN, + value: 1, + pass: create_effect('draw_card', COMMUNISTS_ID, 1), + fail: create_effect('track', GOVERNMENT, TOWARDS_CENTER), + }, + title: 'MUNICH AGREEMENT', + type: 'ec', + year: 3, + }, + { + id: 96, + effects: [ + create_effect('attack', MADRID, -4), + create_effect('attack', CLOSEST_TO_VICTORY, -6), + create_effect('track', COLLECTIVIZATION, -1), + ], + test: { + front: MADRID, + value: 1, + pass: create_effect('hero_points', INITIATIVE_PLAYER, 1), + fail: create_effect('track', GOVERNMENT, TOWARDS_CENTER), + }, + title: 'LAW OF POLITICAL RESPONSIBILITIES', + type: 'ec', + year: 3, + }, + { + id: 97, + effects: [ + create_effect('attack', MADRID, -6), + create_effect('attack', ARAGON, -4), + create_effect('track', SOVIET_SUPPORT, -2), + ], + test: { + front: MADRID, + value: 1, + pass: create_effect('draw_card', ALL_PLAYERS, 1), + fail: create_effect('hero_points', ALL_PLAYERS, -1), + }, + title: 'INTERNATIONAL BRIGADES SENT HOME', + type: 'ec', + year: 3, + }, + { + id: 98, + effects: [ + create_effect('attack', NORTHERN, -7), + create_effect('attack', MADRID, -2), + create_effect('bonus', TEAMWORK_BONUS, OFF), + create_effect('track', LIBERTY, -1), + ], + test: { + front: NORTHERN, + value: -2, + pass: create_effect('hero_points', INITIATIVE_PLAYER, 1), + fail: create_effect('track', FOREIGN_AID, -2), + }, + title: 'FRENCH CONCENTRATION CAMPS', + type: 'ec', + year: 3, + }, + { + id: 99, + effects: [ + create_effect('attack', NORTHERN, -6), + create_effect('attack', MADRID, -3), + create_effect('track', FOREIGN_AID, -2), + create_effect('hero_points', PLAYER_WITH_MOST_HERO_POINTS, -1), + ], + test: { + front: NORTHERN, + value: 0, + pass: create_effect('track', FOREIGN_AID, 2), + fail: create_effect('bonus', MORALE_BONUS, OFF), + }, + title: 'RESIGNATION OF PRESIDENT AZAÑA', + type: 'ec', + year: 3, + }, + { + id: 100, + effects: [ + create_effect('attack', SOUTHERN, -7), + create_effect('attack', CLOSEST_TO_DEFEAT, -2), + create_effect('track', FOREIGN_AID, -2), + create_effect('hero_points', PLAYER_WITH_MOST_HERO_POINTS, -1), + ], + test: { + front: SOUTHERN, + value: -1, + pass: create_effect('draw_card', INITIATIVE_PLAYER, 1), + fail: create_effect('track', SOVIET_SUPPORT, -3), + }, + title: "FDR'S CAUTIOUS APPROACH", + type: 'ec', + year: 3, + }, + { + id: 101, + effects: [ + create_effect('attack', ARAGON, -7), + create_effect('attack', MADRID, -3), + create_effect('track', SOVIET_SUPPORT, -2), + ], + test: { + front: ARAGON, + value: -1, + pass: create_effect('draw_card', MODERATES_ID, 1), + fail: create_effect('track', COLLECTIVIZATION, -1), + }, + title: 'MOLOTOV-RIBBENTROP PACT', + type: 'ec', + year: 3, + }, + { + id: 102, + effects: [ + create_effect('attack', MADRID, -6), + create_effect('attack', CLOSEST_TO_VICTORY, -4), + create_effect('track', FOREIGN_AID, -2), + ], + test: { + front: MADRID, + value: 0, + pass: create_effect('track', GOVERNMENT, AWAY_FROM_CENTER), + fail: create_effect('hero_points', PLAYER_WITH_MOST_HERO_POINTS, -1), + }, + title: 'EASTER ACCORDS', + type: 'ec', + year: 3, + }, + { + id: 103, + effects: [ + create_effect('attack', MADRID, -7), + create_effect('attack', NORTHERN, -2), + create_effect('bonus', TEAMWORK_BONUS, OFF), + create_effect('hero_points', PLAYER_WITH_MOST_HERO_POINTS, -1) + ], + test: { + front: MADRID, + value: 0, + pass: create_effect('play_card', INITIATIVE_PLAYER, 1), + fail: create_effect('track', FOREIGN_AID, -3), + }, + title: 'NATIONAL DEFENCE COUNCIL', + type: 'ec', + year: 3, + }, + { + id: 104, + effects: [ + create_effect('attack', SOUTHERN, -6), + create_effect('attack', ARAGON, -3), + create_effect('track', SOVIET_SUPPORT, -2), + create_effect('hero_points', PLAYER_WITH_MOST_HERO_POINTS, -1) + ], + test: { + front: SOUTHERN, + value: 1, + pass: create_effect('hero_points', COMMUNISTS_ID, 1), + fail: create_effect('bonus', TEAMWORK_BONUS, OFF), + }, + title: 'ACCIDENTAL BOMBING OF CABRA', + type: 'ec', + year: 3, + }, + { + id: 105, + effects: [ + create_effect('attack', ARAGON, -6), + create_effect('attack', NORTHERN, -4), + create_effect('track', LIBERTY, -1), + ], + test: { + front: ARAGON, + value: 1, + pass: create_effect('draw_card', ANARCHISTS_ID, 1), + fail: create_effect('bonus', TEAMWORK_BONUS, OFF), + }, + title: 'BOMBING OF BARCELONA', + type: 'ec', + year: 3, + }, + { + id: 106, + effects: [ + create_effect('attack', MADRID, -6), + create_effect('attack', CLOSEST_TO_VICTORY, -3), + create_effect('bonus', TEAMWORK_BONUS, OFF), + create_effect('track', LIBERTY, -1), + ], + test: { + front: MADRID, + value: 0, + pass: create_effect('play_card', INITIATIVE_PLAYER, 1), + fail: create_effect('bonus', MORALE_BONUS, OFF), + }, + title: 'MILITARY DICTATORSHIP', + type: 'ec', + year: 3, + }, + { + id: 107, + effects: [ + create_effect('attack', ARAGON, -8), + create_effect('attack', SOUTHERN, -1), + create_effect('track', COLLECTIVIZATION, -1), + create_effect('track', SOVIET_SUPPORT, -2), + ], + test: { + front: ARAGON, + value: -2, + pass: create_effect('track', SOVIET_SUPPORT, 2), + fail: create_effect('track', LIBERTY, -1), + }, + title: 'BATTLE OF THE EBRO', + type: 'ec', + year: 3, + }, + { + id: 108, + effects: [ + create_effect('attack', CLOSEST_TO_DEFEAT, -3), + create_effect('attack', SOUTHERN, -6), + create_effect('bonus', TEAMWORK_BONUS, OFF), + create_effect('hero_points', PLAYER_WITH_MOST_HERO_POINTS, -1) + ], + test: { + front: SOUTHERN, + value: -1, + pass: create_effect('hero_points', ALL_PLAYERS, 1), + fail: create_effect('track', SOVIET_SUPPORT, -2), + }, + title: 'CARTAGENA UPRISING', + type: 'ec', + year: 3, + }, ], fronts: [ { @@ -11,19 +11,16 @@ var view = {}; exports.ANARCHIST = 'Anarchist'; exports.COMMUNIST = 'Communist'; exports.MODERATE = 'Moderate'; -const ANARCHISTS_ID = 'a'; -const COMMUNISTS_ID = 'c'; -const MODERATES_ID = 'm'; -const role_ids = [ANARCHISTS_ID, COMMUNISTS_ID, MODERATES_ID]; +const role_ids = [data_1.ANARCHISTS_ID, data_1.COMMUNISTS_ID, data_1.MODERATES_ID]; const faction_player_map = { - [ANARCHISTS_ID]: exports.ANARCHIST, - [COMMUNISTS_ID]: exports.COMMUNIST, - [MODERATES_ID]: exports.MODERATE, + [data_1.ANARCHISTS_ID]: exports.ANARCHIST, + [data_1.COMMUNISTS_ID]: exports.COMMUNIST, + [data_1.MODERATES_ID]: exports.MODERATE, }; const player_faction_map = { - [exports.ANARCHIST]: ANARCHISTS_ID, - [exports.COMMUNIST]: COMMUNISTS_ID, - [exports.MODERATE]: MODERATES_ID, + [exports.ANARCHIST]: data_1.ANARCHISTS_ID, + [exports.COMMUNIST]: data_1.COMMUNISTS_ID, + [exports.MODERATE]: data_1.MODERATES_ID, }; const front_names = { a: 'Aragon Front', @@ -37,9 +34,9 @@ const bonus_names = ['Morale Bonus', 'Teamwork Bonus']; const { cards, tracks, } = data_1.default; const bonuses = [data_1.MORALE_BONUS, data_1.TEAMWORK_BONUS]; const faction_cards = { - [ANARCHISTS_ID]: make_list(37, 54), - [COMMUNISTS_ID]: make_list(19, 36), - [MODERATES_ID]: make_list(1, 18), + [data_1.ANARCHISTS_ID]: make_list(37, 54), + [data_1.COMMUNISTS_ID]: make_list(19, 36), + [data_1.MODERATES_ID]: make_list(1, 18), }; const medaillons = make_list(0, 8); console.log('medaillons', medaillons); @@ -251,17 +248,17 @@ function setup(seed, _scenario, _options) { state: null, active: exports.ANARCHIST, bag_of_glory: { - [ANARCHISTS_ID]: 1, - [COMMUNISTS_ID]: 1, - [MODERATES_ID]: 1, + [data_1.ANARCHISTS_ID]: 1, + [data_1.COMMUNISTS_ID]: 1, + [data_1.MODERATES_ID]: 1, }, blank_markers: [[], [], [], [], []], bonuses: [data_1.ON, data_1.ON], current_events: [], discard: { - [ANARCHISTS_ID]: [], - [COMMUNISTS_ID]: [], - [MODERATES_ID]: [], + [data_1.ANARCHISTS_ID]: [], + [data_1.COMMUNISTS_ID]: [], + [data_1.MODERATES_ID]: [], f: [], }, engine: [], @@ -272,22 +269,22 @@ function setup(seed, _scenario, _options) { s: -2, }, hands: { - [ANARCHISTS_ID]: [], - [COMMUNISTS_ID]: [], - [MODERATES_ID]: [], + [data_1.ANARCHISTS_ID]: [], + [data_1.COMMUNISTS_ID]: [], + [data_1.MODERATES_ID]: [], }, hero_points: { - [ANARCHISTS_ID]: 2, - [COMMUNISTS_ID]: 2, - [MODERATES_ID]: 0, + [data_1.ANARCHISTS_ID]: 2, + [data_1.COMMUNISTS_ID]: 2, + [data_1.MODERATES_ID]: 0, pool: 14, }, chosen_cards: { - [ANARCHISTS_ID]: null, - [COMMUNISTS_ID]: null, - [MODERATES_ID]: null, + [data_1.ANARCHISTS_ID]: null, + [data_1.COMMUNISTS_ID]: null, + [data_1.MODERATES_ID]: null, }, - initiative: MODERATES_ID, + initiative: data_1.MODERATES_ID, medaillons: [ draw_item(medaillons), draw_item(medaillons), @@ -296,15 +293,15 @@ function setup(seed, _scenario, _options) { draw_item(medaillons), ], tableaus: { - [ANARCHISTS_ID]: [], - [COMMUNISTS_ID]: [], - [MODERATES_ID]: [], + [data_1.ANARCHISTS_ID]: [], + [data_1.COMMUNISTS_ID]: [], + [data_1.MODERATES_ID]: [], }, tracks: [5, 5, 6, 3, 3], trash: { - [ANARCHISTS_ID]: [], - [COMMUNISTS_ID]: [], - [MODERATES_ID]: [], + [data_1.ANARCHISTS_ID]: [], + [data_1.COMMUNISTS_ID]: [], + [data_1.MODERATES_ID]: [], }, triggered_track_effects: [[], [], [], [], []], log: [], @@ -575,17 +572,17 @@ states.lose_hero_points = { }, Anarchist() { const value = get_active_node_args().v; - lose_hero_point(ANARCHISTS_ID, value); + lose_hero_point(data_1.ANARCHISTS_ID, value); resolve_active_and_proceed(); }, Communist() { const value = get_active_node_args().v; - lose_hero_point(ANARCHISTS_ID, value); + lose_hero_point(data_1.ANARCHISTS_ID, value); resolve_active_and_proceed(); }, Moderate() { const value = get_active_node_args().v; - lose_hero_point(ANARCHISTS_ID, value); + lose_hero_point(data_1.ANARCHISTS_ID, value); resolve_active_and_proceed(); }, }; @@ -18,6 +18,9 @@ import { } from './types'; import data, { + ANARCHISTS_ID, + COMMUNISTS_ID, + MODERATES_ID, // LIBERTY, // COLLECTIVIZATION, // GOVERNMENT, @@ -57,10 +60,6 @@ export const ANARCHIST = 'Anarchist' as Player; export const COMMUNIST = 'Communist' as Player; export const MODERATE = 'Moderate' as Player; -const ANARCHISTS_ID = 'a' as FactionId; -const COMMUNISTS_ID = 'c' as FactionId; -const MODERATES_ID = 'm' as FactionId; - const role_ids = [ANARCHISTS_ID, COMMUNISTS_ID, MODERATES_ID]; const faction_player_map: Record<FactionId, Player> = { @@ -8,6 +8,7 @@ export type Brand<T, TBrand extends string> = T & { export type Player = Brand<string, 'Player'>; export type CardId = Brand<number, 'CardId'>; export type FactionId = Brand<string, 'FactionId'>; +export type FrontId = 'a' | 'm' | 'n' | 's'; export interface Game { [index: number]: any; @@ -109,6 +110,12 @@ export interface EventCard extends CardBase { type: 'ec'; year: number; effects: Effect[]; + test: { + front: FrontId; + value: number; + pass: Effect; + fail: Effect; + }; } export type Icon = @@ -143,6 +150,7 @@ export interface Effect { | 'front' | 'medaillon' | 'draw_card' + | 'play_card' | 'swap_card_tableau_hand' | 'add_to_tableau' | 'remove_blank_marker' |