From 29b96a710694f4596ad594f5c4f2ce380da6720b Mon Sep 17 00:00:00 2001
From: Tor Andersson <tor@ccxvii.net>
Date: Fri, 28 Mar 2025 12:41:01 +0100
Subject: Add final punctuation to remaining prompts.

---
 rules.js | 38 ++++++++++++++++++--------------------
 rules.ts | 34 +++++++++++++++++-----------------
 2 files changed, 35 insertions(+), 37 deletions(-)

diff --git a/rules.js b/rules.js
index e44b8e0..d7e89c6 100644
--- a/rules.js
+++ b/rules.js
@@ -736,7 +736,7 @@ states.add_to_front = {
         const args = get_active_node_args();
         const possible_fronts = get_fronts_to_add_to(args.t);
         if (possible_fronts.length === 0) {
-            view.prompt = 'No valid front to add strength to.';
+            view.prompt = 'No possible Front to Support.';
             gen_action('skip');
         }
         else if (possible_fronts.length === 4) {
@@ -769,7 +769,7 @@ states.attack_front = {
         const possible_fronts = get_fronts_to_add_to(target, n);
         const number_of_fronts = possible_fronts.length;
         if (number_of_fronts === 0) {
-            view.prompt = 'No valid front to attack.';
+            view.prompt = 'No possible Front to Attack.';
             gen_action('skip');
         }
         else if (possible_fronts.length === 4) {
@@ -795,7 +795,7 @@ states.attack_front = {
 states.break_tie_final_bid = {
     inactive: 'break tie for Final Bid',
     prompt() {
-        view.prompt = 'Choose the winner of the Final Bid';
+        view.prompt = 'Choose the winner of the Final Bid.';
         const { winners } = get_active_node_args();
         for (const f of winners) {
             gen_action(faction_player_map[f]);
@@ -817,7 +817,7 @@ states.break_tie_final_bid = {
 states.break_tie_winner = {
     inactive: 'break tie for winner of the game',
     prompt() {
-        view.prompt = 'Choose the winner of the game';
+        view.prompt = 'Choose the winner of the game.';
         const { winners } = get_active_node_args();
         for (const f of winners) {
             gen_action(faction_player_map[f]);
@@ -989,7 +989,7 @@ states.play_card = {
     inactive: 'play a card',
     prompt() {
         gen_spend_hero_points();
-        view.prompt = 'Play a card.';
+        view.prompt = 'Play another card.';
         const faction = get_active_faction();
         const hand = game.hands[faction];
         for (let c of hand) {
@@ -1027,7 +1027,7 @@ states.choose_card = {
     inactive: 'choose a card',
     prompt(player) {
         gen_spend_hero_points();
-        view.prompt = 'Choose a card to play this turn.';
+        view.prompt = 'Play a card for this turn.';
         const faction = player_faction_map[player];
         if (game.selected_cards[faction].length === 0) {
             view.actions.undo = 0;
@@ -1217,11 +1217,6 @@ function draw_glory_from_bag() {
     const index = random(game.bag_of_glory.length);
     const faction = game.bag_of_glory[index];
     game.glory.push(faction);
-    game.glory_current_year = game.glory_current_year = [
-        false,
-        false,
-        false,
-    ];
     game.glory_current_year[faction] = true;
     array_remove(game.bag_of_glory, index);
     logi(`Pulled T${faction} from the Bag`);
@@ -1261,13 +1256,16 @@ states.end_of_year_discard = {
                 gen_action_card(c);
         }
         if (needs_to_discard_from_hand && needs_to_discard_from_tableau) {
-            view.prompt = 'Discard a card from your hand or tableau';
+            view.prompt = 'Discard a card from your hand or tableau.';
+        }
+        else if (needs_to_discard_from_hand) {
+            view.prompt = 'Discard a card from your hand.';
         }
-        else if (needs_to_discard_from_hand || needs_to_discard_from_tableau) {
-            view.prompt = `Discard a card from your ${needs_to_discard_from_hand ? 'hand' : 'tableau'}`;
+        else if (needs_to_discard_from_tableau) {
+            view.prompt = 'Discard a card from your tableau.';
         }
         else {
-            view.prompt = 'Confirm discard';
+            view.prompt = 'Confirm discard.';
             view.actions.confirm = 1;
         }
         if (discarded[faction_id].h.length > 0 || discarded[faction_id].t.length > 0) {
@@ -1341,14 +1339,14 @@ states.hero_points = {
         if (value < 0) {
             view.prompt =
                 value < -1
-                    ? `Lose ${Math.abs(value)} Hero points`
-                    : 'Lose 1 Hero point';
+                    ? `Lose ${Math.abs(value)} Hero points.`
+                    : 'Lose a Hero point.';
             gen_action('lose_hp');
             return;
         }
         if (game.hero_points[POOL_ID] > 0) {
             view.prompt =
-                value > 1 ? `Gain ${value} Hero points.` : 'Gain 1 Hero point.';
+                value > 1 ? `Gain ${value} Hero points.` : 'Gain a Hero point.';
             gen_action('gain_hp');
         }
         else {
@@ -1703,7 +1701,7 @@ states.remove_blank_marker = {
     inactive: 'remove a Blank marker',
     prompt() {
         gen_spend_hero_points();
-        view.prompt = 'Remove a Blank marker';
+        view.prompt = 'Remove a Blank marker.';
         for (const b of game.triggered_track_effects) {
             gen_action_blank_marker(b);
         }
@@ -1751,7 +1749,7 @@ states.remove_attack_from_fronts = {
             gen_action_front(id);
         });
         if (!is_front_with_attacks) {
-            view.prompt = 'No valid Front to remove attacks from.';
+            view.prompt = 'No Front to remove attacks from.';
             gen_action('skip');
         }
     },
diff --git a/rules.ts b/rules.ts
index 380b476..55f9653 100644
--- a/rules.ts
+++ b/rules.ts
@@ -981,7 +981,7 @@ states.add_to_front = {
     const args = get_active_node_args();
     const possible_fronts = get_fronts_to_add_to(args.t);
     if (possible_fronts.length === 0) {
-      view.prompt = 'No valid front to add strength to.'
+      view.prompt = 'No possible Front to Support.'
       gen_action('skip');
     } else if (possible_fronts.length === 4) {
       view.prompt = `Support any Front.`;
@@ -1016,7 +1016,7 @@ states.attack_front = {
     const number_of_fronts = possible_fronts.length;
 
     if (number_of_fronts === 0) {
-      view.prompt = 'No valid front to attack.';
+      view.prompt = 'No possible Front to Attack.';
       gen_action('skip');
     } else if (possible_fronts.length === 4) {
       view.prompt = `Attack any Front.`;
@@ -1042,7 +1042,7 @@ states.attack_front = {
 states.break_tie_final_bid = {
   inactive: 'break tie for Final Bid',
   prompt() {
-    view.prompt = 'Choose the winner of the Final Bid';
+    view.prompt = 'Choose the winner of the Final Bid.';
     const { winners } = get_active_node_args();
     for (const f of winners) {
       gen_action(faction_player_map[f]);
@@ -1065,7 +1065,7 @@ states.break_tie_final_bid = {
 states.break_tie_winner = {
   inactive: 'break tie for winner of the game',
   prompt() {
-    view.prompt = 'Choose the winner of the game';
+    view.prompt = 'Choose the winner of the game.';
     const { winners } = get_active_node_args();
     for (const f of winners) {
       gen_action(faction_player_map[f]);
@@ -1259,7 +1259,7 @@ states.play_card = {
   prompt() {
     gen_spend_hero_points();
 
-    view.prompt = 'Play a card.';
+    view.prompt = 'Play another card.';
 
     const faction = get_active_faction();
 
@@ -1305,7 +1305,7 @@ states.choose_card = {
   inactive: 'choose a card',
   prompt(player: Player) {
     gen_spend_hero_points();
-    view.prompt = 'Choose a card to play this turn.';
+    view.prompt = 'Play a card for this turn.';
 
     const faction = player_faction_map[player];
 
@@ -1561,13 +1561,13 @@ states.end_of_year_discard = {
     }
 
     if (needs_to_discard_from_hand && needs_to_discard_from_tableau) {
-      view.prompt = 'Discard a card from your hand or tableau';
-    } else if (needs_to_discard_from_hand || needs_to_discard_from_tableau) {
-      view.prompt = `Discard a card from your ${
-        needs_to_discard_from_hand ? 'hand' : 'tableau'
-      }`;
+      view.prompt = 'Discard a card from your hand or tableau.';
+    } else if (needs_to_discard_from_hand) {
+      view.prompt = 'Discard a card from your hand.';
+    } else if (needs_to_discard_from_tableau) {
+      view.prompt = 'Discard a card from your tableau.';
     } else {
-      view.prompt = 'Confirm discard';
+      view.prompt = 'Confirm discard.';
       view.actions.confirm = 1;
     }
     if (discarded[faction_id].h.length > 0 || discarded[faction_id].t.length > 0) {
@@ -1646,14 +1646,14 @@ states.hero_points = {
     if (value < 0) {
       view.prompt =
         value < -1
-          ? `Lose ${Math.abs(value)} Hero points`
-          : 'Lose 1 Hero point';
+          ? `Lose ${Math.abs(value)} Hero points.`
+          : 'Lose a Hero point.';
       gen_action('lose_hp');
       return;
     }
     if (game.hero_points[POOL_ID] > 0) {
       view.prompt =
-        value > 1 ? `Gain ${value} Hero points.` : 'Gain 1 Hero point.';
+        value > 1 ? `Gain ${value} Hero points.` : 'Gain a Hero point.';
       gen_action('gain_hp');
     } else {
       view.prompt = 'No Hero points available in pool.';
@@ -2068,7 +2068,7 @@ states.remove_blank_marker = {
   inactive: 'remove a Blank marker',
   prompt() {
     gen_spend_hero_points();
-    view.prompt = 'Remove a Blank marker';
+    view.prompt = 'Remove a Blank marker.';
 
     for (const b of game.triggered_track_effects) {
       gen_action_blank_marker(b);
@@ -2128,7 +2128,7 @@ states.remove_attack_from_fronts = {
       gen_action_front(id);
     });
     if (!is_front_with_attacks) {
-      view.prompt = 'No valid Front to remove attacks from.';
+      view.prompt = 'No Front to remove attacks from.';
       gen_action('skip');
     }
   },
-- 
cgit v1.2.3