From 9c8953b48bb6848691b866e10b54b3a499e69e2f Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Mon, 3 Oct 2022 13:33:36 -0400 Subject: [PATCH] v1.4.0: fixed various quirks with hourglass charge spending --- .../items/artifacts/TimekeepersHourglass.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/TimekeepersHourglass.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/TimekeepersHourglass.java index 0c47ed954..c71b73150 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/TimekeepersHourglass.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/TimekeepersHourglass.java @@ -116,6 +116,8 @@ public class TimekeepersHourglass extends Artifact { activeBuff = new timeStasis(); Talent.onArtifactUsed(Dungeon.hero); activeBuff.attachTo(Dungeon.hero); + charge--; + updateQuickslot(); } else if (index == 1) { GLog.i( Messages.get(TimekeepersHourglass.class, "onfreeze") ); GameScene.flash(0x80FFFFFF); @@ -328,7 +330,7 @@ public class TimekeepersHourglass extends Artifact { type = buffType.POSITIVE; } - float turnsToCost = 0f; + float turnsToCost = 2f; ArrayList presses = new ArrayList<>(); @@ -343,7 +345,7 @@ public class TimekeepersHourglass extends Artifact { updateQuickslot(); - if (charge < 0){ + if (charge < 0 || charge == 0 && turnsToCost <= 0){ charge = 0; detach(); } @@ -407,12 +409,12 @@ public class TimekeepersHourglass extends Artifact { @Override public float iconFadePercent() { - return Math.max(0, (2f - (turnsToCost+1)) / 2f); + return Math.max(0, (2f - turnsToCost) / 2f); } @Override public String iconTextDisplay() { - return Integer.toString((int)turnsToCost+1); + return Integer.toString((int)turnsToCost); } private static final String PRESSES = "presses";