summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2024-11-29 01:27:01 +0100
committerTor Andersson <tor@ccxvii.net>2024-11-29 01:27:36 +0100
commite013fc709ddcfb705e26a013502e623e34937e90 (patch)
tree0f09edc6abcd42f9f2fd715e806e60ff245a2410
parent65320688f373e7675c76a5083eebf6ac3fe1c071 (diff)
download1989-dawn-of-freedom-e013fc709ddcfb705e26a013502e623e34937e90.tar.gz
Add spaces inside comments to increase legibility.
-rw-r--r--rules.js42
1 files changed, 21 insertions, 21 deletions
diff --git a/rules.js b/rules.js
index 08311f9..4710f24 100644
--- a/rules.js
+++ b/rules.js
@@ -384,7 +384,7 @@ exports.view = function (state, player) {
strategy_deck: game.strategy_deck.length,
strategy_removed: game.strategy_removed,
discard: game.discard,
- show_opp_hand: game.view_opp_hand /* Is this still needed?*/,
+ show_opp_hand: game.view_opp_hand /* Is this still needed? */,
democrat_hand: game.democrat_hand.length,
communist_hand: game.communist_hand.length,
@@ -421,7 +421,7 @@ exports.view = function (state, player) {
if (game.communist_hand_red) {
view.opp_hand = game.communist_hand_red
}
- view.set_aside = game.democrat_set_aside /*Is this being used? */
+ view.set_aside = game.democrat_set_aside /* Is this being used? */
view.power_hand = [ ...game.dem_pwr_hand ].sort((a, b) => a - b)
} else if (player === COM) {
view.hand = game.communist_hand
@@ -720,7 +720,7 @@ states.play_card = {
valid_spaces_sc()
},
tst_7() {
- /*Cancel opponent event */
+ /* Cancel opponent event */
push_undo()
check_ligachev_non_event()
log(`Played C${game.played_card}. Event cancelled using TST Award`)
@@ -729,7 +729,7 @@ states.play_card = {
game.state = 'resolve_opponent_event'
},
tst_8() {
- /*Play card for ops and event */
+ /* Play card for ops and event */
push_undo()
game.vm_event_to_do = true
game.vm_infl_to_do = true
@@ -1002,7 +1002,7 @@ states.support_check_prep = {
done() {
push_undo()
if (game.is_pwr_struggle) {
- /*Crowd Turns Against Ceausescu should be the only time you end up here during a power struggle */
+ /* Crowd Turns Against Ceausescu should be the only time you end up here during a power struggle */
if (game.return !== game.active) {
next_player()
}
@@ -1194,7 +1194,7 @@ states.vm_the_crowd_turns_against_ceausescu = {
valid_spaces_infl()
game.valid_spaces = game.valid_spaces.filter(n => spaces[n].country === 'Romania')
game.state = 'the_crowd_turns_against_ceausescu_infl'
- /* Send this to add_infl. Add check at end of add_infl similar to valid_spaces*/
+ /* Send this to add_infl. Add check at end of add_infl similar to valid_spaces */
},
support_check() {
push_undo()
@@ -1421,11 +1421,11 @@ states.power_struggle = {
game.played_power_card = card
game.phase = 3
} else if (card === 51) {
- /*Scare Tactics */
+ /* Scare Tactics */
game.return = ''
- goto_vm(351) /*Can I combine these 3 into a single stage where you goto_vm(300 + card) ? */
+ goto_vm(351) /* Can I combine these 3 into a single stage where you goto_vm(300 + card) ? */
} else if (card === 50) {
- /*Support Surges */
+ /* Support Surges */
if (game.active === DEM) {
game.return = COM
} else {
@@ -1433,7 +1433,7 @@ states.power_struggle = {
}
goto_vm(350)
} else if (game.phase === 0 && card === 49) {
- /*Support Falters */
+ /* Support Falters */
next_player()
goto_vm(349)
} else {
@@ -1486,7 +1486,7 @@ states.power_struggle = {
log_h3('Support Loss')
if (game.phase === 0) {
game.played_power_card = 0
- game.proxy_power_card = 0 /*If conceded when held the initiative but had no playable cards, ignore the last played card */
+ game.proxy_power_card = 0 /* If conceded when held the initiative but had no playable cards, ignore the last played card */
}
game.phase = 0
game.state = 'support_loss'
@@ -1672,7 +1672,7 @@ states.finish_scoring = {
gen_action('done')
},
done() {
- log_msg_gap('Power Struggle resolved') /*At this point log card dicarded or permanently removed? */
+ log_msg_gap('Power Struggle resolved') /* At this point log card dicarded or permanently removed? */
if (game.persistent_events.includes(111)) {
game.state = 'new_years_eve_party'
return
@@ -1829,7 +1829,7 @@ states.final_scoring = {
} else if (game.vp < 0) {
goto_game_over(COM, `${COM} wins on Victory Point Track!`)
} else if (game.vp === 0) {
- goto_game_over('', `The game is tied!`) /*Not sure what to pass for result */
+ goto_game_over('', `The game is tied!`) /* Not sure what to pass for result */
}
},
}
@@ -1985,7 +1985,7 @@ states.new_years_eve_party = {
} else if (game.vp < 0) {
goto_game_over(COM, `New Year's Eve Party: ${COM} wins on Victory Point Track!`)
} else if (game.vp === 0) {
- goto_game_over('', `New Year's Eve Party: The game is tied!`) /*Not sure what to pass for result */
+ goto_game_over('', `New Year's Eve Party: The game is tied!`) /* Not sure what to pass for result */
}
},
end() {
@@ -1994,7 +1994,7 @@ states.new_years_eve_party = {
} else if (game.vp < 0) {
goto_game_over(COM, `New Year's Eve Party: ${COM} wins on Victory Point Track!`)
} else if (game.vp === 0) {
- goto_game_over('', `New Year's Eve Party: The game is tied!`) /*Not sure what to pass for result */
+ goto_game_over('', `New Year's Eve Party: The game is tied!`) /* Not sure what to pass for result */
}
},
}
@@ -3113,7 +3113,7 @@ function end_goddess() {
}
function check_reformer() {
- /*Is this function still used?*/
+ /* Is this function still used? */
if (game.dem_tst_position !== game.com_tst_position) {
if (!game.playable_cards.includes(67)) {
game.playable_cards.push(67)
@@ -3601,7 +3601,7 @@ function end_round() {
delete game.phase
game.remove_opponent_infl = false
game.is_pwr_struggle = false
- game.vm_infl_to_do = false /*Can get rid of this and use game.return_state? */
+ game.vm_infl_to_do = false /* Can get rid of this and use game.return_state? */
delete game.vm_event_to_do
delete game.vm_infl_to_do
delete game.vm_active_country
@@ -3611,7 +3611,7 @@ function end_round() {
game.valid_cards = []
game.valid_spaces = []
check_common_european_home()
- reset_austria_hungary_border_reopened() /*This should be redundant! */
+ reset_austria_hungary_border_reopened() /* This should be redundant! */
// Check for duplicate card entries
let card_check
@@ -4389,7 +4389,7 @@ function vm_return() {
delete game.vm_max_infl
delete game.vm_influence_added
delete game.communist_hand_red
- game.vm_event = 0 /*Reset to 0 now that event has been completed. Hopefully this doesn't cause issues! */
+ game.vm_event = 0 /* Reset to 0 now that event has been completed. Hopefully this doesn't cause issues! */
if (game.persistent_events.includes(C_AUSTRIA_HUNGARY_BORDER_REOPENED)) {
reset_austria_hungary_border_reopened()
}
@@ -5791,7 +5791,7 @@ function vm_permanently_remove() {
}
if (cards[game.played_card].remove && !game.strategy_removed.includes(game.played_card)) {
permanently_remove(game.played_card)
- } /*This means the card that called the event being played is also removed if relevant. Think this makes sense */
+ } /* This means the card that called the event being played is also removed if relevant. Think this makes sense */
vm_next()
}
@@ -6536,7 +6536,7 @@ states.vm_common_european_home_play = {
gen_action('influence')
gen_action('support_check')
if (game.active === DEM && game.vm_event === C_KOHL_PROPOSES_REUNIFICATION) {
- return /*Special condition if card is actually Kohl Proposes Reunification*/
+ return /* Special condition if card is actually Kohl Proposes Reunification */
}
},
influence() {