summaryrefslogtreecommitdiff
path: root/play.js
diff options
context:
space:
mode:
Diffstat (limited to 'play.js')
-rw-r--r--play.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/play.js b/play.js
index d19fb46..f051aa5 100644
--- a/play.js
+++ b/play.js
@@ -1133,12 +1133,16 @@ function on_update() {
let legacy = view.legacy[pi]
let turns = view.emperor_turns[pi]
- if (legacy > 80)
+ if (legacy > 80) {
legacy -= 80
- if (legacy > 40) {
+ ui.legacy[pi].classList.toggle("legacy_80", true)
+ ui.legacy[pi].classList.toggle("legacy_40", false)
+ } else if (legacy > 40) {
legacy -= 40
+ ui.legacy[pi].classList.toggle("legacy_80", false)
ui.legacy[pi].classList.toggle("legacy_40", true)
} else {
+ ui.legacy[pi].classList.toggle("legacy_80", false)
ui.legacy[pi].classList.toggle("legacy_40", false)
}