diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/Hero.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/Hero.java index 8f67db27e..b6e19ace5 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/Hero.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/Hero.java @@ -452,8 +452,11 @@ public class Hero extends Char { @Override public void spend( float time ) { TimekeepersHourglass.timeFreeze buff = buff(TimekeepersHourglass.timeFreeze.class); - if (!(buff != null && buff.processTime(time))) - super.spend( time ); + if (buff != null){ + buff.processTime(time); + } else { + super.spend(time); + } } public void spendAndNext( float time ) { 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 2800aa61f..a6f07063e 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 @@ -105,6 +105,7 @@ public class TimekeepersHourglass extends Artifact { activeBuff = new timeFreeze(); activeBuff.attachTo(Dungeon.hero); + ((timeFreeze)activeBuff).processTime(0f); } }; } @@ -269,11 +270,11 @@ public class TimekeepersHourglass extends Artifact { public class timeFreeze extends ArtifactBuff { - float partialTime = 0f; + float partialTime = 1f; ArrayList presses = new ArrayList(); - public boolean processTime(float time){ + public void processTime(float time){ partialTime += time; while (partialTime >= 1f){ @@ -283,11 +284,10 @@ public class TimekeepersHourglass extends Artifact { updateQuickslot(); - if (charge <= 0){ + if (charge < 0){ + charge = 0; detach(); - return false; - } else - return true; + } }