diff options
author | Tor Andersson <tor@ccxvii.net> | 2023-11-07 19:33:56 +0100 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2023-11-07 19:33:56 +0100 |
commit | b4ad5080511b1098cc8e1a1bdd42e7fe4976dccb (patch) | |
tree | 2089d418a78d449da6d8e0e550a46e8a57f8cd92 /play.js | |
parent | 3096093ea5632a6405c1368b7cd64316d8695502 (diff) | |
download | time-of-crisis-b4ad5080511b1098cc8e1a1bdd42e7fe4976dccb.tar.gz |
Add +80 legacy token.
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) } |