summaryrefslogtreecommitdiff
path: root/rules.js
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2024-10-21 21:23:16 +0200
committerTor Andersson <tor@ccxvii.net>2024-10-21 21:23:16 +0200
commitde5fa586b5709f33ea0aee96c4c30390c626d137 (patch)
tree820b788030d4a9a89eea55734959caa54a5670c3 /rules.js
parent4f0d9c6e6397603dca10c30caa1ad3ce65722a83 (diff)
downloadmaria-de5fa586b5709f33ea0aee96c4c30390c626d137.tar.gz
political track and victory box display
Diffstat (limited to 'rules.js')
-rw-r--r--rules.js30
1 files changed, 28 insertions, 2 deletions
diff --git a/rules.js b/rules.js
index a7ea703..27097ea 100644
--- a/rules.js
+++ b/rules.js
@@ -16,6 +16,13 @@ tc draw
-- advanced --
+VICTORY BOXES
+ vp for winning (tracks)
+ electors (check victory markers)
+ emperor (bit)
+ italy (bit)
+ silesia (bit)
+
silesia home country for prussia
tc subsidies
@@ -81,6 +88,12 @@ const P_SAXONY = 5
const power_name = [ "France", "Prussia", "Pragmatic Army", "Austria", "Bavaria", "Saxony" ]
const power_class = [ "france", "prussia", "pragmatic", "austria", "bavaria", "saxony" ]
+const F_EMPEROR_FRANCE = 1
+const F_EMPEROR_AUSTRIA = 2
+const F_ITALY_FRANCE = 4
+const F_ITALY_AUSTRIA = 8
+const F_SILESIA_ANNEXED = 16
+
const SPADES = 0
const CLUBS = 1
const HEARTS = 2
@@ -3252,6 +3265,13 @@ exports.setup = function (seed, _scenario, _options) {
turn: 0,
stage: 0,
+
+ vp: [ 0, 0, 0, 0 ], // battle victory points
+ saxony: 2, // political track
+ russia: 6, // political track
+ italy: 5, // political track
+ flags: 0, // emperor vp, italy vp, silesia annexed, etc
+
pol_deck: null,
deck: null,
hand: [ [], [], [], [], [], [] ],
@@ -3441,11 +3461,17 @@ exports.view = function (state, player) {
log: game.log,
turn: game.turn,
+ vp: game.vp,
+ saxony: game.saxony,
+ russia: game.russia,
+ italy: game.italy,
+ flags: game.flags,
+ victory: game.victory,
+ elector: game.elector,
+
pos: game.pos,
oos: game.oos,
supreme: game.supreme,
- victory: game.victory,
- elector: game.elector,
troops: mask_troops(player),
hand: mask_hand(player),
pt: total_troops_list(),