summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--rules.js198
1 files changed, 100 insertions, 98 deletions
diff --git a/rules.js b/rules.js
index de2744f..17d1635 100644
--- a/rules.js
+++ b/rules.js
@@ -227,6 +227,8 @@ const switch_events = [6, 20, 71]
const one_turn_events = [ 8, 13, 25, 50, 63, 74, 49, 58, 59, 100, 101 ]
const ceausecu_events = [10, 41, 69, 101, 107]
+const card_name = cards.map(x => x ? clean_name(x.name) : "")
+
const PC_SUPPORT_FALTERS = 49
const PC_SUPPORT_SURGES = 50
const PC_SCARE_TACTICS = 51
@@ -602,10 +604,10 @@ states.confirm_card = {
states.play_card = {
get inactive() {
- return `play ${clean_name(cards[game.played_card].name)}.`
+ return `play ${card_name[game.played_card]}.`
},
prompt() {
- view.prompt = `Play ${clean_name(cards[game.played_card].name)} for:`
+ view.prompt = `Play ${card_name[game.played_card]} for:`
if (scoring_cards.includes(game.played_card)) {
gen_action('event')
@@ -747,7 +749,7 @@ states.play_card = {
states.resolve_opponent_event = {
get inactive() {
- return `resolve ${clean_name(cards[game.played_card].name)}.`
+ return `resolve ${card_name[game.played_card]}.`
},
prompt() {
if (game.vm_infl_to_do) {
@@ -762,7 +764,7 @@ states.resolve_opponent_event = {
) {
gen_action('tst_7')
}
- view.prompt = `${clean_name(cards[game.played_card].name)}: you must resolve the opponent event.`
+ view.prompt = `${card_name[game.played_card]}: you must resolve the opponent event.`
gen_action('opp_event')
} else {
view.prompt = 'Event resolved. End the action round.'
@@ -1073,7 +1075,7 @@ states.end_round = {
states.draw_power_cards = {
inactive: 'draw cards.',
prompt() {
- view.prompt = `${clean_name(cards[this_card()].name)}: draw cards.`
+ view.prompt = `${card_name[this_card()]}: draw cards.`
gen_action('draw')
},
draw() {
@@ -1165,7 +1167,7 @@ states.draw_power_cards = {
states.the_crowd_turns_against_ceausescu_prep = {
get inactive() {
- return `resolve ${clean_name(cards[C_THE_CROWD_TURNS_AGAINST_CEAUSESCU].name)}.`
+ return `resolve ${card_name[C_THE_CROWD_TURNS_AGAINST_CEAUSESCU]}.`
},
prompt() {
view.prompt = 'The Crowd Turns Against Ceausescu: draw cards.'
@@ -1184,7 +1186,7 @@ states.the_crowd_turns_against_ceausescu_prep = {
states.vm_the_crowd_turns_against_ceausescu = {
get inactive() {
- return `resolve ${clean_name(cards[C_THE_CROWD_TURNS_AGAINST_CEAUSESCU].name)}.`
+ return `resolve ${card_name[C_THE_CROWD_TURNS_AGAINST_CEAUSESCU]}.`
},
prompt() {
view.prompt = `You have ${game.vm_available_ops} operations points. Play for:`
@@ -1929,7 +1931,7 @@ states.honecker = {
states.new_years_eve_party = {
get inactive() {
- return `resolve ${clean_name(cards[104].name)}.`
+ return `resolve ${card_name[104]}.`
},
prompt() {
if (!game.is_pwr_struggle) {
@@ -2079,7 +2081,7 @@ states.stasi_play_card = {
view.prompt = 'Stasi: you must pass.'
gen_action('pass')
} else {
- view.prompt = `Stasi: you must play ${clean_name(cards[game.stasi_card].name)}.`
+ view.prompt = `Stasi: you must play ${card_name[game.stasi_card]}.`
gen_action_card(game.stasi_card)
}
},
@@ -2114,7 +2116,7 @@ states.stasi_play_card = {
states.stasi_resolve_common_european_home = {
inactive: 'play a card.',
prompt() {
- view.prompt = `Stasi: play ${clean_name(cards[game.played_card].name)} with Common European Home?`
+ view.prompt = `Stasi: play ${card_name[game.played_card]} with Common European Home?`
gen_action('yes')
gen_action('no')
},
@@ -2979,7 +2981,7 @@ function get_value(country) {
}
function get_end_infl_prompt() {
- view.prompt = `${clean_name(cards[this_card()].name)}. Add SPs: done.`
+ view.prompt = `${card_name[this_card()]}. Add SPs: done.`
if (!game.vm_infl_to_do) {
gen_action('end_round')
} else {
@@ -5859,10 +5861,10 @@ function vm_kremlin_coup_elite() {
states.vm_end_event = {
get inactive() {
- return `resolve ${clean_name(cards[this_card()].name)}.`
+ return `resolve ${card_name[this_card()]}.`
},
prompt() {
- view.prompt = `${clean_name(cards[this_card()].name)}: done.`
+ view.prompt = `${card_name[this_card()]}: done.`
if (game.vm_infl_to_do || game.return_state === 'vm_tst_8') {
gen_action('done')
} else {
@@ -5882,19 +5884,19 @@ states.vm_end_event = {
states.vm_take_control = {
get inactive() {
- return `resolve ${clean_name(cards[game.played_card].name)}.`
+ return `resolve ${card_name[game.played_card]}.`
},
prompt() {
if (game.vm_available_ops > 0 && game.valid_spaces.length === 0) {
- view.prompt = `${clean_name(cards[this_card()].name)}: all spaces controlled. Continue.`
+ view.prompt = `${card_name[this_card()]}: all spaces controlled. Continue.`
gen_action('done')
} else if (game.vm_available_ops > 0) {
- view.prompt = `${clean_name(cards[this_card()].name)}: take control of ${event_prompt()}.`
+ view.prompt = `${card_name[this_card()]}: take control of ${event_prompt()}.`
for (let space_id of game.valid_spaces) {
gen_action_space(space_id)
}
} else {
- view.prompt = `${clean_name(cards[this_card()].name)}. Take control: done.`
+ view.prompt = `${card_name[this_card()]}. Take control: done.`
if (game.vm_infl_to_do) {
gen_action('done')
} else {
@@ -5925,10 +5927,10 @@ states.vm_add_infl = {
inactive: 'add Support Points.',
prompt() {
if (game.vm_available_ops > 0 && game.valid_spaces.length === 0) {
- view.prompt = `${clean_name(cards[this_card()].name)}. No available spaces remaining. Add SPs: done.`
+ view.prompt = `${card_name[this_card()]}. No available spaces remaining. Add SPs: done.`
gen_action('done')
} else if (game.vm_available_ops > 0) {
- view.prompt = `${clean_name(cards[this_card()].name)}: add ${pluralize(game.vm_available_ops,'SP')}${event_prompt()}.`
+ view.prompt = `${card_name[this_card()]}: add ${pluralize(game.vm_available_ops,'SP')}${event_prompt()}.`
for (let space_id of game.valid_spaces) {
gen_action_space(space_id)
@@ -5962,14 +5964,14 @@ states.vm_add_infl = {
states.vm_add_infl_free = {
get inactive() {
- return `resolve ${clean_name(cards[this_card()].name)}: add SPs.`
+ return `resolve ${card_name[this_card()]}: add SPs.`
},
prompt() {
if (game.vm_available_ops > 0 && game.valid_spaces.length === 0) {
- view.prompt = `${clean_name(cards[this_card()].name)}. No available spaces remaining. Add SPs: done.`
+ view.prompt = `${card_name[this_card()]}. No available spaces remaining. Add SPs: done.`
gen_action('done')
} else if (game.vm_available_ops > 0) {
- view.prompt = `${clean_name(cards[this_card()].name)}: add ${game.vm_available_ops} SPs to ${event_prompt()}.`
+ view.prompt = `${card_name[this_card()]}: add ${game.vm_available_ops} SPs to ${event_prompt()}.`
for (let space_id of game.valid_spaces) {
gen_action_space(space_id)
@@ -6005,14 +6007,14 @@ states.vm_add_infl_free = {
states.vm_add_x_infl = {
get inactive() {
- return `resolve ${clean_name(cards[this_card()].name)}: add Support Points.`
+ return `resolve ${card_name[this_card()]}: add Support Points.`
},
prompt() {
if (game.vm_event === 101 && game.valid_spaces.length === 0) {
- view.prompt = `${clean_name(cards[this_card()].name)}: the Romanian Elite space no longer exists.`
+ view.prompt = `${card_name[this_card()]}: the Romanian Elite space no longer exists.`
gen_action('done')
} else if (game.vm_available_ops > 0) {
- view.prompt = `${clean_name(cards[this_card()].name)}: Add ${game.vm_available_ops} SPs to ${event_prompt()}.`
+ view.prompt = `${card_name[this_card()]}: Add ${game.vm_available_ops} SPs to ${event_prompt()}.`
for (let space_id of game.valid_spaces) {
gen_action_space(space_id)
@@ -6036,15 +6038,15 @@ states.vm_add_x_infl = {
states.vm_add_limited_infl = {
get inactive() {
- return `resolve ${clean_name(cards[this_card()].name)}: add Support Points.`
+ return `resolve ${card_name[this_card()]}: add Support Points.`
},
prompt() {
if (game.vm_available_ops > 0 && game.valid_spaces.length > 0) {
if (game.vm_max_infl === 1) {
- view.prompt = `${clean_name(cards[this_card()].name)}: add ${pluralize(game.vm_max_infl,'SP')} ${event_prompt()}.`
+ view.prompt = `${card_name[this_card()]}: add ${pluralize(game.vm_max_infl,'SP')} ${event_prompt()}.`
}
else {
- view.prompt = `${clean_name(cards[this_card()].name)}: add ${pluralize(game.vm_available_ops,'SP')} to ${event_prompt()}.`
+ view.prompt = `${card_name[this_card()]}: add ${pluralize(game.vm_available_ops,'SP')} to ${event_prompt()}.`
}
for (let space_id of game.valid_spaces) {
gen_action_space(space_id)
@@ -6067,20 +6069,20 @@ states.vm_remove_infl = {
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) {
- view.prompt = `${clean_name(cards[this_card()].name)}: no further SPs to remove.`
+ view.prompt = `${card_name[this_card()]}: no further SPs to remove.`
gen_action('done')
return
}
if (game.vm_available_ops === 0) {
- view.prompt = `${clean_name(cards[this_card()].name)}. Remove SPs: done.`
+ view.prompt = `${card_name[this_card()]}. Remove SPs: done.`
gen_action('done')
return
}
if (game.remove_opponent_infl) {
- view.prompt = `${clean_name(cards[this_card()].name)}: remove ${pluralize(game.vm_available_ops, 'opponent SP')}${event_prompt()}.`
+ view.prompt = `${card_name[this_card()]}: remove ${pluralize(game.vm_available_ops, 'opponent SP')}${event_prompt()}.`
}
else {
- view.prompt = `${clean_name(cards[this_card()].name)}: remove ${pluralize(game.vm_available_ops,'SP')}${event_prompt()}.`
+ view.prompt = `${card_name[this_card()]}: remove ${pluralize(game.vm_available_ops,'SP')}${event_prompt()}.`
}
for (let space_id of game.valid_spaces) {
gen_action_space(space_id)
@@ -6110,15 +6112,15 @@ states.vm_remove_infl = {
states.vm_remove_x_infl = {
get inactive() {
- return `resolve ${clean_name(cards[this_card()].name)}: remove SP from ${event_prompt()}.`
+ return `resolve ${card_name[this_card()]}: remove SP from ${event_prompt()}.`
},
prompt() {
if (game.valid_spaces.length === 0 && game.vm_available_ops > 0) {
- view.prompt = `${clean_name(cards[this_card()].name)}: no SPs to remove.`
+ view.prompt = `${card_name[this_card()]}: no SPs to remove.`
gen_action('done')
} else if (game.vm_available_ops > 0) {
- view.prompt = `${clean_name(cards[this_card()].name)}: remove ${pluralize(game.vm_available_ops,'SP')} from ${event_prompt()}.`
+ view.prompt = `${card_name[this_card()]}: remove ${pluralize(game.vm_available_ops,'SP')} from ${event_prompt()}.`
for (let space_id of game.valid_spaces) {
gen_action_space(space_id)
}
@@ -6141,13 +6143,13 @@ states.vm_remove_limited_infl = {
inactive: 'remove SP.',
prompt() {
if (game.vm_available_ops > 0 && game.valid_spaces.length > 0) {
- view.prompt = `${clean_name(cards[this_card()].name)}: remove ${pluralize(game.vm_available_ops,'SP')}${event_prompt()}, no more than ${game.vm_max_infl} per space.`
+ view.prompt = `${card_name[this_card()]}: remove ${pluralize(game.vm_available_ops,'SP')}${event_prompt()}, no more than ${game.vm_max_infl} per space.`
for (let space_id of game.valid_spaces) {
gen_action_space(space_id)
}
} else if (game.valid_spaces.length === 0 && game.vm_available_ops > 0) {
- view.prompt = `${clean_name(cards[this_card()].name)}: no further SP to remove.`
+ view.prompt = `${card_name[this_card()]}: no further SP to remove.`
gen_action('done')
}
},
@@ -6170,10 +6172,10 @@ states.vm_remove_all_infl = {
inactive: 'remove Support Points',
prompt() {
if (game.valid_spaces.length === 0 && game.vm_available_ops > 0) {
- view.prompt = `${clean_name(cards[this_card()].name)}: no SPs to remove.`
+ view.prompt = `${card_name[this_card()]}: no SPs to remove.`
gen_action('pass')
} else if (game.vm_available_ops > 0) {
- view.prompt = `${clean_name(cards[this_card()].name)}: remove all SPs from ${event_prompt()}.`
+ view.prompt = `${card_name[this_card()]}: remove all SPs from ${event_prompt()}.`
for (let space_id of game.valid_spaces) {
gen_action_space(space_id)
}
@@ -6196,13 +6198,13 @@ states.vm_support_check_prep = {
inactive: 'do Support Checks.',
prompt() {
if (game.valid_spaces.length === 0) {
- view.prompt = `${clean_name(cards[this_card()].name)}: no valid targets for Support Check.`
+ view.prompt = `${card_name[this_card()]}: no valid targets for Support Check.`
gen_action('done')
} else {
if (event_prompt() === "") {
- view.prompt = `${clean_name(cards[this_card()].name)}: select a space. ${pluralize(game.vm_available_ops, 'Support Check')} remaining.`
+ view.prompt = `${card_name[this_card()]}: select a space. ${pluralize(game.vm_available_ops, 'Support Check')} remaining.`
} else {
- view.prompt = `${clean_name(cards[this_card()].name)}: ${event_prompt()}. ${pluralize(game.vm_available_ops, 'Support Check')} remaining.`
+ view.prompt = `${card_name[this_card()]}: ${event_prompt()}. ${pluralize(game.vm_available_ops, 'Support Check')} remaining.`
}
for (let space_id of game.valid_spaces) {
gen_action_space(space_id)
@@ -6318,10 +6320,10 @@ states.vm_1_support_check_prep = {
inactive: 'do Support Checks.',
prompt() {
if (game.valid_spaces.length === 0) {
- view.prompt = `${clean_name(cards[this_card()].name)}: no valid targets for Support Check.`
+ view.prompt = `${card_name[this_card()]}: no valid targets for Support Check.`
gen_action('done')
} else {
- view.prompt = `${clean_name(cards[this_card()].name)}: ${event_prompt()}.`
+ view.prompt = `${card_name[this_card()]}: ${event_prompt()}.`
for (let space_id of game.valid_spaces) {
gen_action_space(space_id)
}
@@ -6378,7 +6380,7 @@ states.vm_tiananmen_square_attempt = {
states.vm_adamec = {
get inactive() {
- return `resolve ${clean_name(cards[C_ADAMEC].name)}.`
+ return `resolve ${card_name[C_ADAMEC]}.`
},
prompt() {
view.prompt = 'Adamec: roll a die.'
@@ -6448,7 +6450,7 @@ states.vm_brought_in_for_questioning = {
states.vm_central_committee_reshuffle = {
get inactive() {
- return `resolve ${clean_name(cards[C_CENTRAL_COMMITTEE_RESHUFFLE].name)}.`
+ return `resolve ${card_name[C_CENTRAL_COMMITTEE_RESHUFFLE]}.`
},
prompt() {
if (game.revolutions.every(n => n === true)) {
@@ -6515,7 +6517,7 @@ states.vm_central_committee_reshuffle = {
states.vm_common_european_home_choose = {
get inactive() {
- return `resolve ${clean_name(cards[game.played_card].name)}.`
+ return `resolve ${card_name[game.played_card]}.`
},
prompt() {
view.prompt = `Common European Home: play an opponent's card, event does not occur.`
@@ -6534,10 +6536,10 @@ states.vm_common_european_home_choose = {
states.vm_common_european_home_play = {
get inactive() {
- return `resolve ${clean_name(cards[this_card()].name)}.`
+ return `resolve ${card_name[this_card()]}.`
},
prompt() {
- view.prompt = `Play ${clean_name(cards[this_card()].name)} for:`
+ view.prompt = `Play ${card_name[this_card()]} for:`
gen_action('influence')
gen_action('support_check')
if (game.active === DEM && game.vm_event === C_KOHL_PROPOSES_REUNIFICATION) {
@@ -6571,7 +6573,7 @@ states.vm_common_european_home_play = {
states.vm_dash_for_the_west = {
get inactive() {
- return `resolve ${clean_name(cards[C_DASH_FOR_THE_WEST].name)}.`
+ return `resolve ${card_name[C_DASH_FOR_THE_WEST]}.`
},
prompt() {
view.prompt = 'Dash for the West: roll a die'
@@ -6601,11 +6603,11 @@ states.vm_dash_for_the_west = {
states.vm_play_event_from_discard = {
get inactive() {
- return `resolve ${clean_name(cards[this_card()].name)}.`
+ return `resolve ${card_name[this_card()]}.`
},
prompt() {
if (game.valid_cards.length === 0) {
- view.prompt = `${clean_name(cards[this_card()].name)}: no valid cards in discard.`
+ view.prompt = `${card_name[this_card()]}: no valid cards in discard.`
gen_action('pass')
} else {
view.prompt = `${event_prompt()}.`
@@ -6683,14 +6685,14 @@ states.vm_deutsche_marks_confirm = {
states.vm_deutsche_marks = {
get inactive() {
- return `resolve ${clean_name(cards[C_DEUTSCHE_MARKS].name)}.`
+ return `resolve ${card_name[C_DEUTSCHE_MARKS]}.`
},
prompt() {
if(cards[game.vm_event].side === 'C' && (cards[game.vm_event].playable || game.playable_cards.includes(game.vm_event))) {
- view.prompt = `Deutsche Marks: you must play ${clean_name(cards[this_card()].name)} for the event.`
+ view.prompt = `Deutsche Marks: you must play ${card_name[this_card()]} for the event.`
gen_action('event')
} else {
- view.prompt = `Deutsche Marks: play ${clean_name(cards[this_card()].name)} for:`
+ view.prompt = `Deutsche Marks: play ${card_name[this_card()]} for:`
gen_action('influence')
gen_action('support_check')
if (game.com_tst_attempted_this_turn === 0) {
@@ -6729,7 +6731,7 @@ states.vm_deutsche_marks = {
states.vm_exit_visas = {
get inactive() {
- return `resolve ${clean_name(cards[C_EXIT_VISAS].name)}.`
+ return `resolve ${card_name[C_EXIT_VISAS]}.`
},
prompt() {
view.prompt = 'Exit Visas: you may discard cards from your hand and draw replacements.'
@@ -6760,7 +6762,7 @@ states.vm_exit_visas = {
states.vm_exit_visas_finish = {
get inactive() {
- return `resolve ${clean_name(cards[C_EXIT_VISAS].name)}.`
+ return `resolve ${card_name[C_EXIT_VISAS]}.`
},
prompt() {
if (game.temp > 0) {
@@ -6790,7 +6792,7 @@ states.vm_exit_visas_finish = {
states.vm_foreign_currency_debt_burden = {
get inactive() {
- return `resolve ${clean_name(cards[game.played_card].name)}.`
+ return `resolve ${card_name[game.played_card]}.`
},
prompt() {
view.prompt = 'Choose a country. The Communist may not make Support Checks there for the rest of the turn.'
@@ -6834,7 +6836,7 @@ states.vm_foreign_currency_debt_burden = {
states.vm_goodbye_lenin = {
get inactive() {
- return `resolve ${clean_name(cards[game.played_card].name)}.`
+ return `resolve ${card_name[game.played_card]}.`
},
prompt() {
if (game.valid_cards.length > 0) {
@@ -6871,10 +6873,10 @@ states.vm_goodbye_lenin = {
states.vm_goodbye_lenin_ops = {
get inactive() {
- return `resolve ${clean_name(cards[this_card()].name)}.`
+ return `resolve ${card_name[this_card()]}.`
},
prompt() {
- view.prompt = `Play ${clean_name(cards[this_card()].name)} for:`
+ view.prompt = `Play ${card_name[this_card()]} for:`
gen_action('influence')
gen_action('support_check')
if (
@@ -6909,7 +6911,7 @@ states.vm_goodbye_lenin_ops = {
states.vm_honecker = {
get inactive() {
- return `resolve ${clean_name(cards[game.played_card].name)}.`
+ return `resolve ${card_name[game.played_card]}.`
},
prompt() {
if (game.valid_cards.length === 0 && game.temp === 0) {
@@ -6942,7 +6944,7 @@ states.vm_honecker = {
states.vm_inflationary_currency = {
get inactive() {
- return `resolve ${clean_name(cards[game.played_card].name)}.`
+ return `resolve ${card_name[game.played_card]}.`
},
prompt() {
if ((game.active === COM && game.revolutions.every(n => n === false)) || (game.active === DEM && game.revolutions.every(n => n === true))) {
@@ -7011,7 +7013,7 @@ states.vm_inflationary_currency = {
states.vm_inflationary_currency_discard = {
get inactive() {
- return `resolve ${clean_name(cards[game.played_card].name)}.`
+ return `resolve ${card_name[game.played_card]}.`
},
prompt() {
if (game.valid_cards.length === 0) {
@@ -7049,7 +7051,7 @@ states.vm_inflationary_currency_discard = {
states.vm_kiss_of_death = {
get inactive() {
- return `resolve ${clean_name(cards[game.played_card].name)}.`
+ return `resolve ${card_name[game.played_card]}.`
},
prompt() {
if (game.communist_hand.length === 0) {
@@ -7098,10 +7100,10 @@ states.vm_kiss_of_death = {
states.vm_kiss_of_death_finish = {
get inactive() {
- return `resolve ${clean_name(cards[game.played_card].name)}.`
+ return `resolve ${card_name[game.played_card]}.`
},
prompt() {
- view.prompt = `Play ${clean_name(cards[game.vm_event].name)} for the event.`
+ view.prompt = `Play ${card_name[game.vm_event]} for the event.`
gen_action('event')
},
event() {
@@ -7111,7 +7113,7 @@ states.vm_kiss_of_death_finish = {
states.vm_kremlin_coup_choose_country = {
get inactive() {
- return `resolve ${clean_name(cards[this_card()].name)}.`
+ return `resolve ${card_name[this_card()]}.`
},
prompt() {
if (game.temp.length > 0) {
@@ -7176,7 +7178,7 @@ states.vm_kremlin_coup_choose_country = {
states.vm_kremlin_coup_take_control = {
get inactive() {
- return `resolve ${clean_name(cards[game.played_card].name)}.`
+ return `resolve ${card_name[game.played_card]}.`
},
prompt() {
if (game.valid_spaces.includes(game.systematization)) {
@@ -7217,7 +7219,7 @@ states.vm_kremlin_coup_take_control = {
states.vm_kremlin_coup_sc_prep = {
get inactive() {
- return `resolve ${clean_name(cards[game.played_card].name)}.`
+ return `resolve ${card_name[game.played_card]}.`
},
prompt() {
view.prompt = `Kremlin Coup! Conduct a Support Check in ${country_name(game.vm_active_country)}'s Bureaucratic space.`
@@ -7248,7 +7250,7 @@ states.vm_kremlin_coup_sc = {
states.vm_laszlo_tokes = {
get inactive() {
- return `resolve ${clean_name(cards[game.played_card].name)}.`
+ return `resolve ${card_name[game.played_card]}.`
},
prompt() {
view.prompt = `Laszlo Tokes. Choose to:`
@@ -7274,14 +7276,14 @@ states.vm_laszlo_tokes = {
states.vm_switch_infl = {
get inactive() {
- return `resolve ${clean_name(cards[game.played_card].name)}.`
+ return `resolve ${card_name[game.played_card]}.`
},
prompt() {
if (game.valid_spaces.length === 0) {
- view.prompt = `${clean_name(cards[this_card()].name)}: No SPs to remove.`
+ view.prompt = `${card_name[this_card()]}: No SPs to remove.`
gen_action("pass")
} else {
- view.prompt = `${clean_name(cards[game.played_card].name)}: ${event_prompt()}.`
+ view.prompt = `${card_name[game.played_card]}: ${event_prompt()}.`
for (let space_id of game.valid_spaces) {
gen_action_space(space_id)
}
@@ -7305,7 +7307,7 @@ states.vm_switch_infl = {
states.vm_malta_summit = {
get inactive() {
- return `resolve ${clean_name(cards[game.played_card].name)}.`
+ return `resolve ${card_name[game.played_card]}.`
},
prompt() {
view.prompt = 'Malta Summit: roll a die.'
@@ -7344,7 +7346,7 @@ states.vm_malta_summit = {
states.vm_modrow = {
get inactive() {
- return `resolve ${clean_name(cards[game.played_card].name)}.`
+ return `resolve ${card_name[game.played_card]}.`
},
prompt() {
view.prompt = `Modrow: roll a die.`
@@ -7369,7 +7371,7 @@ states.vm_modrow = {
states.vm_nepotism = {
get inactive() {
- return `resolve ${clean_name(cards[game.played_card].name)}.`
+ return `resolve ${card_name[game.played_card]}.`
},
prompt() {
view.prompt = 'Nepotism: roll a die.'
@@ -7394,7 +7396,7 @@ states.vm_nepotism = {
states.vm_new_years_eve_party = {
get inactive() {
- return `resolve ${clean_name(cards[C_NEW_YEARS_EVE_PARTY].name)}.`
+ return `resolve ${card_name[C_NEW_YEARS_EVE_PARTY]}.`
},
prompt() {
view.prompt = 'Choose whether the game ends at the end of this turn.'
@@ -7428,7 +7430,7 @@ states.vm_new_years_eve_party = {
states.vm_nomenklatura = {
get inactive() {
- return `resolve ${clean_name(cards[game.played_card].name)}.`
+ return `resolve ${card_name[game.played_card]}.`
},
prompt() {
view.prompt = 'Nomenklatura: choose to remove all Democratic SPs from Elite spaces or add 3 SPs to any Elite space(s).'
@@ -7465,7 +7467,7 @@ states.vm_nomenklatura = {
states.vm_nomenklatura_remove = {
get inactive() {
- return `resolve ${clean_name(cards[game.played_card].name)}.`
+ return `resolve ${card_name[game.played_card]}.`
},
prompt() {
if (game.valid_spaces.length === 0) {
@@ -7494,7 +7496,7 @@ states.vm_nomenklatura_remove = {
states.vm_nomenklatura_add = {
get inactive() {
- return `resolve ${clean_name(cards[game.played_card].name)}.`
+ return `resolve ${card_name[game.played_card]}.`
},
prompt() {
view.prompt = `Nomenklatura: add 3 SPs to any Elite space(s). ${pluralize(game.vm_available_ops, 'SP')} remaining.`
@@ -7514,7 +7516,7 @@ states.vm_nomenklatura_add = {
states.vm_samizdat = {
get inactive() {
- return `resolve ${clean_name(cards[game.played_card].name)}.`
+ return `resolve ${card_name[game.played_card]}.`
},
prompt() {
view.prompt = 'Samizdat: you may set aside a card from your hand and draw a replacement.'
@@ -7539,7 +7541,7 @@ states.vm_samizdat = {
states.vm_samizdat_finish = {
get inactive() {
- return `resolve ${clean_name(cards[game.played_card].name)}.`
+ return `resolve ${card_name[game.played_card]}.`
},
prompt() {
view.prompt = 'Draw a replacement card.'
@@ -7554,7 +7556,7 @@ states.vm_samizdat_finish = {
states.vm_shock_therapy = {
get inactive() {
- return `resolve ${clean_name(cards[game.played_card].name)}.`
+ return `resolve ${card_name[game.played_card]}.`
},
prompt() {
if (game.revolutions.every(n => n === false)) {
@@ -7644,7 +7646,7 @@ states.vm_shock_therapy = {
states.vm_social_democratic_platform_adopted = {
get inactive() {
- return `resolve ${clean_name(cards[game.played_card].name)}.`
+ return `resolve ${card_name[game.played_card]}.`
},
prompt() {
if (game.revolutions.every(n => n === false)) {
@@ -7704,7 +7706,7 @@ states.vm_social_democratic_platform_adopted = {
states.vm_systematization = {
get inactive() {
- return `resolve ${clean_name(cards[game.played_card].name)}.`
+ return `resolve ${card_name[game.played_card]}.`
},
prompt() {
view.prompt = 'Systematization: eliminate a space in Romania.'
@@ -7724,7 +7726,7 @@ states.vm_systematization = {
states.vm_the_chinese_solution = {
get inactive() {
- return `resolve ${clean_name(cards[game.played_card].name)}.`
+ return `resolve ${card_name[game.played_card]}.`
},
prompt() {
view.prompt = 'The Chinese Solution: you may give up 3 VP to conduct Support Checks in a country where you hold power.'
@@ -7812,7 +7814,7 @@ states.vm_the_chinese_solution = {
states.vm_the_tyrant_is_gone = {
get inactive() {
- return `resolve ${clean_name(cards[game.played_card].name)}.`
+ return `resolve ${card_name[game.played_card]}.`
},
prompt() {
if (!game.the_tyrant_is_gone) {
@@ -7840,7 +7842,7 @@ states.vm_the_tyrant_is_gone = {
states.vm_the_wall_must_go = {
get inactive() {
- return `resolve ${clean_name(cards[this_card()].name)}.`
+ return `resolve ${card_name[this_card()]}.`
},
prompt() {
view.prompt = 'The Wall Must Go! Roll a die.'
@@ -7907,7 +7909,7 @@ states.vm_the_wall_must_go = {
states.vm_warsaw_pact_summit = {
get inactive() {
- return `resolve ${clean_name(cards[game.played_card].name)}.`
+ return `resolve ${card_name[game.played_card]}.`
},
prompt() {
view.prompt = 'Choose to play for Support Checks or place SPs.'
@@ -7941,7 +7943,7 @@ states.vm_warsaw_pact_summit = {
states.vm_we_are_the_people_remove = {
get inactive() {
- return `resolve ${clean_name(cards[game.played_card].name)}.`
+ return `resolve ${card_name[game.played_card]}.`
},
prompt() {
if (game.demInfl[S_LUTHERAN_CHURCH] === 0 && game.vm_available_ops > 0) {
@@ -7977,7 +7979,7 @@ states.vm_we_are_the_people_remove = {
}
states.vm_we_are_the_people_add = {
get inactive() {
- return `resolve ${clean_name(cards[game.played_card].name)}.`
+ return `resolve ${card_name[game.played_card]}.`
},
prompt() {
view.prompt = `"We are the People!": you must add the ${pluralize(game.vm_available_ops,'SP')} to spaces in Germany.`
@@ -7997,7 +7999,7 @@ states.vm_we_are_the_people_add = {
states.vm_workers_revolt = {
get inactive() {
- return `resolve ${clean_name(cards[game.played_card].name)}.`
+ return `resolve ${card_name[game.played_card]}.`
},
prompt() {
if (game.valid_spaces.length === 0) {
@@ -8024,7 +8026,7 @@ states.vm_workers_revolt = {
states.vm_workers_revolt_finish = {
get inactive() {
- return `resolve ${clean_name(cards[game.played_card].name)}.`
+ return `resolve ${card_name[game.played_card]}.`
},
prompt() {
view.prompt = `Target: ${spaces[game.selected_space].name_unique}. Roll a die.`
@@ -8232,7 +8234,7 @@ states.vm_tst_8 = {
states.vm_tst_8_ops = {
inactive: 'play card for operations.',
prompt() {
- view.prompt = `Play ${clean_name(cards[game.played_card].name)} for:`
+ view.prompt = `Play ${card_name[game.played_card]} for:`
gen_action('influence')
gen_action('support_check')
if (
@@ -8269,16 +8271,16 @@ states.vm_scare_tactics = {
inactive: 'remove a Support Point.',
prompt() {
if (game.valid_spaces.length === 0 && game.vm_available_ops > 0) {
- view.prompt = `${clean_name(cards[this_card()].name)}: no SPs to remove.`
+ view.prompt = `${card_name[this_card()]}: no SPs to remove.`
gen_action('done')
return
}
if (game.vm_available_ops === 0) {
- view.prompt = `${clean_name(cards[this_card()].name)}. Remove SPs: done.`
+ view.prompt = `${card_name[this_card()]}. Remove SPs: done.`
gen_action('done')
return
}
- view.prompt = `${clean_name(cards[this_card()].name)}: remove ${pluralize(game.vm_available_ops, 'opponent SP')}${event_prompt()}.`
+ view.prompt = `${card_name[this_card()]}: remove ${pluralize(game.vm_available_ops, 'opponent SP')}${event_prompt()}.`
for (let space_id of game.valid_spaces) {
gen_action_space(space_id)
}