From 6380a2670773bc6ab784fa9282d8d296236957dd Mon Sep 17 00:00:00 2001 From: Mischa Untaga <99098079+MischaU8@users.noreply.github.com> Date: Fri, 17 Nov 2023 16:46:19 +0100 Subject: organizing --- rules.js | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/rules.js b/rules.js index 3ec2bad..d151e1e 100644 --- a/rules.js +++ b/rules.js @@ -864,16 +864,18 @@ states.operations_phase = { card_campaigning(c) { push_undo() log(`C${c} - Campaigning Action`) + log("TODO") end_play_card(c) }, card_organizing(c) { push_undo() log(`C${c} - Organizing Action`) - end_play_card(c) + goto_play_organizing(c) }, card_lobbying(c) { push_undo() log(`C${c} - Lobbying Action`) + log("TODO") end_play_card(c) }, done() { @@ -977,6 +979,31 @@ function end_cleanup_phase() { // #endregion +// #region NON-EVENT CARD ACTIONS + +function goto_play_organizing(c) { + game.played_card = c + game.state = 'play_organizing' +} + +states.play_organizing = { + inactive: "receive buttons", + prompt() { + let count = count_player_active_campaigners() + view.prompt = `Organizing: Receive ${pluralize(count, 'button')}` + gen_action("next") + }, + next() { + push_undo() + let count = count_player_active_campaigners() + if (count) + increase_player_buttons(count) + end_play_card(game.played_card) + } +} + +// #endregion + // #region EVENTS GENERIC function goto_play_event(c) { @@ -1358,6 +1385,8 @@ function vm_support_discard_2_random_draw_2() { vm_next() } +// #endregion + // #region EVENT STATES states.vm_switch = { -- cgit v1.2.3