summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2022-01-07 13:23:54 +0100
committerTor Andersson <tor@ccxvii.net>2022-11-16 19:08:56 +0100
commitba2db43d2a599c52a05bdb3466b7bc951b25fc6c (patch)
tree52acd48a70f3fd8c03aed8604a7c66d98271165e
parente6cbdd5c77a4ec4b771fdec2094a480ff6d17eb4 (diff)
downloadjulius-caesar-ba2db43d2a599c52a05bdb3466b7bc951b25fc6c.tar.gz
Show both prior cards to make it clearer when double events cancel.
-rw-r--r--rules.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/rules.js b/rules.js
index 42f972e..f90c923 100644
--- a/rules.js
+++ b/rules.js
@@ -939,14 +939,18 @@ function resume_play_card() {
states.play_card = {
prompt: function (view, current) {
- if (current === "Observer")
+ if (current === "Observer") {
+ view.prior_c_card = game.prior_c_card;
+ view.prior_p_card = game.prior_p_card;
return view.prompt = "Waiting for players to play a card.";
+ }
if (current === CAESAR) {
view.prior_p_card = game.prior_p_card;
if (game.c_card) {
view.prompt = "Waiting for Pompeius to play a card.";
gen_action(view, 'undo');
} else {
+ view.prior_c_card = game.prior_c_card;
view.prompt = "Play a card.";
for (let c of game.c_hand)
gen_action(view, 'card', c);
@@ -958,6 +962,7 @@ states.play_card = {
view.prompt = "Waiting for Caesar to play a card.";
gen_action(view, 'undo');
} else {
+ view.prior_p_card = game.prior_p_card;
view.prompt = "Play a card.";
for (let c of game.p_hand)
gen_action(view, 'card', c);