summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoriainp5 <iain.pearce.ip@gmail.com>2024-10-27 15:24:33 +0000
committeriainp5 <iain.pearce.ip@gmail.com>2024-10-27 15:24:33 +0000
commite11d375f616296f632c831e990d097e6bc18b233 (patch)
treec81af28ca09f1eafcf7f6676235d988b9bab20b5
parentc7a017fbf75a15a6870545f44c57401c8e848e0a (diff)
download1989-dawn-of-freedom-e11d375f616296f632c831e990d097e6bc18b233.tar.gz
Remove unnecessary power struggle states
-rw-r--r--rules.js47
1 files 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
}