diff options
Diffstat (limited to 'rules.js')
-rw-r--r-- | rules.js | 58 |
1 files changed, 19 insertions, 39 deletions
@@ -1421,7 +1421,6 @@ states.raise_stakes_1 = { inactive: 'raise the stakes.', prompt () { - console.log('raise stakes 1 - com hand', game.com_pwr_hand, 'dem hand', game.dem_pwr_hand) if ((game.active === DEM && game.dem_pwr_hand < 3) || (game.active === COM && game.com_pwr_hand < 3)) { view.prompt = 'Raise the stakes: you must pass.' gen_action('pass') @@ -1518,38 +1517,17 @@ 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 () { - console.log('game.vm_event', game.vm_event) if (game.phase === 0) { if (game.valid_cards.length > 0) { view.prompt = "Play a card." @@ -2047,23 +2025,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() { @@ -3305,6 +3271,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 } @@ -7170,7 +7145,6 @@ states.vm_kiss_of_death_finish = { prompt() { if (game.vm_event > 0 && game.vm_event !== C_COMMON_EUROPEAN_HOME && (cards[game.vm_event].side === 'D' || cards[game.vm_event].side === 'N')) { view.prompt = `Play ${clean_name(cards[game.vm_event].name)} for the event.` - console.log('kiss of death before event button: game.stategy_discard', game.strategy_discard) gen_action('event') } else { view.prompt = 'Event does not occur.' @@ -8398,8 +8372,14 @@ states.vm_support_surges_2 = { states.vm_support_surges_3 = { inactive: 'draw cards.', prompt() { - if (numberless_cards.includes(game.temp)) { + if (wildcards.includes(game.temp)) { view.prompt = `Support Surges: you drew ${power_cards[game.temp].name}. Done.` + } + else if (elite_leaders.includes(game.temp)) { + view.prompt = `Support Surges: you drew an ${power_cards[game.temp].name}. Done.` + } + else if (numberless_cards.includes(game.temp)) { + view.prompt = `Support Surges: you drew a ${power_cards[game.temp].name}. Done.` } else { view.prompt = `Support Surges: you drew a ${power_cards[game.temp].name} ${power_cards[game.temp].value}. Done.` } |