summaryrefslogtreecommitdiff
path: root/play.js
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2023-11-07 19:33:56 +0100
committerTor Andersson <tor@ccxvii.net>2023-11-07 19:33:56 +0100
commitb4ad5080511b1098cc8e1a1bdd42e7fe4976dccb (patch)
tree2089d418a78d449da6d8e0e550a46e8a57f8cd92 /play.js
parent3096093ea5632a6405c1368b7cd64316d8695502 (diff)
downloadtime-of-crisis-b4ad5080511b1098cc8e1a1bdd42e7fe4976dccb.tar.gz
Add +80 legacy token.
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)
}