From ead6874c7b1f8dd54df09aa1278a9208879f86b8 Mon Sep 17 00:00:00 2001 From: Gootzi <124401935+ramen-cat-coder@users.noreply.github.com> Date: Sun, 20 Jul 2025 04:07:57 -0700 Subject: [PATCH 1/3] Update common --- src/main/java/common | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/common b/src/main/java/common index a2e7ef4e..840ec1f1 160000 --- a/src/main/java/common +++ b/src/main/java/common @@ -1 +1 @@ -Subproject commit a2e7ef4ed5aabede4ee7be9a046d477b790c122e +Subproject commit 840ec1f16530b1f3d6ae9f8e70a0031629fe60e3 From d26863ef7f60a19994b08a420fdd57d2125bd10d Mon Sep 17 00:00:00 2001 From: Gootzi <124401935+ramen-cat-coder@users.noreply.github.com> Date: Sun, 20 Jul 2025 04:39:14 -0700 Subject: [PATCH 2/3] Fix the cooldown bar and clarify code --- src/main/java/page/battle/BattleBox.java | 50 +++++++++++++++++++----- 1 file changed, 40 insertions(+), 10 deletions(-) diff --git a/src/main/java/page/battle/BattleBox.java b/src/main/java/page/battle/BattleBox.java index 9c2ab970..013b9614 100644 --- a/src/main/java/page/battle/BattleBox.java +++ b/src/main/java/page/battle/BattleBox.java @@ -452,13 +452,28 @@ private void drawLineupWithTwoRows(FakeGraphics g, int w, int h, float hr, float int dw = (int) (hr * 10); int dh = (int) (hr * 12); - float cd = 1f * cool / sb.elu.maxC[i][j]; + float cooldownscalar = 1f * cool / sb.elu.maxC[i][j]; + cooldownscalar = 1f - cooldownscalar; - int xw = (int) (cd * (iw - dw * 2)); - int xw2 = (int) (iw - dw * 2); + int xwidth = (int) (iw - dw * 2); + int startX = x + iw - dw - xwidth; + int startY = y + ih - dh * 2; - g.colRect(x + iw - dw - xw2, y + ih - dh * 2, xw2, dh, 0, 0, 0, -1); - g.colRect((x + dw + 2f), (y + ih - dh * 2) + 2f, (iw - dw * 2 - xw) - 4, dh - 4, 0, 255, 255, -1); + boolean full = (h >= 500); // not sure how to get the BattleInfoPage from this, so this is a 'temporary' workaround that breaks on small window sizes + + boolean windowTooSmall = (h < 200); // see if the window is really small to not break the drawing + // really small windows break lots of BCU drawing anyways, but it's worth it to check + + g.colRect(startX, startY, xwidth, dh, 0, 0, 0, -1); // background draw black square + if (full) { + g.colRect(startX + 2, startY + 2, (xwidth - 4) * cooldownscalar, dh - 4, 0, 255, 255, -1); + } else { + if (windowTooSmall) { + g.colRect(startX , startY, xwidth * cooldownscalar, dh, 0, 255, 255, -1); + } else { + g.colRect(startX + 1, startY + 1, (xwidth - 2) * cooldownscalar, dh - 2, 0, 255, 255, -1); + } + } } else if (canPlay && !sb.summonerSummoned[i][j]) { Res.getCost(pri / 100, !b, setSym(g, hr, x + iw, y + ih, 3)); if (sb.elu.tick[i][j] == 1) { @@ -597,13 +612,28 @@ private void drawLineup(FakeGraphics g, int w, int h, float hr, float term, bool int dw = (int) (hr * 10); int dh = (int) (hr * 12); - float cd = 1f * cool / sb.elu.maxC[index][i]; + float cooldownscalar = 1f * cool / sb.elu.maxC[index][i]; + cooldownscalar = 1f - cooldownscalar; - int xw = (int) (cd * (iw - dw * 2)); - int xw2 = (int) (iw - dw * 2); + int xwidth = (int) (iw - dw * 2); + int startX = x + iw - dw - xwidth; + int startY = y + ih - dh * 2; - g.colRect(x + iw - dw - xw2, y + ih - dh * 2, xw2, dh, 0, 0, 0, -1); - g.colRect((x + dw + 2f), (y + ih - dh * 2) + 2f, (iw - dw * 2 - xw) - 4, dh - 4, 0, 255, 255, -1); + boolean full = (h >= 500); // not sure how to get the BattleInfoPage from this, so this is a 'temporary' workaround that breaks on small window sizes + + boolean windowTooSmall = (h < 200); // see if the window is really small to not break the drawing + // really small windows break lots of BCU drawing anyways, but it's worth it to check + + g.colRect(startX, startY, xwidth, dh, 0, 0, 0, -1); // background draw black square + if (full) { + g.colRect(startX + 2, startY + 2, (xwidth - 4) * cooldownscalar, dh - 4, 0, 255, 255, -1); + } else { + if (windowTooSmall) { + g.colRect(startX , startY, xwidth * cooldownscalar, dh, 0, 255, 255, -1); + } else { + g.colRect(startX + 1, startY + 1, (xwidth - 2) * cooldownscalar, dh - 2, 0, 255, 255, -1); + } + } } else if (pri != -1 && !sb.summonerSummoned[index][i]) { Res.getCost(pri / 100, !b, setSym(g, hr, x + iw, y + ih, 3)); } From 05a953e62c6c401ce80ef58a18507e902d183f7f Mon Sep 17 00:00:00 2001 From: Gootzi <124401935+ramen-cat-coder@users.noreply.github.com> Date: Sun, 20 Jul 2025 04:42:03 -0700 Subject: [PATCH 3/3] Revert "Update common" This reverts commit ead6874c7b1f8dd54df09aa1278a9208879f86b8. --- src/main/java/common | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/common b/src/main/java/common index 840ec1f1..a2e7ef4e 160000 --- a/src/main/java/common +++ b/src/main/java/common @@ -1 +1 @@ -Subproject commit 840ec1f16530b1f3d6ae9f8e70a0031629fe60e3 +Subproject commit a2e7ef4ed5aabede4ee7be9a046d477b790c122e