From 8735c6e7e0e39a0700c77f67c6864c052873a7a1 Mon Sep 17 00:00:00 2001 From: iainp5 Date: Fri, 20 Sep 2024 17:12:18 +0100 Subject: Debugging Shock therapy --- rules.js | 2 ++ 1 file changed, 2 insertions(+) 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) { -- cgit v1.2.3