From e11d375f616296f632c831e990d097e6bc18b233 Mon Sep 17 00:00:00 2001 From: iainp5 Date: Sun, 27 Oct 2024 15:24:33 +0000 Subject: Remove unnecessary power struggle states --- rules.js | 47 ++++++++++++----------------------------------- 1 file changed, 12 insertions(+), 35 deletions(-) diff --git a/rules.js b/rules.js index 7f51d2a..9d5fc40 100644 --- a/rules.js +++ b/rules.js @@ -1517,34 +1517,14 @@ states.raise_stakes_2 = { }, pass() { log('Did not raise the stakes') - game.raised_stakes_discard = 0 - game.valid_cards = [] - log_h2('Play Cards') - next_player() - game.state = 'begin_power_struggle' + goto_struggle() }, done () { log_gap('Raised the stakes') - game.raised_stakes_discard = 0 - game.valid_cards = [] - log_h2('Play Cards') - next_player() - game.state = 'begin_power_struggle' + goto_struggle() }, } -states.begin_power_struggle = { - inactive: 'begin power struggle.', - prompt() { - view.prompt = 'Begin power struggle.' - gen_action('struggle') - }, - struggle () { - do_valid_cards() - game.state = 'power_struggle' - } -} - states.power_struggle = { inactive: 'play a card.', prompt () { @@ -2046,23 +2026,11 @@ states.end_turn_4_5_4 = { game.state = 'final_scoring_held' } else { - game.return_state = '' - game.state = 'end_turn' + new_turn() } } } -states.end_turn = { - inactive: 'end the turn.', - prompt() { - view.prompt = 'End Turn: done.' - gen_action('done') - }, - done() { - new_turn() - } -} - states.final_scoring_held = { inactive: 'resolve final scoring.', prompt() { @@ -3297,6 +3265,15 @@ function goto_game_over(result, victory) { } +function goto_struggle(){ + game.raised_stakes_discard = 0 + game.valid_cards = [] + log_h2('Play Cards') + next_player() + game.state = 'power_struggle' + do_valid_cards() +} + function reset_austria_hungary_border_reopened() { game.austria_hungary_border_reopened_tracker = false } -- cgit v1.2.3