diff options
author | Tor Andersson <tor@ccxvii.net> | 2025-03-23 12:41:35 +0100 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2025-03-23 12:41:35 +0100 |
commit | e017dd5f28576a31df6a767907f1dfa28472c4b0 (patch) | |
tree | 6fc52acea6a9297a48167c89b86188d42c42d0c3 /rules.js | |
parent | 132d8e5f7a39247aaa64cea18947a38d932b77b8 (diff) | |
download | land-and-freedom-e017dd5f28576a31df6a767907f1dfa28472c4b0.tar.gz |
Log discarded end of year cards.
Diffstat (limited to 'rules.js')
-rw-r--r-- | rules.js | 17 |
1 files changed, 13 insertions, 4 deletions
@@ -1279,10 +1279,6 @@ states.end_of_year_discard = { discarded[faction_id].t.push(c); } game.discard[faction_id].push(c); - if (game.hands[faction_id].length <= get_hand_limit(faction_id) && - game.tableaus[faction_id].length <= game.year) { - log(`${player} discarded cards.`); - } }, undo(_, player) { const faction_id = player_faction_map[player]; @@ -1298,6 +1294,19 @@ states.end_of_year_discard = { } }, confirm(_, player) { + const faction_id = player_faction_map[player]; + const { d: discarded } = get_active_node_args(); + log_br(); + log(player + " discarded:"); + for (let c of discarded[faction_id].t) + log(">C" + c); + const n = discarded[faction_id].h.length; + if (n === 1) + log(">" + n + " card from hand"); + else if (n > 1) + log(">" + n + " cards from hand"); + else + log(">No cards from hand"); set_delete(game.active, player); if (game.active.length === 0) { resolve_active_and_proceed(); |