From 5a4754c6f27b3ff80154dc2c1c5358d791cd474f Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Mon, 26 Jun 2023 21:02:18 +0200 Subject: Improve prompts. --- play.js | 37 +++++++++++++++++++++++++++---------- 1 file changed, 27 insertions(+), 10 deletions(-) (limited to 'play.js') diff --git a/play.js b/play.js index 710610a..90408e6 100644 --- a/play.js +++ b/play.js @@ -160,11 +160,11 @@ const REGION_NAME = [ "Aegyptus", "Africa", "Hispania", - "Alamanni Homeland", - "Franks Homeland", - "Goths Homeland", - "Sassanids Homeland", - "Nomads Homeland", + "Alamanni homeland", + "Frank homeland", + "Goth homeland", + "Sassanid homeland", + "Nomad homeland", "Mare Occidentale", "Mare Orientale", "Oceanus Atlanticus", @@ -686,7 +686,20 @@ let ui = { document.getElementById("mapsvg").getElementById("region_oceanus_atlanticus"), document.getElementById("mapsvg").getElementById("region_pontus_euxinus"), ], - capital: [], + capital: [ + document.getElementById("capital_italia"), + document.getElementById("capital_asia"), + document.getElementById("capital_gallia"), + document.getElementById("capital_macedonia"), + document.getElementById("capital_pannonia"), + document.getElementById("capital_thracia"), + document.getElementById("capital_britannia"), + document.getElementById("capital_galatia"), + document.getElementById("capital_syria"), + document.getElementById("capital_aegyptus"), + document.getElementById("capital_africa"), + document.getElementById("capital_hispania"), + ], quaestor: [], amphitheater: [], basilica: [], @@ -845,7 +858,6 @@ function on_init() { for (let region = 0; region < 12; ++region) { ui.mcastra[region] = create_thing({ className: "castra hide" }) ui.militia[region] = create_thing({ className: "militia hide", my_action: "militia", my_id: region }) - ui.capital[region] = document.getElementById(REGION_NAME[region] + "_Capital") ui.quaestor[region] = create_thing({ className: "quaestor hide" }) ui.quaestor[region].style.left = (LAYOUT_QUAESTOR[region][0] + 16) + "px" ui.quaestor[region].style.top = (LAYOUT_QUAESTOR[region][1]) + "px" @@ -1377,8 +1389,13 @@ function on_update() { ui.crisis.className = "p_" + PLAYER_CLASS[view.current] + " c" + (view.crisis[1] + view.crisis[2]) ui.dice[0].className = "dice black d" + view.crisis[1] ui.dice[1].className = "dice white d" + view.crisis[2] - ui.dice[2].className = "dice black d" + view.crisis[3] - ui.dice[3].className = "dice white d" + view.crisis[4] + if (view.crisis[0] >= 0) { + ui.dice[2].className = "dice black d" + view.crisis[3] + ui.dice[3].className = "dice white d" + view.crisis[4] + } else { + ui.dice[2].className = "dice black hide" + ui.dice[3].className = "dice white hide" + } ui.active_event.replaceChildren() ui.active_event.appendChild(ui.event_cards[view.event]) @@ -1484,7 +1501,7 @@ function sub_card_1(match) { } function sub_card_x(match, p1, p2) { - return p1 + "\xa0" + p2 + return p1 + " " + p2 } function on_log(text) { -- cgit v1.2.3