diff options
author | Tor Andersson <tor@ccxvii.net> | 2024-11-29 13:37:47 +0100 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2024-11-29 13:37:47 +0100 |
commit | c27ac795e947346dc6b1ef71236102508280ce60 (patch) | |
tree | e27aeacca52ea6df5a4f54692b676b519605a49f /rules.js | |
parent | b3b4f4bf1ea639dc43b954ce4349b8e0ae7c7e50 (diff) | |
download | 1989-dawn-of-freedom-c27ac795e947346dc6b1ef71236102508280ce60.tar.gz |
remove period from inactive prompt strings
Diffstat (limited to 'rules.js')
-rw-r--r-- | rules.js | 113 |
1 files changed, 56 insertions, 57 deletions
@@ -510,7 +510,7 @@ exports.action = function (state, player, action, arg) { // ============= GAME STATES ======================= states.place_starting_infl = { - inactive: 'place starting SPs.', + inactive: 'place starting SPs', prompt() { if (game.temp === (game.starting_infl.length - 1) && game.available_ops === 0 ) { view.prompt = 'Place starting SPs: done. Start Turn 1.' @@ -548,7 +548,7 @@ states.place_starting_infl = { } states.choose_card = { - inactive: 'choose a card.', + inactive: 'choose a card', prompt() { if ( (game.active === DEM && game.democrat_hand.length === 0) || @@ -591,7 +591,7 @@ states.choose_card = { } states.confirm_card = { - inactive: 'choose a card.', + inactive: 'choose a card', prompt() { let scoring_cards_count = count_scoring_cards() view.prompt = `${pluralize(scoring_cards_count,'scoring card')} in hand with ${pluralize(8-game.round,'Action Round')} remaining. Scoring cards may not be held. Continue?` @@ -822,7 +822,7 @@ states.resolve_opponent_event = { } states.add_influence = { - inactive: 'add SPs.', + inactive: 'add SPs', prompt() { if (game.available_ops <= 0) { view.prompt = 'Place SPs: done.' @@ -854,7 +854,7 @@ states.add_influence = { } states.tiananmen_square_attempt = { - inactive: 'do Tiananmen Square Attempt.', + inactive: 'do Tiananmen Square Attempt', prompt() { view.prompt = 'Tiananmen Square Track attempt: Roll a die.' gen_action('roll') @@ -867,7 +867,7 @@ states.tiananmen_square_attempt = { } states.tiananmen_square_attempt_success = { - inactive: 'do Tiananmen Square Attempt.', + inactive: 'do Tiananmen Square Attempt', prompt() { if (game.vm_event > 200) { // TODO magic number view.prompt = 'Tiananmen Square Track attempt successful. Go to TST Award.' @@ -888,7 +888,7 @@ states.tiananmen_square_attempt_success = { } states.tiananmen_square_attempt_fail = { - inactive: 'do Tiananmen Square Attempt.', + inactive: 'do Tiananmen Square Attempt', prompt() { view.prompt = 'Tiananmen Square Track attempt failed.' gen_action('end_round') @@ -900,7 +900,7 @@ states.tiananmen_square_attempt_fail = { } states.tiananmen_square_attempt_done = { - inactive: 'do Tiananmen Square Attempt.', + inactive: 'do Tiananmen Square Attempt', prompt() { view.prompt = 'Tiananmen Square Track attempt: done.' gen_action('end_round') @@ -911,7 +911,7 @@ states.tiananmen_square_attempt_done = { } states.tst_goddess = { - inactive: 'choose whether to discard a card.', + inactive: 'choose whether to discard a card', prompt() { view.prompt = 'Tiananmen Square Track award: you may discard a non-Power Struggle Card and draw a replacement.' for (let card of game.valid_cards) { @@ -932,7 +932,7 @@ states.tst_goddess = { } states.tst_goddess_draw = { - inactive: 'choose whether to discard a card.', + inactive: 'choose whether to discard a card', prompt() { view.prompt = 'Draw a replacement card.' gen_action('draw') @@ -1021,7 +1021,7 @@ states.support_check_prep = { } states.do_support_check = { - inactive: 'do Support Checks.', + inactive: 'do Support Checks', prompt() { view.prompt = `Support Check: ${spaces[game.selected_space].name_unique}. Roll a die.` gen_action('roll') @@ -1043,7 +1043,7 @@ states.do_support_check = { } states.austria_hungary_border_reopened_check = { - inactive: 'decide Austria-Hungary Border Reopened.', + inactive: 'decide Austria-Hungary Border Reopened', prompt() { view.prompt = 'Austria-Hungary Border Reopened: will both Support Checks be in East Germany?' gen_action('yes') @@ -1059,7 +1059,7 @@ states.austria_hungary_border_reopened_check = { } states.end_round = { - inactive: 'finish playing a card.', + inactive: 'finish playing a card', prompt() { view.prompt = 'End the Action Round.' gen_action('end_round') @@ -1073,7 +1073,7 @@ states.end_round = { //======================= POWER STRUGGLE =============================== states.draw_power_cards = { - inactive: 'draw cards.', + inactive: 'draw cards', prompt() { view.prompt = `${card_name[this_card()]}: draw cards.` gen_action('draw') @@ -1211,7 +1211,7 @@ states.vm_the_crowd_turns_against_ceausescu = { } states.the_crowd_turns_against_ceausescu_infl = { - inactive: 'add SPs.', + inactive: 'add SPs', prompt() { if (game.vm_available_ops === 0) { view.prompt = 'Place SPs: done.' @@ -1238,7 +1238,7 @@ states.the_crowd_turns_against_ceausescu_infl = { } states.raise_stakes_1 = { - inactive: 'raise the stakes.', + inactive: 'raise the stakes', prompt() { if ( (game.active === DEM && game.dem_pwr_hand.length < 3) || @@ -1299,7 +1299,7 @@ states.raise_stakes_1 = { } states.raise_stakes_2 = { - inactive: 'raise the stakes.', + inactive: 'raise the stakes', prompt() { if ( (game.active === DEM && game.dem_pwr_hand.length < 3) || @@ -1348,7 +1348,7 @@ states.raise_stakes_2 = { } states.power_struggle = { - inactive: 'play a card.', + inactive: 'play a card', prompt() { if (game.phase === 0) { if (game.valid_cards.length > 0) { @@ -1529,7 +1529,7 @@ states.power_struggle = { } states.support_loss = { - inactive: 'do Support Loss.', + inactive: 'do Support Loss', prompt() { let ps_state = game.persistent_events.includes(MAGIC_NEW_YEARS_EVE_PARTY) ? "New Year's Eve Party" : "Power Struggle" if (game.phase === 0) { @@ -1573,7 +1573,7 @@ states.support_loss = { } states.vp_roll = { - inactive: 'do VP Roll.', + inactive: 'do VP Roll', prompt() { let ps_state = game.persistent_events.includes(MAGIC_NEW_YEARS_EVE_PARTY) ? "New Year's Eve Party" : "Power Struggle" if (game.phase === 0) { @@ -1626,7 +1626,7 @@ states.vp_roll = { } states.choose_power = { - inactive: 'choose whether to remain in power.', + inactive: 'choose whether to remain in power', prompt() { if (game.phase === 0) { view.prompt = 'Choose whether to remain in power.' @@ -1657,7 +1657,7 @@ states.choose_power = { } states.the_tyrant_is_gone = { - inactive: 'resolve The Tyrant is Gone.', + inactive: 'resolve The Tyrant is Gone', prompt() { view.prompt = 'Play The Tyrant is Gone for the event.' gen_action('event') @@ -1673,7 +1673,7 @@ states.the_tyrant_is_gone = { } states.finish_scoring = { - inactive: 'finish scoring.', + inactive: 'finish scoring', prompt() { view.prompt = 'End power struggle.' gen_action('done') @@ -1695,7 +1695,7 @@ states.finish_scoring = { // ======================================= END TURN STATES ========================================== states.end_turn_4_5_4 = { - inactive: 'verify held cards.', + inactive: 'verify held cards', prompt() { view.prompt = 'End Turn: verify held cards.' gen_action('check') @@ -1747,7 +1747,7 @@ states.end_turn_4_5_4 = { } states.final_scoring_held = { - inactive: 'resolve final scoring.', + inactive: 'resolve final scoring', prompt() { view.prompt = 'Final Scoring: Communist scores VP bonus for the number of countries they retain power.' gen_action('bonus') @@ -1771,7 +1771,7 @@ states.final_scoring_held = { } states.final_scoring = { - inactive: 'score countries.', + inactive: 'score countries', prompt() { if ( game.temp['East_Germany'] && @@ -1853,7 +1853,7 @@ states.game_over = { // ========================== EVENT SPECIFIC STATES ================================= states.general_strike = { - inactive: 'discard a card.', + inactive: 'discard a card', prompt() { if (game.played_card === 0) { view.prompt = 'General Strike: you must discard a card or play a Scoring Card.' @@ -1902,7 +1902,7 @@ states.general_strike = { } states.honecker = { - inactive: 'resolve Honecker.', + inactive: 'resolve Honecker', prompt() { view.prompt = 'Honecker: you may take an extra action round.' gen_action('extra') @@ -2007,7 +2007,7 @@ states.new_years_eve_party = { } states.stasi_end_round = { - inactive: 'choose next card due to Stasi.', + inactive: 'choose next card due to Stasi', prompt() { if (game.democrat_hand.length === 0) { view.prompt = 'Stasi: no cards remaining.' @@ -2039,7 +2039,7 @@ states.stasi_end_round = { } states.stasi_confirm_scoring_card = { - inactive: 'choose a card.', + inactive: 'choose a card', prompt() { view.prompt = `${pluralize(count_scoring_cards(),'scoring card')} in hand with ${pluralize(7-game.round,'Action Round')} remaining. Scoring cards may not be held. Continue?` gen_action('continue') @@ -2051,7 +2051,7 @@ states.stasi_confirm_scoring_card = { } states.stasi_finish = { - inactive: 'choose next card due to Stasi.', + inactive: 'choose next card due to Stasi', prompt() { view.prompt = 'Stasi. Choose card: done.' gen_action('done') @@ -2063,7 +2063,7 @@ states.stasi_finish = { } states.stasi_confirm = { - inactive: 'choose next card due to Stasi.', + inactive: 'choose next card due to Stasi', prompt() { view.prompt = `If Common European Home selected, it must be played for Operations. Otherwise select the opponent's card instead.` gen_action('done') @@ -2075,7 +2075,7 @@ states.stasi_confirm = { } states.stasi_play_card = { - inactive: 'play a card.', + inactive: 'play a card', prompt() { if (game.democrat_hand.length === 0) { view.prompt = 'Stasi: you must pass.' @@ -2114,7 +2114,7 @@ states.stasi_play_card = { } states.stasi_resolve_common_european_home = { - inactive: 'play a card.', + inactive: 'play a card', prompt() { view.prompt = `Stasi: play ${card_name[game.played_card]} with Common European Home?` gen_action('yes') @@ -5924,7 +5924,7 @@ states.vm_take_control = { } states.vm_add_infl = { - inactive: 'add Support Points.', + inactive: 'add Support Points', prompt() { if (game.vm_available_ops > 0 && game.valid_spaces.length === 0) { view.prompt = `${card_name[this_card()]}. No available spaces remaining. Add SPs: done.` @@ -6065,7 +6065,7 @@ states.vm_add_limited_infl = { } states.vm_remove_infl = { - inactive: 'remove Support Points.', + inactive: 'remove Support Points', prompt() { // Keep this so that there is an undo option in, e.g., Scare Tactics if (game.valid_spaces.length === 0 && game.vm_available_ops > 0) { @@ -6102,7 +6102,6 @@ states.vm_remove_infl = { done() { if (game.summary.length > 0) { pop_summary() - log_br() } else { log('No influence to remove') } @@ -6140,7 +6139,7 @@ states.vm_remove_x_infl = { } states.vm_remove_limited_infl = { - inactive: 'remove SP.', + inactive: 'remove SP', prompt() { if (game.vm_available_ops > 0 && game.valid_spaces.length > 0) { view.prompt = `${card_name[this_card()]}: remove ${pluralize(game.vm_available_ops,'SP')}${event_prompt()}, no more than ${game.vm_max_infl} per space.` @@ -6195,7 +6194,7 @@ states.vm_remove_all_infl = { } states.vm_support_check_prep = { - inactive: 'do Support Checks.', + inactive: 'do Support Checks', prompt() { if (game.valid_spaces.length === 0) { view.prompt = `${card_name[this_card()]}: no valid targets for Support Check.` @@ -6249,7 +6248,7 @@ states.vm_support_check_prep = { } states.vm_ceh_support_check_prep = { - inactive: 'do Support Checks.', + inactive: 'do Support Checks', prompt() { if (game.vm_available_ops > 0) { view.prompt = `Select a space. ${pluralize(game.vm_available_ops, 'Support Check')} remaining.` @@ -6281,7 +6280,7 @@ states.vm_ceh_support_check_prep = { } states.vm_ceh_do_support_check = { - inactive: 'do Support Checks.', + inactive: 'do Support Checks', prompt() { view.prompt = `Support Check: ${spaces[game.selected_space].name_unique}. Roll a die.` gen_action('roll') @@ -6317,7 +6316,7 @@ states.vm_austria_hungary_border_reopened_check = { } states.vm_1_support_check_prep = { - inactive: 'do Support Checks.', + inactive: 'do Support Checks', prompt() { if (game.valid_spaces.length === 0) { view.prompt = `${card_name[this_card()]}: no valid targets for Support Check.` @@ -6342,7 +6341,7 @@ states.vm_1_support_check_prep = { } states.vm_do_support_check = { - inactive: 'do Support Checks.', + inactive: 'do Support Checks', prompt() { view.prompt = `Support Check: ${spaces[game.selected_space].name_unique}. Roll a die.` gen_action('roll') @@ -6408,7 +6407,7 @@ states.vm_adamec = { } states.vm_brought_in_for_questioning = { - inactive: 'discard a card.', + inactive: 'discard a card', prompt() { if (game.democrat_hand.length === 0) { view.prompt = 'Brought in for Questioning. No cards to discard.' @@ -6641,7 +6640,7 @@ states.vm_play_event_from_discard = { } states.vm_deutsche_marks_prep = { - inactive: 'choose a card.', + inactive: 'choose a card', prompt() { if (game.valid_cards.length === 0) { view.prompt = 'Deutsche Marks: no cards to give.' @@ -6668,7 +6667,7 @@ states.vm_deutsche_marks_prep = { } states.vm_deutsche_marks_confirm = { - inactive: 'choose a card.', + inactive: 'choose a card', prompt() { view.prompt = `Deutsche Marks: gave ${cards[game.vm_event].name}.` gen_action('done') @@ -8056,7 +8055,7 @@ states.vm_workers_revolt_finish = { // ==================== TIANANMEN SQUARE TRACK STATES ===================== states.vm_tst_3_prep = { - inactive: 'resolve Tiananmen Square Track award.', + inactive: 'resolve Tiananmen Square Track award', prompt() { view.prompt = 'Tiananmen Square Track award: draw 3 cards.' gen_action('draw') @@ -8097,7 +8096,7 @@ states.vm_tst_3_prep = { } states.vm_tst_3 = { - inactive: 'resolve Tiananmen Square Track bonus.', + inactive: 'resolve Tiananmen Square Track bonus', prompt() { if (game.temp < 2) { view.prompt = `Discard 2 of the drawn cards.` @@ -8145,7 +8144,7 @@ states.vm_tst_4 = { } states.vm_tst_6 = { - inactive: 'make their free Support Check.', + inactive: 'make their free Support Check', prompt() { view.prompt = 'Tiananmen Square Track award: you have a free 2 Ops Support Check.' for (let space_id of game.valid_spaces) { @@ -8169,7 +8168,7 @@ states.vm_tst_6 = { } states.vm_tst_6_sc = { - inactive: 'do Support Check.', + inactive: 'do Support Check', prompt() { view.prompt = `Support Check: ${spaces[game.selected_space].name_unique}. Roll a die` gen_action('roll') @@ -8186,7 +8185,7 @@ states.vm_tst_6_sc = { } states.vm_tst_8 = { - inactive: 'use Tiananmen Square Track award.', + inactive: 'use Tiananmen Square Track award', prompt() { if (game.vm_event_to_do && game.vm_infl_to_do) { view.prompt = 'Choose whether to play for event or operations first.' @@ -8232,7 +8231,7 @@ states.vm_tst_8 = { } states.vm_tst_8_ops = { - inactive: 'play card for operations.', + inactive: 'play card for operations', prompt() { view.prompt = `Play ${card_name[game.played_card]} for:` gen_action('influence') @@ -8268,7 +8267,7 @@ states.vm_tst_8_ops = { // ========================= POWER STRUGGLE STATES ======================== states.vm_scare_tactics = { - inactive: 'remove a Support Point.', + inactive: 'remove a Support Point', prompt() { if (game.valid_spaces.length === 0 && game.vm_available_ops > 0) { view.prompt = `${card_name[this_card()]}: no SPs to remove.` @@ -8296,7 +8295,7 @@ states.vm_scare_tactics = { } states.vm_support_surges_1 = { - inactive: 'draw cards.', + inactive: 'draw cards', prompt() { view.prompt = 'Support Surges: draw a card.' gen_action('draw') @@ -8326,7 +8325,7 @@ states.vm_support_surges_1 = { } states.vm_support_surges_2 = { - inactive: 'draw cards.', + inactive: 'draw cards', prompt() { if (wildcards.includes(game.temp)) { view.prompt = `Support Surges: you drew ${power_cards[game.temp].name}. Draw a second card.` @@ -8366,7 +8365,7 @@ states.vm_support_surges_2 = { } states.vm_support_surges_3 = { - inactive: 'draw cards.', + inactive: 'draw cards', prompt() { if (wildcards.includes(game.temp)) { view.prompt = `Support Surges: you drew ${power_cards[game.temp].name}. Done.` @@ -8391,7 +8390,7 @@ states.vm_support_surges_3 = { } states.vm_support_falters = { - inactive: 'discard cards.', + inactive: 'discard cards', prompt() { if ( (game.active === DEM && game.dem_pwr_hand.length === 0) || |