diff options
Diffstat (limited to 'rules.js')
-rw-r--r-- | rules.js | 66 |
1 files changed, 41 insertions, 25 deletions
@@ -733,6 +733,8 @@ states.add_glory = { if (game.turn === 4) { number++; } + log_br(); + log("Bag of Glory:"); add_glory(get_active_faction(), number); resolve_active_and_proceed(); }, @@ -1231,7 +1233,7 @@ states.end_of_year_discard = { }, }; states.hero_points = { - inactive: 'gain Hero Points', + inactive: 'gain Hero points', auto_resolve() { const { src, v } = get_active_node_args(); if (src !== 'fascist_test') { @@ -1251,18 +1253,18 @@ 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 1 Hero point'; gen_action('lose_hp'); return; } if (game.hero_points.pool > 0) { view.prompt = - value > 1 ? `Fascist Test: Gain ${value} Hero Points.` : 'Fascist Test: Gain 1 Hero Point.'; + value > 1 ? `Fascist Test: Gain ${value} Hero points.` : 'Fascist Test: Gain 1 Hero point.'; gen_action('gain_hp'); } else { - view.prompt = 'Fascist Test: No Hero Points available in pool.'; + view.prompt = 'Fascist Test: No Hero points available in pool.'; gen_action('skip'); } }, @@ -1308,8 +1310,8 @@ states.select_player_with_most_hero_points = { const { v } = get_active_node_args(); view.prompt = v < 0 - ? 'Choose player to lose Hero Points.' - : 'Choose player to gain Hero Points.'; + ? 'Choose player to lose Hero points.' + : 'Choose player to gain Hero points.'; const factions = get_factions_with_most_hero_poins(); for (let faction_id of factions) { gen_action(faction_player_map[faction_id]); @@ -1501,7 +1503,7 @@ states.peek_fascist_cards = { }, }; function resolve_spend_hp() { - log("Hero Points:"); + log("Hero points:"); insert_before_active_node(create_state_node('spend_hero_points', get_active_faction())); next(); } @@ -1669,7 +1671,7 @@ states.remove_attack_from_fronts = { gen_action_front(id); }); if (!is_front_with_attacks) { - view.prompt = 'No valid Front to choose. You must skip'; + view.prompt = 'No valid Front to remove attacks from.'; gen_action('skip'); } }, @@ -1724,7 +1726,7 @@ states.return_card = { } } if (!possible) { - view.prompt = 'No card in trash to return. You must skip'; + view.prompt = 'No card in trash to return to your hand.'; gen_action('skip'); } }, @@ -1756,7 +1758,7 @@ states.spend_hero_points = { inactive: 'spend Hero points', prompt() { const hero_points = game.hero_points[get_active_faction()]; - view.prompt = `Spend up to ${hero_points} Hero Points.`; + view.prompt = `Spend up to ${hero_points} Hero points.`; const faction = get_active_faction(); if (hero_points === 0) { return; @@ -1908,14 +1910,14 @@ function resolve_take_hero_points(faction) { resolve_active_and_proceed(); } states.take_hero_points = { - inactive: 'take Hero Points', + inactive: 'take Hero points', prompt() { gen_spend_hero_points(); const { v } = get_active_node_args(); view.prompt = v === 1 - ? 'Take a Hero Point from any player.' - : `Take ${v} Hero Points from any player.`; + ? 'Take a Hero point from any player.' + : `Take ${v} Hero points from any player.`; const active_faction = get_active_faction(); let target_exists = false; for (const faction of role_ids) { @@ -1926,7 +1928,7 @@ states.take_hero_points = { } if (!target_exists) { view.prompt = - 'Not possible to take Hero Points from another player. You must skip'; + 'No Hero points to take from another player.'; gen_action('skip'); } }, @@ -2103,10 +2105,18 @@ function setup_return_card_from_trash() { function add_glory(faction, amount) { for (let i = 0; i < amount; ++i) game.bag_of_glory.push(faction); - if (amount > 1) - logi(`Added ${amount} T${faction} to the Bag`); - else - logi(`Added T${faction} to the Bag`); + if (game.hidden_bag) { + if (amount > 1) + logi(`Added ${amount} tokens to the Bag`); + else + logi(`Added token to the Bag`); + } + else { + if (amount > 1) + logi(`Added ${amount} T${faction} to the Bag`); + else + logi(`Added T${faction} to the Bag`); + } } function check_initiative() { let initiative; @@ -2181,7 +2191,7 @@ function end_of_turn() { } } function end_of_year() { - log_header('End of Year', 't'); + log_header('End of the Year', 't'); if (game.year === 3) { const is_won = war_is_won(); if (is_won) { @@ -2299,7 +2309,7 @@ function resolve_fascist_test() { const hero_point_actions = []; log_header("C" + get_current_event_id(), 'f'); if (test_passed) { - log(front_names[front] + ' passed:'); + log(front_names[front] + ' Test successful:'); for (const faction of get_player_order()) { let hero_points_gain = game.fronts[front].contributions.includes(faction) ? 2 @@ -2317,7 +2327,7 @@ function resolve_fascist_test() { } } else { - log(front_names[front] + ' failed:'); + log(front_names[front] + ' Test failed:'); } const effect = test_passed ? test.pass : test.fail; const node = resolve_effect(effect, 'fascist_test'); @@ -2441,7 +2451,10 @@ function move_track_to(track_id, new_value) { const current_value = game.tracks[track_id]; let change = new_value - current_value; game.tracks[track_id] = new_value; - logi(`${get_track_name(track_id)} to ${new_value}`); + if (change > 0) + logi(`${get_track_name(track_id)} +${change} to ${new_value}`); + else if (change < 0) + logi(`${get_track_name(track_id)} ${change} to ${new_value}`); check_initiative(); const triggered_spaces = change > 0 ? make_list(current_value + 1, new_value).reverse() @@ -2505,7 +2518,10 @@ function update_front(front_id, change, faction_id = null) { } const value_before = game.fronts[front_id].value; game.fronts[front_id].value += change; - logi(`${front_names[front_id]} ${change > 0 ? '+' : ''}${change}`); + if (change > 0) + logi(`${front_names[front_id]} +${change}`); + else if (change < 0) + logi(`${front_names[front_id]} ${change}`); if (faction_id !== null && value_before <= 0 && game.fronts[front_id].value > 0) { @@ -2745,7 +2761,7 @@ function log_header(msg, prefix) { } function log_trigger(args) { let [track_id, space_id] = args; - log(`Trigger ${get_track_name(track_id)} #${space_id}:`); + log(`Trigger ${get_track_name(track_id)} ${space_id}:`); resolve_active_and_proceed(); } function logi(msg) { |