summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoriainp5 <iain.pearce.ip@gmail.com>2024-09-20 17:12:18 +0100
committeriainp5 <iain.pearce.ip@gmail.com>2024-09-20 17:12:18 +0100
commit8735c6e7e0e39a0700c77f67c6864c052873a7a1 (patch)
tree8845dc09e22af195c75fce18f066a87204957557
parent9bbce7d4d5b84d8b7c00efa9691923cc33bdd863 (diff)
download1989-dawn-of-freedom-8735c6e7e0e39a0700c77f67c6864c052873a7a1.tar.gz
Debugging Shock therapy
-rw-r--r--rules.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/rules.js b/rules.js
index 9c77457..56ab281 100644
--- a/rules.js
+++ b/rules.js
@@ -6643,11 +6643,13 @@ states.vm_shock_therapy = {
log(`Rolled a ${roll}`)
console.log('game.pieces', game.pieces)
for (let space of game.pieces) {
+ if (space) {
console.log('checking space', spaces[space.space_id].country, game.vm_active_country, space.comCtrl, space.socio )
if (space && spaces[space.space_id].country === game.vm_active_country && space.comCtrl === 1 && (space.socio === 3 || space.socio === 4)) {
game.temp++
}
}
+ }
log(`-${game.temp} from Communist controlled Worker and Farmer spaces`)
log(`Modified roll: ${roll - game.temp}`)
if ((roll - game.temp) > 2) {