From 0ae1b05b22ed83f35e9d228a4d54ef70d9f7b0cb Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Wed, 21 Jan 2015 13:40:27 -0500 Subject: [PATCH] v0.2.3e: fixed a bug where Time Stasis would sometimes not drop invisibility. --- .../items/artifacts/TimekeepersHourglass.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/TimekeepersHourglass.java b/src/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/TimekeepersHourglass.java index 9d845e5b3..5ce170912 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/TimekeepersHourglass.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/TimekeepersHourglass.java @@ -235,13 +235,14 @@ public class TimekeepersHourglass extends Artifact { @Override public boolean act() { - target.invisible --; detach(); return true; } @Override public void detach() { + if (target.invisible > 0) + target.invisible --; super.detach(); activeBuff = null; Dungeon.observe(); @@ -326,8 +327,8 @@ public class TimekeepersHourglass extends Artifact { super.restoreFromBundle(bundle); int[] values = bundle.getIntArray( PRESSES ); - for (int i = 0; i < values.length; i ++) - presses.add(values[i]); + for (int value : values) + presses.add(value); partialTime = bundle.getFloat( PARTIALTIME ); }