summaryrefslogtreecommitdiff
path: root/ui.js
diff options
context:
space:
mode:
Diffstat (limited to 'ui.js')
-rw-r--r--ui.js17
1 files changed, 17 insertions, 0 deletions
diff --git a/ui.js b/ui.js
index 6502cea..dcf5648 100644
--- a/ui.js
+++ b/ui.js
@@ -11,6 +11,18 @@ const ENGLAND = "England";
const FRANCE = "France";
const GERMANIA = "Germania";
+const KINGDOM = {
+ "Syria": "Syria",
+ "Jerusalem": "Kingdom of Jerusalem",
+ "Antioch": "Principality of Antioch",
+ "Tripoli": "County of Tripoli",
+};
+
+const VICTORY_TOWNS = [
+ "Aleppo", "Damascus", "Egypt",
+ "Antioch", "Tripoli", "Acre", "Jerusalem"
+];
+
let label_layout = window.localStorage['crusader-rex/label-layout'] || 'spread';
function set_spread_layout() {
@@ -65,6 +77,11 @@ function on_focus_town(evt) {
let text = where;
if (where in SHIELDS)
text += " \u2014 " + SHIELDS[where].join(", ");
+ let kingdom = KINGDOM[TOWNS[where].region];
+ if (kingdom)
+ text += " \u2014 " + kingdom;
+ if (VICTORY_TOWNS.includes(where))
+ text += " \u2014 1 VP";
document.getElementById("status").textContent = text;
}