From 5faa2a308fb60e3c4ad5c9c671641bbd2f41295d Mon Sep 17 00:00:00 2001 From: Mischa Untaga <99098079+MischaU8@users.noreply.github.com> Date: Sat, 25 Nov 2023 20:51:47 +0100 Subject: fix to be played event card shouldnt be placed back in the deck --- rules.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/rules.js b/rules.js index f19e94e..ddaec92 100644 --- a/rules.js +++ b/rules.js @@ -2812,6 +2812,7 @@ states.vm_place_any_on_top_of_draw = { delete game.vm.play_one }, done() { + // first selected card is the to be played event card if (game.vm.play_one) game.vm.play_one = game.selected_cards.shift() log(`${game.active} selected ${pluralize(game.selected_cards.length, 'card')} to put on top of their Draw Deck.`) @@ -2822,9 +2823,12 @@ states.vm_place_any_on_top_of_draw = { array_remove_item(game.vm.draw, c) array_remove_item(player_hand(), c) } + // rest goes to the bottom, except for the to be played event card for (let c of game.vm.draw) { - player_deck().unshift(c) - array_remove_item(player_hand(), c) + if (c !== game.vm.play_one) { + player_deck().unshift(c) + array_remove_item(player_hand(), c) + } } delete game.vm.draw -- cgit v1.2.3