diff options
author | iainp5 <iain.pearce.ip@gmail.com> | 2024-12-30 12:36:32 +0000 |
---|---|---|
committer | iainp5 <iain.pearce.ip@gmail.com> | 2024-12-30 12:36:32 +0000 |
commit | cf0bca07884e7420f292cbf28dade55d01ce1e83 (patch) | |
tree | ac137e3467457b27b1c17c31367f858bd43aa0a8 | |
parent | 8db10c517a69047fd5bf8c6fd350ccd29ff466a7 (diff) | |
download | 1989-dawn-of-freedom-cf0bca07884e7420f292cbf28dade55d01ce1e83.tar.gz |
Updated SC logging
-rw-r--r-- | rules.js | 53 |
1 files changed, 28 insertions, 25 deletions
@@ -2365,12 +2365,12 @@ function do_sc(space) { logi(`No adjacency for Democrats due to C${C_THE_WALL}`) // Continue with Support Check Logic - logii(`D${roll} from roll`) + logii(`D${roll}`) // Check for the Crowd Turns Against Ceausescu if (game.is_pwr_struggle) { roll += game.vm_available_ops - logii(`+${game.vm_available_ops} from Ceausescu`) + logii(`+${game.vm_available_ops} Ceausescu`) } // Check if in Tiananmen Square Track Award @@ -2381,18 +2381,18 @@ function do_sc(space) { } else { let card_ops = get_card_ops(this_card()) roll += card_ops - logii(`+${card_ops} from card ops`) + logii(`+${card_ops} card ops`) } if (game.support_check_modifier > 0) { roll += game.support_check_modifier - logii(`+${game.support_check_modifier} from event`) + logii(`+${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 from C${C_TEAR_GAS}`) + logii(`+1 C${C_TEAR_GAS}`) permanently_remove(C_TEAR_GAS) game.persistent_events = game.persistent_events.filter(n => n !== C_TEAR_GAS) } @@ -2402,7 +2402,7 @@ function do_sc(space) { game.persistent_events.includes(C_FRG_EMBASSIES) ) { roll++ - logii(`+1 from C${C_FRG_EMBASSIES}`) + logii(`+1 C${C_FRG_EMBASSIES}`) } if ( game.active === DEM && @@ -2410,18 +2410,18 @@ function do_sc(space) { game.persistent_events.includes(C_GRENZTRUPPEN) ) { roll-- - logii(`-1 from C${C_GRENZTRUPPEN}`) + logii(`-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 from C${C_STAND_FAST}`) + logii(`-1 C${C_STAND_FAST}`) } if (game.active === DEM && game.persistent_events.includes(C_ELENA) && spaces[space].country === 'Romania') { roll-- - logii(`-1 from C${C_ELENA}`) + logii(`-1 C${C_ELENA}`) } if ( game.active === DEM && @@ -2429,7 +2429,7 @@ function do_sc(space) { game.austria_hungary_border_reopened_tracker ) { roll++ - logii(`+1 from C${C_AUSTRIA_HUNGARY_BORDER_REOPENED}`) + logii(`+1 C${C_AUSTRIA_HUNGARY_BORDER_REOPENED}`) } // Continue with logic - check for adjacency @@ -2451,29 +2451,31 @@ function do_sc(space) { roll += adj.dem_adj roll -= adj.com_adj if (adj.dem_adj > 0) { - logii(`+${adj.dem_adj} from adjacency`) + logii(`+${adj.dem_adj} adjacency`) } if (adj.com_adj > 0) { - logii(`-${adj.com_adj} from opponent adjacency`) + logii(`-${adj.com_adj} opponent adjacency`) } } else { roll += adj.com_adj roll -= adj.dem_adj if (adj.com_adj > 0) { - logii(`+${adj.com_adj} from adjacency`) + logii(`+${adj.com_adj} adjacency`) } if (adj.dem_adj > 0) { - logii(`-${adj.dem_adj} from opponent adjacency`) + logii(`-${adj.dem_adj} opponent adjacency`) } } } } // Support Check calcs - logi(`Modified roll: ${roll}`) + //logi('Result:') + //logi(`Modified roll: ${roll}`) const stability = spaces[space].stability - logii(`-${stability*2} (stability * 2)`) + logii(`-${stability*2} stability (x2)`) const change_infl = Math.max(0, roll - stability*2) + //logi('Change SP %' + space + ':') if (change_infl > 0) { if (game.active === DEM) { if (change_infl > game.comInfl[space]) { @@ -2499,11 +2501,12 @@ function do_sc(space) { } } let end_control = check_control(space) - logi('Change: ' + change_infl + ' SP' + get_icons(starting_control, end_control)) + //logi('%' + space + ': ' +change_infl + ' SP' + get_icons(starting_control, end_control)) + logi(change_infl + ' SP for ' + game.active + get_icons(starting_control, end_control)) check_tyrant_sc() } else { - logi('Change: 0 SP') + logii('None') } // Check VP awards if ( @@ -2818,35 +2821,35 @@ function get_icons(starting_control, end_control) { function do_tst_attempt() { let roll = roll_d6() - logi(`D${roll} from roll`) + logi(`D${roll}`) roll += game.available_ops - logi(`+${game.available_ops} from card ops`) + logi(`+${game.available_ops} card ops`) // TIANANMEN SQUARE MODIFIERS if ((game.active === DEM && game.dem_tst_attempted === 1) || (game.active === COM && game.com_tst_attempted === 1)) { roll++ - logi('+1 from previous TST attempts') + logi('+1 previous TST attempts') } if (game.active === DEM && game.dem_tst_position >= 1 && game.com_tst_position === 0) { roll ++ - logi('+1 from TST award') + logi('+1 TST award') } if (game.active === COM && game.com_tst_position >= 1 && game.dem_tst_position === 0) { roll ++ - logi('+1 from TST award') + logi('+1 TST award') } if ( (game.active === DEM && cards[game.played_card].side === 'D') || (game.active === COM && cards[game.played_card].side === 'C') ) { roll++ - logi('+1 for playing own card') + logi('+1 playing own card') } if (game.active === COM && game.persistent_events.includes(C_LI_PENG)) { roll ++ - logi('+1 from C' + C_LI_PENG) + logi('+1 C' + C_LI_PENG) } // TIANANMEN SQUARE ATTEMPT |