From c68210e1f4399296983555f23faf915958f0f4a6 Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Fri, 21 Apr 2023 13:58:39 -0400 Subject: [PATCH] v2.1.0: fixed speedy stealth +1 requiring existing momentum --- .../shatteredpixeldungeon/actors/buffs/Momentum.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Momentum.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Momentum.java index a4fd544d6..bd52afb0c 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Momentum.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Momentum.java @@ -70,7 +70,8 @@ public class Momentum extends Buff implements ActionIndicator.Action { if (freerunCooldown == 0 && !freerunning() && target.invisible > 0 && Dungeon.hero.pointsInTalent(Talent.SPEEDY_STEALTH) >= 1){ momentumStacks = Math.min(momentumStacks + 2, 10); movedLastTurn = true; - ActionIndicator.refresh(); + ActionIndicator.setAction(this); + BuffIndicator.refreshHero(); } if (freerunTurns > 0){ @@ -81,7 +82,7 @@ public class Momentum extends Buff implements ActionIndicator.Action { momentumStacks = (int)GameMath.gate(0, momentumStacks-1, Math.round(momentumStacks * 0.667f)); if (momentumStacks <= 0) { ActionIndicator.clearAction(this); - if (freerunCooldown <= 0) detach(); + BuffIndicator.refreshHero(); } else { ActionIndicator.refresh(); } @@ -98,6 +99,7 @@ public class Momentum extends Buff implements ActionIndicator.Action { postpone(target.cooldown()+(1/target.speed())); momentumStacks = Math.min(momentumStacks + 1, 10); ActionIndicator.setAction(this); + BuffIndicator.refreshHero(); } } @@ -125,7 +127,8 @@ public class Momentum extends Buff implements ActionIndicator.Action { @Override public int icon() { - return BuffIndicator.MOMENTUM; + if (momentumStacks > 0 || freerunCooldown > 0) return BuffIndicator.MOMENTUM; + else return BuffIndicator.NONE; } @Override