diff options
Diffstat (limited to 'play.js')
-rw-r--r-- | play.js | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -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) } |