summaryrefslogtreecommitdiff
path: root/play.js
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2023-06-26 21:02:18 +0200
committerTor Andersson <tor@ccxvii.net>2023-07-07 19:05:52 +0200
commit5a4754c6f27b3ff80154dc2c1c5358d791cd474f (patch)
tree166d6b26ef414f96ace331d6cd0abd788d311b2b /play.js
parent09bec88e3ad8894217f4f426372e9d94b2ad1ba9 (diff)
downloadtime-of-crisis-5a4754c6f27b3ff80154dc2c1c5358d791cd474f.tar.gz
Improve prompts.
Diffstat (limited to 'play.js')
-rw-r--r--play.js37
1 files changed, 27 insertions, 10 deletions
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) {