summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--play.css4
-rw-r--r--play.js30
2 files changed, 21 insertions, 13 deletions
diff --git a/play.css b/play.css
index 8f7c592..cb349ac 100644
--- a/play.css
+++ b/play.css
@@ -411,6 +411,10 @@ body.p2 #npg_galatia { display: block }
filter: drop-shadow(0px 1px 3px #0008);
}
+.quaestor.pretender {
+ transform: translate(27px, -27px);
+}
+
.legion {
background-size: 900% 400%;
}
diff --git a/play.js b/play.js
index de6dfb6..06fb3e8 100644
--- a/play.js
+++ b/play.js
@@ -854,17 +854,6 @@ function on_init() {
for (let i = 0; i < LEGION_COUNT; ++i)
ui.legions[i] = create_piece(i, "legion", "legion", "legion_" + i)
- for (let p = 0; p < 4; ++p) {
- for (let i = 0; i < 12; ++i) {
- ui.seat_of_power[p * 12 + i] = create_thing({ className: PLAYER_CLASS[p] + " seat_of_power hide" })
- ui.seat_of_power[p * 12 + i].style.left = (LAYOUT_QUAESTOR[i][0] + 16) + "px"
- ui.seat_of_power[p * 12 + i].style.top = (LAYOUT_QUAESTOR[i][1]) + "px"
- ui.breakaway[p * 12 + i] = create_thing({ className: PLAYER_CLASS[p] + " breakaway hide" })
- ui.breakaway[p * 12 + i].style.left = (LAYOUT_QUAESTOR[i][0] + 16) + "px"
- ui.breakaway[p * 12 + i].style.top = (LAYOUT_QUAESTOR[i][1]) + "px"
- }
- }
-
ui.rival_emperors[0] = create_piece(0, "rival_emperor", "rival_emperor postumus", "postumus")
ui.rival_emperors[1] = create_piece(1, "rival_emperor", "rival_emperor priest_king", "priest_king")
ui.rival_emperors[2] = create_piece(2, "rival_emperor", "rival_emperor zenobia", "zenobia")
@@ -917,6 +906,17 @@ function on_init() {
for (let region = 12; region < 21; ++region) {
register_action(ui.regions[region], "region", region)
}
+
+ for (let p = 0; p < 4; ++p) {
+ for (let i = 0; i < 12; ++i) {
+ ui.seat_of_power[p * 12 + i] = create_thing({ className: PLAYER_CLASS[p] + " seat_of_power hide" })
+ ui.seat_of_power[p * 12 + i].style.left = (LAYOUT_QUAESTOR[i][0] + 16) + "px"
+ ui.seat_of_power[p * 12 + i].style.top = (LAYOUT_QUAESTOR[i][1]) + "px"
+ ui.breakaway[p * 12 + i] = create_thing({ className: PLAYER_CLASS[p] + " breakaway hide" })
+ ui.breakaway[p * 12 + i].style.left = (LAYOUT_QUAESTOR[i][0] + 16) + "px"
+ ui.breakaway[p * 12 + i].style.top = (LAYOUT_QUAESTOR[i][1]) + "px"
+ }
+ }
}
let stack_count = new Array(21).fill(0)
@@ -1164,10 +1164,14 @@ function on_update() {
}
}
- if (has_quaestor(region))
+ if (has_quaestor(region)) {
show(ui.quaestor[region])
- else
+ if (is_seat_of_power(region) || is_breakaway(region))
+ ui.quaestor[region].classList.add("pretender")
+ } else {
hide(ui.quaestor[region])
+ ui.quaestor[region].classList.remove("pretender")
+ }
if (has_amphitheater(region))
show(ui.amphitheater[region])