diff options
-rw-r--r-- | rules.js | 67 |
1 files changed, 54 insertions, 13 deletions
@@ -1493,7 +1493,7 @@ states.power_struggle = { delete game.power_card_1 delete game.power_card_2 log(`${game.active} conceded.`) - log_h5('Aftermath') + log_h4('Aftermath') if (game.phase === 0) { game.played_power_card = 0 game.proxy_power_card = 0 @@ -1616,15 +1616,10 @@ states.support_loss = { }, 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.') - } + game.available_ops = support_loss_roll[get_aftermath_roll('Support Loss')] game.phase++ - if (game.available_ops > 0) { - valid_spaces_support_loss() - log('Removed SP:') - } + valid_spaces_support_loss() + log('Removed SP:') }, space(space) { game.remove_opponent_infl = false /* Don't know why this is needed... */ @@ -1656,7 +1651,7 @@ states.vp_roll = { }, roll() { log_br() - let roll = get_aftermath_roll('Victory Point Die Roll') + let roll = get_aftermath_roll('Victory Point') let vp_change = vp_roll[roll] if (game.active === DEM) { game.vp_roll = vp_change @@ -3008,9 +3003,56 @@ function score_country(country) { let dem_vp = 0 let com_vp = 0 - // Check for presence let presence = check_presence(country) + //Democrat scoring + log('Democrat:') + if (presence.dem_control) { + logi(`Control. ${pluralize(presence.dem_battlegrounds,' battleground')}`) + dem_vp += value_control + presence.dem_battlegrounds + } + else if (presence.dem_domination) { + logi(`Domination. ${pluralize(presence.dem_battlegrounds,' battleground')}`) + dem_vp += value_domination + presence.dem_battlegrounds + } + else if (presence.dem_spaces) { + if (presence.dem_battlegrounds > 0) { + logi(`Presence. ${pluralize(presence.dem_battlegrounds,' battleground')}`) + dem_vp += value_presence + presence.dem_battlegrounds + } else { + logi(`Presence`) + dem_vp += value_presence + } + } + else { + logi('No presence') + } + logi(`+${dem_vp} VP`) + + //Communist scoring + log_gap('Communist:') + if (presence.com_control) { + logi(`Control. ${pluralize(presence.com_battlegrounds,' battleground')}`) + com_vp -= value_control - presence.com_battlegrounds + } + else if (presence.com_domination) { + logi(`Domination. ${pluralize(presence.com_battlegrounds,' battleground')}`) + com_vp -= value_domination - presence.com_battlegrounds + } + else if (presence.com_spaces) { + if (presence.com_battlegrounds > 0) { + logi(`Presence. ${pluralize(presence.com_battlegrounds,' battleground')}`) + com_vp -= value_presence - presence.com_battlegrounds + } else { + logi(`Presence`) + com_vp -= value_presence + } + } else { + logi('No presence') + } + logi(`${com_vp} VP`) + +/* // If one side has domination or control if (presence.dem_control || presence.dem_domination) { log(`Democrat:`) @@ -3062,7 +3104,6 @@ function score_country(country) { // Otherwise, presence and battlegrounds else { - log("No domination or control.") log(`Communist:`) if (presence.com_spaces > 0) { logi(`${value_presence} VP for Presence`) @@ -3086,7 +3127,7 @@ function score_country(country) { logi('0 VP') } } - +*/ // Calculate change VP let change_vp = dem_vp + com_vp |