diff options
author | iainp5 <iain.pearce.ip@gmail.com> | 2024-10-29 08:43:15 +0000 |
---|---|---|
committer | iainp5 <iain.pearce.ip@gmail.com> | 2024-11-02 08:16:41 +0000 |
commit | 8d30191b69368d51652457da86e54dbcee9e8e85 (patch) | |
tree | 1c7161cb34642ad214ed6691fb9c0f3b7594672f /rules.js | |
parent | 5b71e759a74b8bea8809a2c51e83edb4956254ea (diff) | |
download | 1989-dawn-of-freedom-8d30191b69368d51652457da86e54dbcee9e8e85.tar.gz |
Tidying up code
Diffstat (limited to 'rules.js')
-rw-r--r-- | rules.js | 32 |
1 files changed, 8 insertions, 24 deletions
@@ -5818,7 +5818,6 @@ states.vm_remove_x_infl = { } else if (game.vm_available_ops > 0) { view.prompt = `${clean_name(cards[this_card()].name)}: remove ${pluralize(game.vm_available_ops,'SP')} from ${event_prompt()}.` - for (let space_id of game.valid_spaces) { gen_action_space(space_id); } @@ -5975,7 +5974,6 @@ states.vm_ceh_do_support_check = { roll() { clear_undo() do_sc(game.selected_space) - game.vm_available_ops-- if (game.vm_available_ops === 0) { game.valid_spaces = [] @@ -6011,7 +6009,6 @@ states.vm_1_support_check_prep = { gen_action('done') } else { view.prompt = `${clean_name(cards[this_card()].name)}: ${event_prompt()}.` - for (let space_id of game.valid_spaces) { if (!space_id) continue gen_action_space(space_id); @@ -6197,7 +6194,6 @@ states.vm_central_committee_reshuffle = { log('Passed') vm_return() } - } states.vm_common_european_home_choose = { @@ -6294,7 +6290,7 @@ states.vm_play_event_from_discard = { if (game.valid_cards.length === 0) { view.prompt = `${clean_name(cards[this_card()].name)}: no valid cards in discard.` gen_action('pass') - } else if (game.temp === 0) { + } else { view.prompt = `${event_prompt()}.` for (let card of game.valid_cards) { gen_action('pass') @@ -6686,7 +6682,7 @@ states.vm_inflationary_currency_discard = { if (game.valid_cards.length === 0 ) { view.prompt = 'Inflationary Currency: no valid cards to discard. You must pass.' gen_action('pass') - } else if (game.temp === 0 ) { + } else { view.prompt = 'Inflationary Currency: you may discard a 3 op or higher value card to cancel the support check.' gen_action('pass') for (let card of game.valid_cards) { @@ -6714,16 +6710,6 @@ states.vm_inflationary_currency_discard = { game.vm_available_ops = 1 vm_next() }, - done() { - if (!game.vm_infl_to_do) { - if(game.round_player === DEM) { - game.return = COM - } else { - game.return = DEM - } - } - vm_next() - } } @@ -7055,7 +7041,6 @@ states.vm_nepotism = { else { log(`Roll: D${roll} adds 1 SP`) game.vm_available_ops = 1} - vm_next() }, } @@ -7332,12 +7317,14 @@ states.vm_social_democratic_platform_adopted = { push_undo() game.vm_active_country = 'Poland' log(`Selected ${country_name(game.vm_active_country)}`) - vm_next()}, + vm_next() + }, czechoslovakia() { push_undo() game.vm_active_country = 'Czechoslovakia' log(`Selected ${country_name(game.vm_active_country)}`) - vm_next()}, + vm_next() + }, hungary() { push_undo() game.vm_active_country = 'Hungary' @@ -7377,7 +7364,7 @@ states.vm_systematization = { vm_eliminate(space) game.valid_spaces = [] game.systematization = space - game.persistent_events.push(C_SYSTEMATIZATION) /*IS THIS STILL NEEDED?*/ + game.persistent_events.push(C_SYSTEMATIZATION) /*IS THIS STILL NEEDED? For view?*/ vm_next() }, } @@ -7464,7 +7451,7 @@ states.vm_the_chinese_solution = { }, pass() { push_undo() - permanently_remove(96) + permanently_remove(C_THE_CHINESE_SOLUTION) vm_return() } } @@ -7679,7 +7666,6 @@ states.vm_workers_revolt = { } } - states.vm_workers_revolt_finish = { get inactive() { return `resolve ${clean_name(cards[game.played_card].name)}.` @@ -7708,7 +7694,6 @@ states.vm_workers_revolt_finish = { game.selected_space = 0 vm_next() }, - } // ==================== TIANANMEN SQUARE TRACK STATES ===================== @@ -7863,7 +7848,6 @@ states.vm_tst_8 = { } } - states.vm_tst_8_ops = { inactive: 'play card for operations.', prompt() { |