diff options
Diffstat (limited to 'rules.ts')
-rw-r--r-- | rules.ts | 58 |
1 files changed, 40 insertions, 18 deletions
@@ -561,7 +561,8 @@ function game_view(state: Game, current: Player | 'Observer') { current !== game.active && !game.active.includes(current as Player) ) { - let inactive = states[game.state].inactive || game.state; + let src = get_active_node_args()?.src; + let inactive = src ? get_source_inactive(src) : states[game.state].inactive || game.state; view.prompt = Array.isArray(game.active) ? `Waiting for ${game.active.join(' and ')} to ${inactive}.` : `Waiting for ${game.active} to ${inactive}.`; @@ -774,7 +775,7 @@ const track_icon_to_track_id_map = { }; states.activate_icon = { - inactive: 'activate an icon', + inactive: 'activate a Morale Bonus icon', prompt() { gen_spend_hero_points(); const c = cards[game.played_card] as PlayerCard; @@ -1104,7 +1105,7 @@ states.change_active_player = { }; states.choose_area_ap = { - inactive: 'choose area to use Action Points', + inactive: 'use action points', prompt() { gen_spend_hero_points(); const use_morale_bonus = game.can_use_mb === 1 && game.bonuses[MORALE_BONUS] === ON; @@ -1213,7 +1214,7 @@ states.choose_area_ap = { }; states.change_bonus = { - inactive: 'select Bonus', + inactive: 'toggle Bonus', prompt() { gen_spend_hero_points(); const args = get_active_node_args(); @@ -1255,7 +1256,7 @@ states.change_bonus = { // Used for effects that allow play of an extra card states.play_card = { - inactive: 'play a card', + inactive: 'play another card', prompt() { gen_spend_hero_points(); @@ -1302,7 +1303,7 @@ states.play_card = { // Multiactive choose card state states.choose_card = { - inactive: 'choose a card', + inactive: 'play a card for this turn', prompt(player: Player) { gen_spend_hero_points(); view.prompt = 'Play a card for this turn.'; @@ -1352,7 +1353,7 @@ states.choose_card = { }; states.choose_final_bid = { - inactive: 'choose Final Bid', + inactive: 'add a card to the Final Bid', prompt() { view.prompt = 'Add a card to the Final Bid.'; const faction = get_active_faction(); @@ -1401,7 +1402,7 @@ function setup_momentum() { } states.choose_medallion = { - inactive: 'claim a medallion', + inactive: 'claim a Medallion', prompt() { gen_spend_hero_points(); view.prompt = 'Claim a Medallion.'; @@ -1457,7 +1458,7 @@ states.choose_medallion = { }; states.confirm_turn = { - inactive: 'confirm their turn', + inactive: 'confirm their move', prompt() { view.prompt = 'You will not be able to undo this action.'; gen_action('confirm'); @@ -1468,7 +1469,7 @@ states.confirm_turn = { }; states.confirm_fascist_turn = { - inactive: 'confirm fascist turn', + inactive: 'end the Fascist turn', prompt() { view.prompt = "Done."; gen_action('confirm'); @@ -1479,7 +1480,7 @@ states.confirm_fascist_turn = { }; states.draw_card = { - inactive: 'draw a card', + inactive: 'draw cards', auto_resolve() { const { src, v } = get_active_node_args(); if (src !== 'fascist_test') { @@ -1627,7 +1628,7 @@ states.end_of_year_discard = { }; states.hero_points = { - inactive: 'gain Hero points', + inactive: 'gain or lose Hero points', auto_resolve() { const { src, v } = get_active_node_args(); if (src !== 'fascist_test') { @@ -1698,7 +1699,7 @@ function resolve_player_with_most_hero_points(faction: FactionId) { } states.select_player_with_most_hero_points = { - inactive: 'choose a Player', + inactive: 'choose who will gain or lose Hero points', prompt() { gen_spend_hero_points(); const { v } = get_active_node_args(); @@ -1850,7 +1851,7 @@ function can_move_track_down(track_id): boolean { // NOTE: we can probably remove this state. I don't think it's used anywhere anymore states.move_track_up_or_down = { - inactive: 'move a track', + inactive: 'move a Track', auto_resolve() { const { track_id, strength } = get_active_node_args(); const can_move_up = can_move_track_up(track_id); @@ -1956,7 +1957,7 @@ function set_player_turn_prompt({ } states.player_turn = { - inactive: 'play their turn', + inactive: 'use their played card', prompt() { gen_spend_hero_points(); const faction_id = get_active_faction(); @@ -2349,7 +2350,7 @@ states.spend_hero_points = { Use the length of selected_cards[faction] to figure out where we are. */ states.swap_card_tableau_hand = { - inactive: 'swap cards', + inactive: 'swap cards in their tableau and hand', prompt() { gen_spend_hero_points(); view.prompt = 'Swap a card in your tableau with a card in your hand.'; @@ -2470,7 +2471,7 @@ function trash_card(faction: FactionId) { } states.use_organization_medallion = { - inactive: 'use Organization Medallion', + inactive: 'choose to use Organization Medallion', prompt() { gen_spend_hero_points(); view.prompt = 'Use Organization Medallion?'; @@ -2509,7 +2510,7 @@ states.use_organization_medallion = { }; states.use_strategy_medallion = { - inactive: 'use Strategy Medallion', + inactive: 'choose to use Strategy Medallion', prompt() { gen_spend_hero_points(); view.prompt = 'Use Strategy Medallion?'; @@ -3730,6 +3731,27 @@ function get_source_name(source: EffectSource): string { return source; } +function get_source_inactive(source: EffectSource): string { + switch (source) { + case 'player_event': + return 'execute ' + cards[game.played_card].title; + case 'fascist_event': + return 'execute ' + cards[game.current_events[game.current_events.length - 1]].title; + case 'fascist_test': + return 'resolve Test'; + case 'tr0': return 'trigger ' + tracks[0].name + ' icon'; + case 'tr1': return 'trigger ' + tracks[1].name + ' icon'; + case 'tr2': return 'trigger ' + tracks[2].name + ' icon'; + case 'tr3': return 'trigger ' + tracks[3].name + ' icon'; + case 'tr4': return 'trigger ' + tracks[4].name + ' icon'; + case 'track_icon': + throw "UNUSED" + case MOMENTUM: + return 'use Momentum'; + } + return source; +} + function get_factions_with_most_hero_poins(): FactionId[] { let most_hero_points = null; let faction_ids = []; |