From 9ec057935b3d77cc13f898b2ede63cf180443318 Mon Sep 17 00:00:00 2001 From: Frans Bongers Date: Wed, 4 Dec 2024 21:15:18 +0100 Subject: add event card data --- rules.js | 73 +++++++++++++++++++++++++++++++--------------------------------- 1 file changed, 35 insertions(+), 38 deletions(-) (limited to 'rules.js') diff --git a/rules.js b/rules.js index 5a5445b..5b8efd5 100644 --- a/rules.js +++ b/rules.js @@ -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(); }, }; -- cgit v1.2.3