summaryrefslogtreecommitdiff
path: root/rules.js
diff options
context:
space:
mode:
Diffstat (limited to 'rules.js')
-rw-r--r--rules.js52
1 files changed, 27 insertions, 25 deletions
diff --git a/rules.js b/rules.js
index 93c3f51..fbb573b 100644
--- a/rules.js
+++ b/rules.js
@@ -2361,39 +2361,41 @@ function do_sc(space) {
let starting_control = check_control(space)
let roll = roll_d6()
+
+
+ // Continue with Support Check Logic
+ log(`%${space}: D${roll}`)
+
// Check for The Wall
if (game.active === COM && game.persistent_events.includes(C_THE_WALL) && spaces[space].country === 'East_Germany')
logi(`No adjacency for Democrats due to C${C_THE_WALL}`)
- // Continue with Support Check Logic
- logi(`%${space}: D${roll}`)
-
// Check for the Crowd Turns Against Ceausescu
if (game.is_pwr_struggle) {
roll += game.vm_available_ops
- logii(`+${game.vm_available_ops} Ceausescu`)
+ logi(`+${game.vm_available_ops} Ceausescu`)
}
// Check if in Tiananmen Square Track Award
else if (game.state === 'vm_tst_6_sc') {
roll += get_tst_6_ops()
roll += 2
- logii('+2 TST award')
+ logi('+2 TST award')
} else {
let card_ops = get_card_ops(this_card())
roll += card_ops
- logii(`+${card_ops} card Ops`)
+ logi(`+${card_ops} card Ops`)
}
if (game.support_check_modifier > 0) {
roll += game.support_check_modifier
- logii(`+${game.support_check_modifier} event`)
+ logi(`+${game.support_check_modifier} event`)
}
// Events which modify SC rolls
if (game.active === COM && game.persistent_events.includes(C_TEAR_GAS) && spaces[space].socio === SOCIO_STUDENT) {
roll ++
- logii(`+1 C${C_TEAR_GAS}`)
+ logi(`+1 C${C_TEAR_GAS}`)
permanently_remove(C_TEAR_GAS)
game.persistent_events = game.persistent_events.filter(n => n !== C_TEAR_GAS)
}
@@ -2403,7 +2405,7 @@ function do_sc(space) {
game.persistent_events.includes(C_FRG_EMBASSIES)
) {
roll++
- logii(`+1 C${C_FRG_EMBASSIES}`)
+ logi(`+1 C${C_FRG_EMBASSIES}`)
}
if (
game.active === DEM &&
@@ -2411,18 +2413,18 @@ function do_sc(space) {
game.persistent_events.includes(C_GRENZTRUPPEN)
) {
roll--
- logii(`-1 C${C_GRENZTRUPPEN}`)
+ logi(`-1 C${C_GRENZTRUPPEN}`)
}
if (
(game.active === COM && game.stand_fast === DEM && check_dem_control(space)) ||
(game.active === DEM && game.stand_fast === COM && check_com_control(space))
) {
roll--
- logii(`-1 C${C_STAND_FAST}`)
+ logi(`-1 C${C_STAND_FAST}`)
}
if (game.active === DEM && game.persistent_events.includes(C_ELENA) && spaces[space].country === 'Romania') {
roll--
- logii(`-1 C${C_ELENA}`)
+ logi(`-1 C${C_ELENA}`)
}
if (
game.active === DEM &&
@@ -2430,7 +2432,7 @@ function do_sc(space) {
game.austria_hungary_border_reopened_tracker
) {
roll++
- logii(`+1 C${C_AUSTRIA_HUNGARY_BORDER_REOPENED}`)
+ logi(`+1 C${C_AUSTRIA_HUNGARY_BORDER_REOPENED}`)
}
// Continue with logic - check for adjacency
@@ -2441,7 +2443,7 @@ function do_sc(space) {
if (game.active === COM && game.persistent_events.includes(C_THE_WALL) && spaces[space].country === 'East_Germany') {
roll += adj.com_adj
if (adj.com_adj > 0) {
- logii(`+${adj.com_adj} adjacency`)
+ logi(`+${adj.com_adj} adjacency`)
}
permanently_remove(C_THE_WALL)
@@ -2452,19 +2454,19 @@ function do_sc(space) {
roll += adj.dem_adj
roll -= adj.com_adj
if (adj.dem_adj > 0) {
- logii(`+${adj.dem_adj} adjacency`)
+ logi(`+${adj.dem_adj} adjacency`)
}
if (adj.com_adj > 0) {
- logii(`-${adj.com_adj} opponent adjacency`)
+ logi(`-${adj.com_adj} opponent adjacency`)
}
} else {
roll += adj.com_adj
roll -= adj.dem_adj
if (adj.com_adj > 0) {
- logii(`+${adj.com_adj} adjacency`)
+ logi(`+${adj.com_adj} adjacency`)
}
if (adj.dem_adj > 0) {
- logii(`-${adj.dem_adj} opponent adjacency`)
+ logi(`-${adj.dem_adj} opponent adjacency`)
}
}
}
@@ -2474,7 +2476,7 @@ function do_sc(space) {
//logi('Result:')
//logi(`Modified roll: ${roll}`)
const stability = spaces[space].stability
- logii(`-${stability*2} stability (x2)`)
+ logi(`-${stability*2} stability (x2)`)
const change_infl = Math.max(0, roll - stability*2)
//logi('Change SP %' + space + ':')
if (change_infl > 0) {
@@ -2503,11 +2505,11 @@ function do_sc(space) {
}
let end_control = check_control(space)
//logi('%' + space + ': ' +change_infl + ' SP' + get_icons(starting_control, end_control))
- logi(change_infl + ' SP for ' + game.active + get_icons(starting_control, end_control))
+ log(change_infl + ' SP for ' + game.active + get_icons(starting_control, end_control))
check_tyrant_sc()
} else {
- logii('No change SP')
+ log('No change SP')
}
// Check VP awards
if (
@@ -2515,11 +2517,11 @@ function do_sc(space) {
game.persistent_events.includes(C_HELSINKI_FINAL_ACT) &&
(spaces[space].socio === SOCIO_INTELLECTUAL || spaces[space].socio === SOCIO_STUDENT)
) {
- logi('+1 VP from C' + C_HELSINKI_FINAL_ACT)
+ log('+1 VP from C' + C_HELSINKI_FINAL_ACT)
game.vp ++
}
if (game.active === COM && game.persistent_events.includes(C_ECO_GLASNOST) && spaces[space].space_id === S_RUSE) {
- logi('+1 VP from C' + C_ECO_GLASNOST)
+ log('+1 VP from C' + C_ECO_GLASNOST)
game.vp++
}
@@ -2527,10 +2529,10 @@ function do_sc(space) {
let tear_gas_end = game.persistent_events.includes(C_TEAR_GAS)
let the_wall_end = game.persistent_events.includes(C_THE_WALL)
if (tear_gas_start && !tear_gas_end) {
- logi(`C${C_TEAR_GAS} no longer in effect`)
+ log(`C${C_TEAR_GAS} no longer in effect`)
}
if (the_wall_start && !the_wall_end) {
- logi(`C${C_THE_WALL} no longer in effect`)
+ log(`C${C_THE_WALL} no longer in effect`)
}
// If Austria-Hungary Border Reopened used, all future Support Checks must be in East Germany