From 5d81b4294bd8f9b20ac8a396a185f6cf9550c00f Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Fri, 25 Oct 2024 11:58:58 +0200 Subject: Update client. Fixed some spelling errors in space data table. Create tools directory and add Makefile. Add layout.svg with boxes drawn on top of locations. Add genlayout.js to create list of box locations. Add gencolors.js to create beveled marker border colors. Major rewrite of play.js and play.css with official assets. --- rules.js | 71 +++++++++++++++++++++++++++++++--------------------------------- 1 file changed, 34 insertions(+), 37 deletions(-) (limited to 'rules.js') diff --git a/rules.js b/rules.js index 877c4d8..6ce54dd 100644 --- a/rules.js +++ b/rules.js @@ -268,18 +268,13 @@ exports.view = function(state, player) { // === ACTIONS =========== function gen_action(action, argument) { -//console.log('gen_action called with ', action, ' and ', argument) if (argument === undefined) { - //console.log('argument undefined') view.actions[action] = 1 } else { - if (!(action in view.actions)) { - //console.log('push argument') + if (!(action in view.actions)) view.actions[action] = [] - } view.actions[action].push(argument) } - //console.log('view.actions: ', view.actions, 'view.actions[action]: ', view.actions[action]) } function gen_action_space(space){ @@ -9013,6 +9008,7 @@ states.vm_support_falters = { /* =================== EVENTS ================================ */ // #region GENERATED EVENT CODE + const CODE = [] CODE[1] = [ // Legacy of Martial Law* @@ -9875,43 +9871,44 @@ CODE[110] = [ // Malta Summit* [ vm_remove_opp_infl, 5 ], [ vm_return ], ] -// #endregion - -// ============= TIANANMEN SQUARE TRACK AWARDS ==================== -CODE[203] = [//Tiananmen Square space 3 award - [vm_tst_3], - [vm_return] -] -CODE[204] = [//Tiananmen Square space 4 award - [vm_valid_spaces_opponent], - [vm_tst_4], - [vm_return] +CODE[203] = [ // Tiananmen Square space 3 award + [ vm_tst_3 ], + [ vm_return ], ] -CODE[206] = [//Tiananmen Square space 6 - [vm_valid_spaces_sc], - [vm_tst_6], - [vm_return] + +CODE[204] = [ // Tiananmen Square space 4 award + [ vm_valid_spaces_opponent ], + [ vm_tst_4 ], + [ vm_return ], ] -CODE[208] = [//Tiananmen Square space 8 event - [vm_tst_8], - [vm_return] + +CODE[206] = [ // Tiananmen Square space 6 + [ vm_valid_spaces_sc ], + [ vm_tst_6 ], + [ vm_return ], ] -// ============= POWER STRUGGLE WILDCARDS ========================= +CODE[208] = [ // Tiananmen Square space 8 event + [ vm_tst_8 ], + [ vm_return ], +] -CODE[349] = [//Scare Tactics - [vm_scare_tactics], - [vm_valid_spaces_country_opp], - [vm_prompt, ()=>` from ${country_name(game.vm_active_country)}`], - [vm_remove_opp_infl, 1], - [vm_return] +CODE[349] = [ // Scare Tactics + [ vm_scare_tactics ], + [ vm_valid_spaces_country_opp ], + [ vm_prompt, ()=>` from ${country_name(game.vm_active_country)}` ], + [ vm_remove_opp_infl, 1 ], + [ vm_return ], ] -CODE[350] = [//Support Surges - [vm_support_surges], - [vm_return] + +CODE[350] = [ // Support Surges + [ vm_support_surges ], + [ vm_return ], ] -CODE[351] = [//Support Falters - [vm_support_falters], - [vm_return] + +CODE[351] = [ // Support Falters + [ vm_support_falters ], + [ vm_return ], ] +// #endregion -- cgit v1.2.3