summaryrefslogtreecommitdiff
path: root/play.js
diff options
context:
space:
mode:
Diffstat (limited to 'play.js')
-rw-r--r--play.js30
1 files changed, 18 insertions, 12 deletions
diff --git a/play.js b/play.js
index 9c4eb7c..3fb1ee1 100644
--- a/play.js
+++ b/play.js
@@ -635,8 +635,8 @@ let ui = {
document.getElementById("mapsvg").getElementById("region_alamanni"),
document.getElementById("mapsvg").getElementById("region_franks"),
document.getElementById("mapsvg").getElementById("region_goths"),
- document.getElementById("mapsvg").getElementById("region_nomads"),
document.getElementById("mapsvg").getElementById("region_sassanids"),
+ document.getElementById("mapsvg").getElementById("region_nomads"),
document.getElementById("mapsvg").getElementById("region_mare_occidentale"),
document.getElementById("mapsvg").getElementById("region_mare_orientale"),
@@ -955,6 +955,8 @@ function on_update() {
let legacy = view.legacy[pi]
let turns = view.emperor_turns[pi]
+ if (legacy > 80)
+ legacy -= 80
if (legacy > 40) {
legacy -= 40
ui.legacy[pi].classList.toggle("legacy_40", true)
@@ -1350,27 +1352,31 @@ function on_log(text) {
p.className = 'turn ' + text
}
- if (text.match(/^\.h1/)) {
+ if (text.match(/^\.h1 Red/)) {
text = text.substring(4)
- p.className = "h1"
+ p.className = "h1 p_red"
}
- else if (text.match(/^\.h2 Red/)) {
+ else if (text.match(/^\.h1 Blue/)) {
text = text.substring(4)
- p.className = "h2 p_red"
+ p.className = "h1 p_blue"
}
- else if (text.match(/^\.h2 Blue/)) {
+ else if (text.match(/^\.h1 Yellow/)) {
text = text.substring(4)
- p.className = "h2 p_blue"
+ p.className = "h1 p_yellow"
}
- else if (text.match(/^\.h2 Yellow/)) {
+ else if (text.match(/^\.h1 Green/)) {
text = text.substring(4)
- p.className = "h2 p_yellow"
+ p.className = "h1 p_green"
}
- else if (text.match(/^\.h2 Green/)) {
+ else if (text.match(/^\.h1/)) {
text = text.substring(4)
- p.className = "h2 p_green"
+ p.className = "h1"
+ }
+ else if (text.match(/^\.h4/)) {
+ text = text.substring(4)
+ p.className = "h3"
}
- if (text.match(/^\.h3/)) {
+ else if (text.match(/^\.h3/)) {
text = text.substring(4)
p.className = "h3"
}