summaryrefslogtreecommitdiff
path: root/rules.ts
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2025-03-23 12:00:33 +0100
committerTor Andersson <tor@ccxvii.net>2025-03-23 12:10:59 +0100
commitf4009f4b7ce0ba26ad4ff224b4f285fb43e166a0 (patch)
tree79012f693b77b502efc06ecd803d2cd5afb145c5 /rules.ts
parent0e394f0b4f84c8b9d8a2bcef2b9015291761b035 (diff)
downloadland-and-freedom-f4009f4b7ce0ba26ad4ff224b4f285fb43e166a0.tar.gz
The all seeing eye sees your trash and discard piles.
Diffstat (limited to 'rules.ts')
-rw-r--r--rules.ts10
1 files changed, 6 insertions, 4 deletions
diff --git a/rules.ts b/rules.ts
index 672da09..3945b71 100644
--- a/rules.ts
+++ b/rules.ts
@@ -528,9 +528,6 @@ function game_view(state: Game, current: Player | 'Observer') {
first_player: game.first_player,
fronts: game.fronts,
glory: game.glory,
- hand: faction === null ? [] : game.hands[faction],
- // discard: faction === null ? [] : game.discard[faction],
- // trash: faction === null ? [] : game.trash[faction],
// deck: faction === null ? [] : list_deck(faction),
hero_points: game.hero_points,
initiative: game.initiative,
@@ -549,6 +546,12 @@ function game_view(state: Game, current: Player | 'Observer') {
fascist: game.fascist,
};
+ if (faction !== null) {
+ view.hand = game.hands[faction];
+ view.discard = game.discard[faction];
+ view.trash = game.trash[faction];
+ }
+
if (!game.hidden_bag)
view.bag_of_glory = game.bag_of_glory;
@@ -2171,7 +2174,6 @@ states.return_card = {
const faction = get_active_faction();
gen_spend_hero_points();
view.prompt = 'Return a card to your hand.';
- view.trash = game.trash[faction];
let possible = false;
for (let c of game.trash[faction]) {
if (c !== game.played_card) {