diff options
Diffstat (limited to 'rules.ts')
-rw-r--r-- | rules.ts | 69 |
1 files changed, 44 insertions, 25 deletions
@@ -961,6 +961,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(); }, @@ -1532,7 +1534,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') { @@ -1551,17 +1553,17 @@ 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'); } }, @@ -1609,8 +1611,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]); @@ -1833,7 +1835,7 @@ states.peek_fascist_cards = { function resolve_spend_hp() { // insert spend hero points node before current node // so it will return to current node after resolving - log("Hero Points:") + log("Hero points:") insert_before_active_node( create_state_node('spend_hero_points', get_active_faction()) ); @@ -2043,7 +2045,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'); } }, @@ -2108,7 +2110,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'); } }, @@ -2144,7 +2146,7 @@ states.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(); @@ -2334,14 +2336,14 @@ function resolve_take_hero_points(faction: FactionId) { } 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) { @@ -2353,7 +2355,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'); } }, @@ -2603,10 +2605,17 @@ function add_glory( ) { 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() { @@ -2684,7 +2693,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(); @@ -2853,7 +2862,7 @@ function resolve_fascist_test() { 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( @@ -2877,7 +2886,7 @@ function resolve_fascist_test() { insert_after_active_node(create_seq_node(hero_point_actions)); } } else { - log(front_names[front] + ' failed:'); + log(front_names[front] + ' Test failed:'); } const effect = test_passed ? test.pass : test.fail; @@ -3021,7 +3030,12 @@ function move_track_to(track_id: number, new_value: number) { 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}`); + //logi(`${get_track_name(track_id)} -> to ${new_value}`); + else if (change < 0) + logi(`${get_track_name(track_id)} ${change} to ${new_value}`); + //logi(`${get_track_name(track_id)} <- to ${new_value}`); check_initiative(); @@ -3116,7 +3130,12 @@ function update_front( } 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 && @@ -3446,7 +3465,7 @@ function log_header(msg: string, prefix: string) { 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(); } |