diff options
author | iainp5 <iain.pearce.ip@gmail.com> | 2024-12-19 17:04:47 +0000 |
---|---|---|
committer | iainp5 <iain.pearce.ip@gmail.com> | 2024-12-19 17:04:47 +0000 |
commit | c1353e54023269d58debec272514fc45dc0c7577 (patch) | |
tree | 9c8e0890819a6823e51549c79531d4794c16292e /rules.js | |
parent | 6866f683f696589611b01b74c9a9b2bce79027ac (diff) | |
download | 1989-dawn-of-freedom-c1353e54023269d58debec272514fc45dc0c7577.tar.gz |
Delete game.ps_round at end of power struggle
Diffstat (limited to 'rules.js')
-rw-r--r-- | rules.js | 31 |
1 files changed, 2 insertions, 29 deletions
@@ -1528,7 +1528,7 @@ states.power_struggle = { game.tactics_fails = power_cards[game.played_power_card].name } game.phase = 0 - log(`Round: ${game.ps_round}`) + log_gap(`Round ${game.ps_round}:`) change_player() do_valid_cards() } else if (power_cards[game.played_power_card].value === 1) { @@ -2301,12 +2301,7 @@ function add_infl(space, ops) { } let end_control = check_control(space) - - console.log('starting_control', starting_control, 'end_control', end_control) - log_summary('£ in %' + space + get_icons(starting_control,end_control)) - - console.log('influence add, game.summary', game.summary) check_tyrant() // Check Austria Hungary Border Reopened is true and condition has been met @@ -2817,7 +2812,6 @@ function get_icons(starting_control, end_control) { return '' else { if (starting_control !== end_control) { - console.log('in long bit') if (starting_control === DEM && end_control === COM) return ' (£DC .to £CC)' else if (starting_control === COM && end_control === DEM) @@ -3810,11 +3804,8 @@ function end_round() { if (game.state === 'game_over') { return } - - console.log('in end_round, game.persistent_events.includes(C_CEAUSESCU)', game.persistent_events.includes(C_CEAUSESCU)) // Check if Ceausescu has been played and if so check end round condition if (game.persistent_events.includes(C_CEAUSESCU)) { - console.log('in check ceausescu') if (check_ceausescu()) return } @@ -4273,6 +4264,7 @@ function reset_power() { delete game.played_power_card delete game.tactics_fails delete game.view_opp_power_hand + delete game.ps_round let scoring_events = [C_PEASANT_PARTIES_REVOLT, C_YAKOVLEV_COUNSELS_GORBACHEV, C_THE_CROWD_TURNS_AGAINST_CEAUSESCU] for (let e of scoring_events) { @@ -4289,7 +4281,6 @@ function reset_power() { function check_ceausescu() { game.return = game.active game.return_state = 'ceausescu_check' - console.log('check_ceausescu, game.return', game.return) game.vm_infl_to_do = false game.vm_event = C_CEAUSESCU goto_vm(game.vm_event) @@ -4486,7 +4477,6 @@ function push_summary() { } function log_summary(msg) { - if (msg.startsWith('Added') || msg.startsWith('£')) { for (let item of game.summary) { if (item[1] === msg) { @@ -4496,7 +4486,6 @@ function log_summary(msg) { } } game.summary.push([1, msg]) - console.log('game.summary', game.summary) } function pop_summary() { @@ -4528,8 +4517,6 @@ function pop_summary_i() { let c63_logged = false; for (let [n, msg] of game.summary) { - console.log('msg', msg); - // Special case: Log C63 only once if (msg === "(-1 op due to C63)") { if (!c63_logged) { @@ -4592,7 +4579,6 @@ function pop_summary_i() { function do_log_summary() { if (game.summary.length > 0) { - console.log('game.summary', game.summary) pop_summary_i() } } @@ -4764,7 +4750,6 @@ function prompt_event(str) { } function event_prompt(str) { - console.log('game.vm.fp', game.vm.fp, 'game.vm.prompt', game.vm.prompt) if (typeof str === "undefined") str = CODE[game.vm.fp][game.vm.prompt][1] if (typeof str === "function") @@ -4810,30 +4795,21 @@ function vm_return() { } function vm_end_event() { - console.log('vm_end_event game.return', game.return, 'game.return_state', game.return_state, 'game.vm_infl_to_do', game.vm_infl_to_do) if (game.return_state === 'ceausescu_check') { - console.log('1') end_round() return } - console.log('in game return, game.return', game.return) if (game.return !== game.active) { - //next_player() - console.log('2') change_player() } if (game.return_state === 'power_struggle') { - console.log('3') do_valid_cards() } if (game.return_state && game.return_state !== '') { - console.log('4') game.state = game.return_state } else if (game.vm_infl_to_do) { - console.log('in game.vm_infl_to_do') game.state = 'resolve_opponent_event' } else { - console.log('end round called') end_round() } } @@ -5463,7 +5439,6 @@ function vm_ceausescu() { adj_cluj = true } - console.log('in vm_ceausescu, adj_cluj', adj_cluj) if (adj_cluj && game.comInfl[S_BUCURESTI] > 0) { if (game.active !== COM) { change_player() @@ -6336,7 +6311,6 @@ function vm_kremlin_coup_elite() { states.vm_end_event = { prompt() { prompt_event("Done.") - console.log('in vm_end_event') if (game.vm_infl_to_do || game.return_state === 'vm_tst_8') { gen_action('done') } else { @@ -6540,7 +6514,6 @@ states.vm_remove_infl = { prompt_event(`Remove ${pluralize(game.vm_available_ops, 'opponent SP')}${event_prompt()}.`) } else { - console.log('game.vm_event', game.vm_event) if (game.vm_event === C_CEAUSESCU) prompt_event(`${event_prompt()}.`) else |