diff options
-rw-r--r-- | play.css | 4 | ||||
-rw-r--r-- | play.js | 30 |
2 files changed, 21 insertions, 13 deletions
@@ -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%; } @@ -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]) |