summaryrefslogtreecommitdiff
path: root/play.js
diff options
context:
space:
mode:
Diffstat (limited to 'play.js')
-rw-r--r--play.js25
1 files changed, 24 insertions, 1 deletions
diff --git a/play.js b/play.js
index f3f5630..725f1ad 100644
--- a/play.js
+++ b/play.js
@@ -64,7 +64,12 @@ const F_EMPEROR_AUSTRIA = 2
const F_ITALY_FRANCE = 4
const F_ITALY_AUSTRIA = 8
const F_SILESIA_ANNEXED = 16
-const F_IMPERIAL_ELECTION = 32
+const F_IMPERIAL_ELECTION = 32 // imperial election card revealed!
+const F_WAR_OF_JENKINS_EAR = 64 // -1 France TC for one turn
+const F_SAXONY_TC_ONCE = 128 // only draw TCs once per turn
+const F_FRANCE_REDUCED = 256
+const F_PRUSSIA_NEUTRAL = 512
+const F_MOVE_FLANDERS = 1024
const SPADES = 0
const CLUBS = 1
@@ -76,6 +81,11 @@ const IMPERIAL_ELECTION = 24
const ELIMINATED = data.cities.name.length
+const ARENBERG = 17
+const SAXONY_GENERAL = 19
+const SAXONY_TRAIN = 29
+const PRUSSIAN_TRAIN_2 = 23
+
const all_powers = [ 0, 1, 2, 3, 4, 5 ]
const all_major_powers = [ 0, 1, 2, 3 ]
@@ -97,6 +107,15 @@ const all_power_trains = [
[ 29 ],
]
+const all_power_pieces = [
+ [ ...all_power_generals[0], ...all_power_trains[0] ],
+ [ ...all_power_generals[1], ...all_power_trains[1] ],
+ [ ...all_power_generals[2], ...all_power_trains[2] ],
+ [ ...all_power_generals[3], ...all_power_trains[3] ],
+ [ ...all_power_generals[4], ...all_power_trains[4] ],
+ [ ...all_power_generals[5], ...all_power_trains[5] ],
+]
+
const last_piece = 29
const all_hussars = [ 30, 31 ]
@@ -1167,6 +1186,10 @@ function on_update() {
banner += `<span class="subsidy ${power_class[other]}">S</span>`
})
}
+ if (pow === P_PRUSSIA && (view.flags & F_PRUSSIA_NEUTRAL))
+ banner += " \u2014 Neutral"
+ if (pow === P_FRANCE && (view.flags & F_WAR_OF_JENKINS_EAR))
+ banner += " \u2014 receives 1 TC less"
ui.power_header[pow].innerHTML = banner
ui.hand[pow].replaceChildren()