summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2023-07-09 00:46:07 +0200
committerTor Andersson <tor@ccxvii.net>2023-07-09 00:46:19 +0200
commit64e463b670429aa41e745be954bd55d8ec1aee75 (patch)
tree7e490f080fe2ec12e831559e88ac2b494da82f98
parentf1aebd2428f22a26246c053bfffa19e08d30840e (diff)
downloadtime-of-crisis-64e463b670429aa41e745be954bd55d8ec1aee75.tar.gz
Show demagogue player's cards as current during demagogue actions.
-rw-r--r--rules.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/rules.js b/rules.js
index 41f60e0..2da9fbd 100644
--- a/rules.js
+++ b/rules.js
@@ -3569,6 +3569,7 @@ states.demagogue_confirm = {
states.demagogue = {
inactive: "Demagogue",
+ demagogue: true,
prompt() {
prompt("Demagogue: Reveal and return one card to your available pile.")
for (let c of current_hand())
@@ -3585,12 +3586,14 @@ states.demagogue = {
states.demagogue_done = {
inactive: "Demagogue",
+ demagogue: true,
prompt() {
prompt("Demagogue: Done.")
view.actions.done = 1
},
done() {
clear_undo()
+ game.state = "demagogue"
game.current = next_player()
if (game.current === game.count)
goto_demagogue_reveal()
@@ -5412,6 +5415,9 @@ exports.view = function (state, player_name) {
view.discard = game.discard[player]
}
+ if (states[game.state].demagogue)
+ view.current = game.count
+
save_game()
return view
}