From 54ea689dee9717401661c495b789abf6ad13d80e Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Thu, 24 Feb 2022 13:11:51 -0500 Subject: [PATCH] v1.2.0: fixed various errors with the Timekeeper's Hourglass --- .../actors/buffs/Burning.java | 3 ++- .../items/artifacts/TimekeepersHourglass.java | 14 ++++++++------ 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Burning.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Burning.java index 02ad0457f..0a97ead1d 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Burning.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Burning.java @@ -31,6 +31,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Thief; import com.shatteredpixel.shatteredpixeldungeon.effects.particles.ElmoParticle; import com.shatteredpixel.shatteredpixeldungeon.items.Heap; import com.shatteredpixel.shatteredpixeldungeon.items.Item; +import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.TimekeepersHourglass; import com.shatteredpixel.shatteredpixeldungeon.items.food.ChargrilledMeat; import com.shatteredpixel.shatteredpixeldungeon.items.food.FrozenCarpaccio; import com.shatteredpixel.shatteredpixeldungeon.items.food.MysteryMeat; @@ -91,7 +92,7 @@ public class Burning extends Buff implements Hero.Doom { int damage = Random.NormalIntRange( 1, 3 + Dungeon.depth/4 ); Buff.detach( target, Chill.class); - if (target instanceof Hero) { + if (target instanceof Hero && target.buff(TimekeepersHourglass.timeStasis.class) == null) { Hero hero = (Hero)target; 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 feec98bb9..7d93fe6dd 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 @@ -262,17 +262,19 @@ public class TimekeepersHourglass extends Artifact { int usedCharge = Math.min(charge, 2); //buffs always act last, so the stasis buff should end a turn early. - spend((5*usedCharge) - 1); - ((Hero) target).spendAndNext(5*usedCharge); + spend(5*usedCharge); //shouldn't punish the player for going into stasis frequently Hunger hunger = Buff.affect(target, Hunger.class); - if (hunger != null && !hunger.isStarving()) - hunger.satisfy(5*usedCharge); + if (hunger != null && !hunger.isStarving()) { + hunger.satisfy(5 * usedCharge); + } charge -= usedCharge; target.invisible++; + target.paralysed++; + target.next(); updateQuickslot(); @@ -294,8 +296,8 @@ public class TimekeepersHourglass extends Artifact { @Override public void detach() { - if (target.invisible > 0) - target.invisible --; + if (target.invisible > 0) target.invisible--; + if (target.paralysed > 0) target.paralysed--; super.detach(); activeBuff = null; Dungeon.observe();