summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2025-01-02 17:40:13 +0100
committerTor Andersson <tor@ccxvii.net>2025-01-03 22:30:15 +0100
commit754be4bf07ba910b3e5417db6729d4e1a6e84925 (patch)
treef1e9616b2876acf8cb99b1d18d90745a592f8222
parent5f8f49869a62ce92baf91a75723227ee7afca7d9 (diff)
download1989-dawn-of-freedom-754be4bf07ba910b3e5417db6729d4e1a6e84925.tar.gz
remove trailing whitespace
-rw-r--r--rules.js52
1 files changed, 25 insertions, 27 deletions
diff --git a/rules.js b/rules.js
index 8a06fbb..b78c137 100644
--- a/rules.js
+++ b/rules.js
@@ -679,7 +679,7 @@ states.play_card = {
view.actions.event = 0
}
}
-
+
// Special check for Reformer Rehabilitated
if (game.played_card === C_REFORMER_REHABILITATED && game.playable_cards.includes(C_REFORMER_REHABILITATED)) {
if (game.active === DEM && (game.dem_tst_position > game.com_tst_position)) {
@@ -1969,7 +1969,6 @@ states.general_strike_roll = {
},
}
-
states.honecker = {
inactive: 'resolve Honecker',
prompt() {
@@ -2272,7 +2271,7 @@ function add_infl(space, ops) {
game.demInfl[space]++
}
- let end_control = check_control(space)
+ let end_control = check_control(space)
log_summary('£ in %' + space + get_icons(starting_control,end_control))
check_tyrant()
@@ -2777,7 +2776,7 @@ function check_control(space) {
return 'd_ahead'
else if (game.comInfl[space] > game.demInfl[space])
return 'c_ahead'
- else
+ else
return "none"
}
@@ -2814,9 +2813,9 @@ function get_icons(starting_control, end_control) {
return ' (£UU .to £DC)'
else if (starting_control === 'none' && end_control === COM)
return ' (£UU .to £CC)'
- else
+ else
return ''
- }
+ }
else
return ''
}
@@ -3094,7 +3093,7 @@ function score_country(country) {
if (presence.com_battlegrounds > 0) {
logi(`${presence.com_battlegrounds} VP for Battlegrounds`)
com_vp -= presence.com_battlegrounds
- }
+ }
} else {
logi('0 VP')
}
@@ -3105,7 +3104,7 @@ function score_country(country) {
if (presence.dem_battlegrounds > 0) {
logi(`${presence.dem_battlegrounds} VP for Battlegrounds`)
dem_vp += presence.dem_battlegrounds
- }
+ }
} else {
logi('0 VP')
}
@@ -3242,7 +3241,7 @@ function end_stasi_choose_card() {
if (game.stasi_card === C_COMMON_EUROPEAN_HOME) {
game.state = 'stasi_confirm'
} else {
- end_stasi()
+ end_stasi()
}
}
@@ -3265,7 +3264,7 @@ function end_goddess() {
log_h2("Action Round " + game.round)
if (game.active === DEM) {
change_player()
- }
+ }
if (game.persistent_events.includes(C_GENERAL_STRIKE)) {
game.state = 'general_strike'
} else {
@@ -3875,7 +3874,7 @@ function end_round() {
game.round_player = DEM
if (game.active !== DEM) {
change_player()
- }
+ }
if (game.democrat_hand.includes(game.stasi_card)) {
game.state = 'stasi_play_card'
} else {
@@ -4011,7 +4010,7 @@ function new_turn() {
}
if (game.active === DEM)
log('Democrat:')
- else
+ else
log('Communist:')
game.state = 'tst_goddess'
} else {
@@ -4254,7 +4253,7 @@ function check_systematization() {
if (game.systematization > 0) {
game.valid_spaces = game.valid_spaces.filter(n => n !== game.systematization)
}
-}
+}
function this_card() {
return game.vm_event > 0 ? game.vm_event : game.played_card
@@ -4292,7 +4291,7 @@ function log(msg) {
function log_ops_banner() {
if (game.active === DEM)
log('.O.d')
- else
+ else
log('.O.c')
finish_select_card()
}
@@ -4300,7 +4299,7 @@ function log_ops_banner() {
function log_event_banner() {
if (game.active === DEM)
log('.V.d')
- else
+ else
log('.V.c')
}
@@ -4314,10 +4313,10 @@ function log_struggle_banner(n) {
function log_tst_8_banner() {
if (game.active === DEM)
log('.T.d')
- else
+ else
log('.T.c')
finish_select_card()
-}
+}
function log_event(n) {
log_br()
@@ -4378,7 +4377,7 @@ function log_msg_gap(msg) {
function logi_msg_gap(msg) {
game.log.push(">" + msg)
log_br()
-}
+}
function log_round() {
log_h2(`Action Round ${game.round}`)
@@ -4506,7 +4505,6 @@ function pop_summary_i() {
game.summary = []
}
-
function do_log_summary() {
if (game.summary.length > 0) {
pop_summary_i()
@@ -4703,7 +4701,7 @@ function vm_return() {
delete game.vm_max_infl
delete game.vm_influence_added
delete game.communist_hand_red
- game.vm_event = 0
+ game.vm_event = 0
if (game.persistent_events.includes(C_AUSTRIA_HUNGARY_BORDER_REOPENED)) {
reset_austria_hungary_border_reopened()
}
@@ -4957,7 +4955,7 @@ function vm_take_control(space) {
let end_control = check_control(space)
if (game.state === 'vm_kremlin_coup_take_control')
logi('Took control of %' + space + get_icons(starting_control, end_control) +'.')
- else
+ else
log('Took control of %' + space + get_icons(starting_control, end_control) +'.')
}
@@ -4992,7 +4990,7 @@ function vm_add_infl_free() {
function vm_add_x_infl() {
game.vm_available_ops = vm_operand(1)
- if (!(game.vm_event === C_PUBLIC_AGAINST_VIOLENCE &&
+ if (!(game.vm_event === C_PUBLIC_AGAINST_VIOLENCE &&
event_prompt() === 'Presov'))
log('Placed SP:')
game.state = 'vm_add_x_infl'
@@ -5001,7 +4999,7 @@ function vm_add_x_infl() {
function vm_do_add_x_infl(space) {
push_undo()
let starting_control = check_control(space)
-
+
if (game.active === COM) {
game.comInfl[space] += game.vm_available_ops
} else {
@@ -5351,7 +5349,7 @@ function vm_ceausescu_prep() {
function vm_ceausescu() {
game.persistent_events = game.persistent_events.filter(n => n!== C_CEAUSESCU)
let adj_cluj = false
-
+
if (game.demInfl[S_TIMISOARA] > 0) {
adj_cluj = true
}
@@ -6438,7 +6436,7 @@ states.vm_remove_infl = {
else {
if (game.vm_event === C_CEAUSESCU)
prompt_event(`${event_prompt()}.`)
- else
+ else
prompt_event(`Remove ${pluralize(game.vm_available_ops,'SP')}${event_prompt()}.`)
}
for (let space_id of game.valid_spaces) {
@@ -6898,7 +6896,7 @@ states.vm_common_european_home_play = {
game.state = 'vm_ceh_support_check_prep'
valid_spaces_sc()
},
- tst() {
+ tst() {
push_undo()
log_gap(`Played C${game.vm_event} to the Tiananmen Square Track`)
game.state = 'vm_tiananmen_square_attempt'
@@ -8192,7 +8190,7 @@ states.vm_we_are_the_people_remove = {
space(space) {
remove_infl(space, 'vm_available_ops')
if (game.vm_influence_added[S_LUTHERAN_CHURCH] === 4 ||
- game.valid_spaces.length === 0
+ game.valid_spaces.length === 0
) {
do_log_summary()
finish_we_are_the_people()