summaryrefslogtreecommitdiff
path: root/play.js
diff options
context:
space:
mode:
Diffstat (limited to 'play.js')
-rw-r--r--play.js48
1 files changed, 48 insertions, 0 deletions
diff --git a/play.js b/play.js
index 8afb8ad..6be0c83 100644
--- a/play.js
+++ b/play.js
@@ -82,6 +82,8 @@ const CARD_P4 = [ 156, 161 ]
const CARD_M4X = [ 162, 167 ]
const CARD_S4X = [ 168, 173 ]
const CARD_P4X = [ 174, 179 ]
+const CARD_S3_V2 = [ 180, 188 ] // updated foederati
+const CARD_P4X_V2 = [ 189, 194 ] // updated demagogue
const CARD_INDEX = [
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3,
@@ -90,6 +92,8 @@ const CARD_INDEX = [
11, 11, 12, 12, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13, 13, 13, 13, 13, 14, 14, 14, 14, 14, 14, 14, 14, 15, 15, 15,
15, 15, 15, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 17, 17, 18, 18, 18, 18, 18, 18, 19, 19, 19, 19, 19, 19, 20, 20,
20, 20, 20, 20, 21, 21, 21, 21, 21, 21,
+ 22, 22, 22, 22, 22, 22, 22, 22,
+ 23, 23, 23, 23, 23, 23,
]
const CARD_CLASS = [
@@ -115,6 +119,8 @@ const CARD_CLASS = [
"influence_m4x",
"influence_s4x",
"influence_p4x",
+ "influence_p3_v2",
+ "influence_p4x_v2",
]
const CARD_MAP = [
@@ -140,6 +146,8 @@ const CARD_MAP = [
"M4(Spiculum)",
"S4(Triumph)",
"P4(Demagogue)",
+ "S3(Foederati)",
+ "P4(Demagogue)",
]
@@ -242,6 +250,10 @@ const BIT_MILITIA = 1 << 11
const BIT_BREAKAWAY = 1 << 12
const BIT_SEAT_OF_POWER = 1 << 13
const BIT_MILITIA_CASTRA = 1 << 14
+const BIT_MARKET = 1 << 15
+const BIT_MONUMENT = 1 << 16
+const BIT_PORT = 1 << 17
+const BIT_TEMPLE = 1 << 18
function get_support(where) { return view.provinces[where] & 15 }
function get_mobs(where) { return (view.provinces[where] >> 4) & 7 }
@@ -250,6 +262,10 @@ function has_militia(where) { return view.provinces[where] & BIT_MILITIA }
function has_amphitheater(where) { return view.provinces[where] & BIT_AMPHITHEATER }
function has_basilica(where) { return view.provinces[where] & BIT_BASILICA }
function has_limes(where) { return view.provinces[where] & BIT_LIMES }
+function has_market(where) { return view.provinces[where] & BIT_MARKET }
+function has_monument(where) { return view.provinces[where] & BIT_MONUMENT }
+function has_port(where) { return view.provinces[where] & BIT_PORT }
+function has_temple(where) { return view.provinces[where] & BIT_TEMPLE }
function is_breakaway(where) { return view.provinces[where] & BIT_BREAKAWAY }
function is_seat_of_power(where) { return view.provinces[where] & BIT_SEAT_OF_POWER }
function has_militia_castra(where) { return view.provinces[where] & BIT_MILITIA_CASTRA }
@@ -763,6 +779,10 @@ let ui = {
imp_amphitheater: [],
imp_basilica: [],
imp_limes: [],
+ imp_market: [],
+ imp_monument: [],
+ imp_port: [],
+ imp_temple: [],
crisis: document.getElementById("crisis_highlight"),
dice: [
document.getElementById("crisis_die_1"),
@@ -949,6 +969,10 @@ function on_init() {
ui.imp_amphitheater[region] = create_building(region, "improvement amphitheater hide")
ui.imp_basilica[region] = create_building(region, "improvement basilica hide")
ui.imp_limes[region] = create_building(region, "improvement limes hide")
+ ui.imp_market[region] = create_building(region, "improvement market hide")
+ ui.imp_monument[region] = create_building(region, "improvement monument hide")
+ ui.imp_port[region] = create_building(region, "improvement port hide")
+ ui.imp_temple[region] = create_building(region, "improvement temple hide")
register_action(ui.capital[region], "capital", region)
register_action(ui.regions[region], "region", region)
@@ -1242,6 +1266,25 @@ function on_update() {
else
hide(ui.imp_limes[region])
+ if (has_market(region))
+ show_improvement(ui.imp_market[region], ++imp_off)
+ else
+ hide(ui.imp_market[region])
+
+ if (has_monument(region))
+ show_improvement(ui.imp_monument[region], ++imp_off)
+ else
+ hide(ui.imp_monument[region])
+
+ if (has_port(region))
+ show_improvement(ui.imp_port[region], ++imp_off)
+ else
+ hide(ui.imp_port[region])
+
+ if (has_temple(region))
+ show_improvement(ui.imp_temple[region], ++imp_off)
+ else
+ hide(ui.imp_temple[region])
}
for (let i = 0; i < LEGION_COUNT; ++i) {
@@ -1577,6 +1620,11 @@ function on_update() {
action_button("amphitheater", "Amphitheater")
action_button("basilica", "Basilica")
action_button("limes", "Limes")
+ action_button("market", "Market")
+ action_button("monument", "Monument")
+ action_button("port", "Port")
+ action_button("temple", "Temple")
+
action_button("disperse_mob", "Disperse Mob")
action_button("train_legions", "Train Legions")
action_button("add_legion_to_army", "Add Legion to Army")