summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMischa Untaga <99098079+MischaU8@users.noreply.github.com>2023-11-17 16:46:19 +0100
committerMischa Untaga <99098079+MischaU8@users.noreply.github.com>2023-11-17 16:46:19 +0100
commit6380a2670773bc6ab784fa9282d8d296236957dd (patch)
tree9b10543096d07ee2ceff259d31d978698fed5e2e
parentbab8ec3dd5b17fca2ee5f31a80913a39454985f3 (diff)
downloadvotes-for-women-6380a2670773bc6ab784fa9282d8d296236957dd.tar.gz
organizing
-rw-r--r--rules.js31
1 files changed, 30 insertions, 1 deletions
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 = {