diff options
author | Tor Andersson <tor@ccxvii.net> | 2024-10-24 21:39:07 +0200 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2024-10-24 23:31:55 +0200 |
commit | 9f2f99a05be1bf496dd398f1337e3e9f1767c77e (patch) | |
tree | dd8f96af3ed1c50feb53b335f68203b42881e2bf /play.js | |
parent | 0d300b3070f51910af34877de9de97d4fa163703 (diff) | |
download | maria-9f2f99a05be1bf496dd398f1337e3e9f1767c77e.tar.gz |
Use sequence-of-play table for alternating moves etc.
Diffstat (limited to 'play.js')
-rw-r--r-- | play.js | 25 |
1 files changed, 24 insertions, 1 deletions
@@ -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() |