From b4ad5080511b1098cc8e1a1bdd42e7fe4976dccb Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Tue, 7 Nov 2023 19:33:56 +0100 Subject: Add +80 legacy token. --- images/blue_legacy_80.png | Bin 0 -> 6473 bytes images/green_legacy_80.png | Bin 0 -> 6601 bytes images/red_legacy_80.png | Bin 0 -> 6239 bytes images/yellow_legacy_80.png | Bin 0 -> 7117 bytes play.css | 6 +++++- play.js | 8 ++++++-- tools/crop.sh | 5 +++++ tools/original/blue_legacy_80.png | Bin 0 -> 8514 bytes tools/original/green_legacy_80.png | Bin 0 -> 8680 bytes tools/original/red_legacy_80.png | Bin 0 -> 8447 bytes tools/original/yellow_legacy_80.png | Bin 0 -> 8610 bytes 11 files changed, 16 insertions(+), 3 deletions(-) create mode 100644 images/blue_legacy_80.png create mode 100644 images/green_legacy_80.png create mode 100644 images/red_legacy_80.png create mode 100644 images/yellow_legacy_80.png create mode 100644 tools/original/blue_legacy_80.png create mode 100644 tools/original/green_legacy_80.png create mode 100644 tools/original/red_legacy_80.png create mode 100644 tools/original/yellow_legacy_80.png diff --git a/images/blue_legacy_80.png b/images/blue_legacy_80.png new file mode 100644 index 0000000..51fc28f Binary files /dev/null and b/images/blue_legacy_80.png differ diff --git a/images/green_legacy_80.png b/images/green_legacy_80.png new file mode 100644 index 0000000..81e6a06 Binary files /dev/null and b/images/green_legacy_80.png differ diff --git a/images/red_legacy_80.png b/images/red_legacy_80.png new file mode 100644 index 0000000..213ae2a Binary files /dev/null and b/images/red_legacy_80.png differ diff --git a/images/yellow_legacy_80.png b/images/yellow_legacy_80.png new file mode 100644 index 0000000..934401f Binary files /dev/null and b/images/yellow_legacy_80.png differ diff --git a/play.css b/play.css index 82480a7..2b2946c 100644 --- a/play.css +++ b/play.css @@ -412,7 +412,7 @@ body.p2 #npg_galatia { display: block } border-radius: 0; } -.governor, .legacy, .legacy_40 { +.governor, .legacy, .legacy_40, .legacy_80 { width: 50px; height: 50px; background-size: 50px 50px; @@ -501,6 +501,10 @@ body.shift .shapur.inactive { background-image: url(images/shapur.png) } .green.legacy_40 { background-image: url(images/green_legacy_40.png) } .red.legacy_40 { background-image: url(images/red_legacy_40.png) } .yellow.legacy_40 { background-image: url(images/yellow_legacy_40.png) } +.blue.legacy_80 { background-image: url(images/blue_legacy_80.png) } +.green.legacy_80 { background-image: url(images/green_legacy_80.png) } +.red.legacy_80 { background-image: url(images/red_legacy_80.png) } +.yellow.legacy_80 { background-image: url(images/yellow_legacy_80.png) } .blue.general { background-image: url(images/blue_general.png) } .green.general { background-image: url(images/green_general.png) } .red.general { background-image: url(images/red_general.png) } 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) } diff --git a/tools/crop.sh b/tools/crop.sh index 11ee84b..8a96707 100644 --- a/tools/crop.sh +++ b/tools/crop.sh @@ -112,6 +112,11 @@ resize $CIRCLE tools/original/green_governor.png resize $CIRCLE tools/original/green_legacy.png resize $CIRCLE tools/original/green_legacy_40.png +resize $CIRCLE tools/original/red_legacy_80.png +resize $CIRCLE tools/original/blue_legacy_80.png +resize $CIRCLE tools/original/yellow_legacy_80.png +resize $CIRCLE tools/original/green_legacy_80.png + resize $CIRCLE tools/original/blue_governor_emperor.png resize $CIRCLE tools/original/green_governor_emperor.png resize $CIRCLE tools/original/red_governor_emperor.png diff --git a/tools/original/blue_legacy_80.png b/tools/original/blue_legacy_80.png new file mode 100644 index 0000000..84920c4 Binary files /dev/null and b/tools/original/blue_legacy_80.png differ diff --git a/tools/original/green_legacy_80.png b/tools/original/green_legacy_80.png new file mode 100644 index 0000000..ad13d15 Binary files /dev/null and b/tools/original/green_legacy_80.png differ diff --git a/tools/original/red_legacy_80.png b/tools/original/red_legacy_80.png new file mode 100644 index 0000000..fb1a880 Binary files /dev/null and b/tools/original/red_legacy_80.png differ diff --git a/tools/original/yellow_legacy_80.png b/tools/original/yellow_legacy_80.png new file mode 100644 index 0000000..4046284 Binary files /dev/null and b/tools/original/yellow_legacy_80.png differ -- cgit v1.2.3