v1.4.0: fixed various quirks with hourglass charge spending

This commit is contained in:
Evan Debenham
2022-10-03 13:33:36 -04:00
parent 3024e4df29
commit 9c8953b48b
@@ -116,6 +116,8 @@ public class TimekeepersHourglass extends Artifact {
activeBuff = new timeStasis(); activeBuff = new timeStasis();
Talent.onArtifactUsed(Dungeon.hero); Talent.onArtifactUsed(Dungeon.hero);
activeBuff.attachTo(Dungeon.hero); activeBuff.attachTo(Dungeon.hero);
charge--;
updateQuickslot();
} else if (index == 1) { } else if (index == 1) {
GLog.i( Messages.get(TimekeepersHourglass.class, "onfreeze") ); GLog.i( Messages.get(TimekeepersHourglass.class, "onfreeze") );
GameScene.flash(0x80FFFFFF); GameScene.flash(0x80FFFFFF);
@@ -328,7 +330,7 @@ public class TimekeepersHourglass extends Artifact {
type = buffType.POSITIVE; type = buffType.POSITIVE;
} }
float turnsToCost = 0f; float turnsToCost = 2f;
ArrayList<Integer> presses = new ArrayList<>(); ArrayList<Integer> presses = new ArrayList<>();
@@ -343,7 +345,7 @@ public class TimekeepersHourglass extends Artifact {
updateQuickslot(); updateQuickslot();
if (charge < 0){ if (charge < 0 || charge == 0 && turnsToCost <= 0){
charge = 0; charge = 0;
detach(); detach();
} }
@@ -407,12 +409,12 @@ public class TimekeepersHourglass extends Artifact {
@Override @Override
public float iconFadePercent() { public float iconFadePercent() {
return Math.max(0, (2f - (turnsToCost+1)) / 2f); return Math.max(0, (2f - turnsToCost) / 2f);
} }
@Override @Override
public String iconTextDisplay() { public String iconTextDisplay() {
return Integer.toString((int)turnsToCost+1); return Integer.toString((int)turnsToCost);
} }
private static final String PRESSES = "presses"; private static final String PRESSES = "presses";