summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2023-05-29 13:15:14 +0200
committerTor Andersson <tor@ccxvii.net>2023-05-29 13:15:14 +0200
commit0f6ac5aac4c2bd7eca7ebcf35881237a304057a9 (patch)
tree787706b1cff63af67bbb55284815d0108adbd029
parentaa554d3af51ae6988e5cb204699ee8faac1098ec (diff)
downloadred-flag-over-paris-0f6ac5aac4c2bd7eca7ebcf35881237a304057a9.tar.gz
Only use discarded cards played by your opponent this round.
If removing a card to advance momentum, disable picking up the last discard. If the first play of a round (non-censorship variant) also disable picking up the last discard from the previous round.
-rw-r--r--rules.js13
1 files changed, 9 insertions, 4 deletions
diff --git a/rules.js b/rules.js
index 9fc4317..a5efb21 100644
--- a/rules.js
+++ b/rules.js
@@ -330,6 +330,7 @@ function versailles_objective_space() {
// === GAME STATE ===
function discard_card(c) {
+ game.can_use_discard = 1
array_remove_item(player_hand(), c)
game.discard.push(c)
}
@@ -1012,6 +1013,7 @@ states.initiative_phase = {
function end_initiative_phase() {
game.active = game.initiative
+ game.can_use_discard = 0
if (game.round === 4)
goto_final_crisis_events()
else if (game.censorship)
@@ -1108,10 +1110,12 @@ states.strategy_phase = {
if (final > 0)
gen_action_card(final)
- let top = top_discard()
- if (top > 0 && !is_neutral_card(top) && can_pay_for_discard(top))
- if (can_play_event(top))
- gen_action_card(top)
+ if (game.can_use_discard) {
+ let top = top_discard()
+ if (top > 0 && !is_neutral_card(top) && can_pay_for_discard(top))
+ if (can_play_event(top))
+ gen_action_card(top)
+ }
}
},
@@ -1173,6 +1177,7 @@ states.play_card = {
push_undo()
log_h3(game.active + " - Momentum")
logi("C" + game.what)
+ game.can_use_discard = 0
if (game.censorship)
recycle_card(game.what)
else