summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoriainp5 <iain.pearce.ip@gmail.com>2024-09-21 11:55:03 +0100
committeriainp5 <iain.pearce.ip@gmail.com>2024-09-21 11:55:03 +0100
commit3eeb88f7c2f3b52fe18c1e2f0e1f0d57e2f8f9ba (patch)
treeaf963e47afc93b051964c2eace53b6b5f27ed928
parentc0e4a0d544c6559077834303ff1e23d889a5d78b (diff)
download1989-dawn-of-freedom-3eeb88f7c2f3b52fe18c1e2f0e1f0d57e2f8f9ba.tar.gz
Debugging power struggle
-rw-r--r--rules.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/rules.js b/rules.js
index f28a1ce..0b08133 100644
--- a/rules.js
+++ b/rules.js
@@ -1483,6 +1483,7 @@ states.vp_roll = {
}
},
roll () {
+ push_undo()
let roll = Math.floor(Math.random() * 6) + 1
log(`Rolled a ${roll}`)
let rally_win = 0
@@ -1516,8 +1517,10 @@ states.vp_roll = {
log(`-${vp_change} VP`)
}
if (roll >= 4)
+ console.log('VP before', game.vp)
if (game.active === DEM) {game.vp += vp_change}
else {game.vp -= vp_change}
+ console.log('VP after', game.vp)
if (game.active === DEM && modified_roll >= 4) {
game.phase = 1
} else {