summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--rules.js30
1 files changed, 16 insertions, 14 deletions
diff --git a/rules.js b/rules.js
index 74d83bd..9c9cbe9 100644
--- a/rules.js
+++ b/rules.js
@@ -1493,8 +1493,7 @@ states.power_struggle = {
delete game.power_card_1
delete game.power_card_2
log(`${game.active} conceded.`)
- log_h4('Aftermath')
- log_h5('Support Loss')
+ log_h5('Aftermath')
if (game.phase === 0) {
game.played_power_card = 0
game.proxy_power_card = 0
@@ -1616,7 +1615,8 @@ states.support_loss = {
}
},
roll() {
- game.available_ops = support_loss_roll[get_aftermath_roll()]
+ log_br()
+ game.available_ops = support_loss_roll[get_aftermath_roll('Support Loss Die Roll')]
if (game.available_ops === 0) {
log('Does not remove SPs.')
}
@@ -1634,7 +1634,6 @@ states.support_loss = {
// TODO: log "None" here?
summary_flush()
change_player()
- log_h5('Victory Point')
game.phase = 0
game.state = 'vp_roll'
},
@@ -1656,7 +1655,8 @@ states.vp_roll = {
}
},
roll() {
- let roll = get_aftermath_roll()
+ log_br()
+ let roll = get_aftermath_roll('Victory Point Die Roll')
let vp_change = vp_roll[roll]
if (game.active === DEM) {
game.vp_roll = vp_change
@@ -1685,7 +1685,8 @@ states.vp_roll = {
push_undo()
let scoring_card = scoring_cards[countries.indexOf(game.pwr_struggle_in)]
permanently_remove(scoring_card)
- log(`Democrat takes power in ${game.pwr_struggle_in}.`)
+ log_br()
+ log("The Democrat takes Power.")
take_power(game.pwr_struggle_in)
game.phase = 2
},
@@ -1715,7 +1716,8 @@ states.choose_power = {
},
surrender() {
push_undo()
- log(`Communist voluntarily surrenders power.`)
+ log_br()
+ log(`Communist voluntarily surrenders Power.`)
take_power(game.pwr_struggle_in)
permanently_remove(game.played_card)
game.phase = 1
@@ -3022,7 +3024,7 @@ function score_country(country) {
logi(`${presence.dem_battlegrounds} VP for Battlegrounds`)
dem_vp += presence.dem_battlegrounds
- log_gap('Communist:')
+ log('Communist:')
if (presence.com_spaces > 0) {
logi(`${value_presence} VP for Presence`)
com_vp -= value_presence
@@ -3045,7 +3047,7 @@ function score_country(country) {
logi(`${presence.com_battlegrounds} VP for Battlegrounds`)
com_vp -= presence.com_battlegrounds
- log_gap('Democrat:')
+ log('Democrat:')
if (presence.dem_spaces > 0) {
logi(`${value_presence} VP for Presence`)
dem_vp += value_presence
@@ -3061,7 +3063,7 @@ function score_country(country) {
// Otherwise, presence and battlegrounds
else {
log("No domination or control.")
- log_gap(`Communist:`)
+ log(`Communist:`)
if (presence.com_spaces > 0) {
logi(`${value_presence} VP for Presence`)
com_vp -= value_presence
@@ -3072,7 +3074,7 @@ function score_country(country) {
} else {
logi('0 VP')
}
- log_gap('Democrat:')
+ log('Democrat:')
if (presence.dem_spaces > 0) {
logi(`${value_presence} VP for Presence`)
dem_vp += value_presence
@@ -3086,6 +3088,7 @@ function score_country(country) {
}
// Calculate change VP
+/*
let change_vp = dem_vp + com_vp
game.vp += change_vp
log_gap('Net VP:')
@@ -3094,7 +3097,6 @@ function score_country(country) {
} else {
logi(`${change_vp} VP`)
}
-/*
// Scoring Summary
log_h4(`Power Struggle ${country}: Summary`)
if (game.vp_roll >= 0)
@@ -3145,10 +3147,10 @@ function get_end_infl_prompt() {
}
}
-function get_aftermath_roll() {
+function get_aftermath_roll(what) {
clear_undo()
let roll = roll_d6()
- log(`Roll: D${roll}`)
+ log(`${what}: D${roll}`)
let rally_win = 0
let petition_win = 0
if (rallies.includes(game.played_power_card) || game.proxy_power_card === 'Rally in the Square') {