From d53aa3d5af6950d0ac4bfbcb5ab214a083c28e3a Mon Sep 17 00:00:00 2001 From: iainp5 Date: Fri, 11 Oct 2024 08:32:59 +0100 Subject: Added die images --- rules.js | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) (limited to 'rules.js') diff --git a/rules.js b/rules.js index ac5f93f..a00f77f 100644 --- a/rules.js +++ b/rules.js @@ -1406,7 +1406,7 @@ states.power_struggle = { }, roll () { let roll = Math.floor(Math.random() * 6) + 1 - log(`Rolled a ${roll}`) + log(`Roll: D${roll}`) if (roll >= power_cards[game.played_power_card].value) { log('Initiative roll successful') game.phase = 0 @@ -1516,7 +1516,7 @@ states.support_loss ={ let roll = Math.floor(Math.random() * 6) + 1 let rally_win = 0 let petition_win = 0 - log(`Rolled a ${roll}`) + log(`Roll: D${roll}`) if ((game.played_power_card >= 25 && game.played_power_card <= 30) || game.played_power_card === 53) { rally_win = 2} if ((game.played_power_card >= 31 && game.played_power_card <= 36) || game.played_power_card === 54) { petition_win = 2} let modified_roll = roll + game.raised_stakes + rally_win - petition_win @@ -1585,7 +1585,7 @@ states.vp_roll = { }, roll () { let roll = Math.floor(Math.random() * 6) + 1 - log(`Rolled a ${roll}`) + log(`Roll: D${roll}`) let rally_win = 0 let petition_win = 0 if ((game.played_power_card >= 25 && game.played_power_card <= 30) || game.played_power_card === 53) {rally_win = 2} @@ -1906,7 +1906,7 @@ states.general_strike = { roll() { clear_undo() let roll = Math.floor(Math.random() * 6) + 1 - log(`Rolled a ${roll}`) + log(`Roll: D${roll}`) log(`+${game.available_ops} from card ops`) @@ -2285,7 +2285,7 @@ function do_sc(space) { // Continue with Support Check Logic let roll = Math.floor(Math.random() * 6) + 1 - log(`Rolled a ${roll}`) + log(`Roll: D${roll}`) console.log('game.vm_event', game.vm_event) console.log('game.is_pwr_struggle', game.is_pwr_struggle) /* @@ -2761,7 +2761,7 @@ function check_com_control(space_id) { function do_tst_attempt() { let roll = Math.floor(Math.random() * 6) + 1; - log(`Rolled a ${roll}`); + log(`Roll: D${roll}`); roll += game.available_ops log(`+${game.available_ops} from card ops`) @@ -6414,7 +6414,7 @@ states.vm_adamec = { roll() { clear_undo() let roll = Math.floor(Math.random() * 6) + 1 - log(`Rolled a ${roll}`) + log(`Roll: D${roll}`) let worker_spaces = spaces.filter(space => space && space.country === 'Czechoslovakia' && space.socio === 4 && check_dem_control(space.space_id)).length if (worker_spaces > 0) { log(`-${worker_spaces} from Democrat controlled worker spaces`) @@ -6601,7 +6601,7 @@ states.vm_dash_for_the_west = { roll() { clear_undo() let roll = Math.floor(Math.random() * 6) + 1 - log(`Rolled a ${roll}`) + log(`Roll: D${roll}`) let com_control = check_presence('East_Germany').com_spaces if (roll > com_control) { @@ -7366,7 +7366,7 @@ states.vm_malta_summit = { roll() { clear_undo() let roll = Math.floor(Math.random() * 6) + 1 - log(`Rolled a ${roll}`) + log(`Roll: D${roll}`) if (game.stability > 0) { log(`+${game.stability} from USSR Stability Track`) log(`Modified roll: ${roll + game.stability}`) @@ -7412,11 +7412,11 @@ states.vm_modrow = { let roll = Math.floor(Math.random() * 6) + 1 let dem_spaces = spaces.filter(space => space && space.country === 'East_Germany' && check_dem_control(space.space_id)).length if (roll > dem_spaces) { - log(`Rolled a ${roll}`) + log(`Roll: D${roll}`) log(`Success. More than the ${dem_spaces} Democratically controlled spaces`) vm_next() } else { - log(`Rolled a ${roll}`) + log(`Roll: D${roll}`) log(`Fail. More than ${dem_spaces} required`) permanently_remove(83) vm_return() @@ -7441,13 +7441,13 @@ states.vm_nepotism = { clear_undo() let roll = Math.floor(Math.random() * 6) + 1 if (roll < 3) { - log(`Rolled a ${roll}: adds 4 SPs`) + log(`Roll: D${roll} adds 4 SPs`) game.vm_available_ops = 4} else if (roll < 5 ) { - log(`Rolled a ${roll}: adds 3 SPs`) + log(`Roll: D${roll} adds 3 SPs`) game.vm_available_ops = 3} else { - log(`Rolled a ${roll}: adds 1 SP`) + log(`Roll: D${roll} adds 1 SP`) game.vm_available_ops = 1} //game.phase = 2 vm_next() @@ -7697,7 +7697,7 @@ states.vm_shock_therapy = { worker_farmer++ } } - log(`Rolled a ${roll}`) + log(`Roll: D${roll}`) log(`-${worker_farmer} from Communist controlled Worker and Farmer spaces`) log(`Modified roll: ${roll - worker_farmer}`) if ((roll - worker_farmer) > 2) { @@ -7924,7 +7924,7 @@ states.vm_the_wall_must_go = { } let roll = Math.floor(Math.random() * 6) + 1 - log(`Rolled a ${roll}`) + log(`Roll: D${roll}`) if (game.active === DEM) { let controlled_spaces = spaces.filter(space => space && space.country === 'East_Germany' && check_dem_control(space.space_id)).length if (controlled_spaces > 0) { @@ -8142,7 +8142,7 @@ states.vm_workers_revolt_finish = { roll() { clear_undo() let roll = Math.floor(Math.random() * 6) + 1 - log(`Rolled a ${roll}`) + log(`Roll: D${roll}`) let adj = count_adj(spaces[game.selected_space].name_unique) if (game.active === DEM) { log(`-${adj.com_adj} from opponent controlled spaces`) -- cgit v1.2.3