From 9f1f44f15cb680d31b772ae6fb9f0b8b80397c53 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Fri, 16 Jun 2023 22:17:14 +0200 Subject: Event 12 and 21 - increasing player momentum is optional. --- rules.js | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 50 insertions(+), 2 deletions(-) (limited to 'rules.js') diff --git a/rules.js b/rules.js index 368637a..6f5a5d5 100644 --- a/rules.js +++ b/rules.js @@ -2663,6 +2663,20 @@ function vm_increase_prussian_collaboration() { vm_next() } +function vm_may_increase_revolutionary_momentum() { + if (game.red_momentum < 3) + game.state = "vm_may_increase_revolutionary_momentum" + else + vm_next() +} + +function vm_may_increase_prussian_collaboration() { + if (game.blue_momentum < 3) + game.state = "vm_may_increase_prussian_collaboration" + else + vm_next() +} + function vm_decrease_revolutionary_momentum() { if (game.red_momentum > 0) game.state = "vm_decrease_revolutionary_momentum" @@ -2832,6 +2846,23 @@ states.vm_increase_revolutionary_momentum = { }, } +states.vm_may_increase_revolutionary_momentum = { + inactive: "increase Revolutionary Momentum", + prompt() { + event_prompt("Increase Revolutionary Momentum.") + view.actions.red_momentum = 1 + view.actions.pass = 1 + }, + red_momentum() { + push_undo() + increase_revolutionary_momentum() + }, + pass() { + push_undo() + vm_next() + }, +} + states.vm_increase_prussian_collaboration = { inactive: "increase Prussian Collaboration", prompt() { @@ -2844,6 +2875,23 @@ states.vm_increase_prussian_collaboration = { }, } +states.vm_may_increase_prussian_collaboration = { + inactive: "increase Prussian Collaboration", + prompt() { + event_prompt("Increase Prussian Collaboration.") + view.actions.blue_momentum = 1 + view.actions.pass = 1 + }, + blue_momentum() { + push_undo() + increase_prussian_collaboration() + }, + pass() { + push_undo() + vm_next() + }, +} + states.vm_decrease_revolutionary_momentum = { inactive: "decrease Revolutionary Momentum", prompt() { @@ -3785,7 +3833,7 @@ CODE[11] = [ // Adolphe Thiers CODE[12] = [ // Otto von Bismarck [ vm_prompt, "Remove 1 from National Assembly." ], [ vm_remove_own, NATIONAL_ASSEMBLY ], - [ vm_increase_prussian_collaboration ], + [ vm_may_increase_prussian_collaboration ], [ vm_ops, 2, MILITARY ], [ vm_return ], ] @@ -3844,7 +3892,7 @@ CODE[20] = [ // Banque de France ] CODE[21] = [ // Le Réveil - [ vm_increase_revolutionary_momentum ], + [ vm_may_increase_revolutionary_momentum ], [ vm_prompt, "Place up to 1 in Press." ], [ vm_place_up_to, 1, PRESS ], [ vm_return ], -- cgit v1.2.3