diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/MonkEnergy.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/MonkEnergy.java index b43194ae9..f29b32e72 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/MonkEnergy.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/MonkEnergy.java @@ -64,7 +64,7 @@ public class MonkEnergy extends Buff implements ActionIndicator.Action { revivePersists = true; } - public float energy; + public float energy = 10; public int cooldown; //currently unused, abilities had cooldowns prior to v2.5 private static final float MAX_COOLDOWN = 5; @@ -191,7 +191,11 @@ public class MonkEnergy extends Buff implements ActionIndicator.Action { } energyGain *= enGainMulti; - energy = Math.min(energy+energyGain, energyCap()); + energy += energyGain; + //if we kill while using an ability, don't apply the cap yet, will be enforced after spending + if (target.buff(MonkAbility.UnarmedAbilityTracker.class) == null){ + energy = Math.min(energy, energyCap()); + } if (energy >= 1 && cooldown == 0){ ActionIndicator.setAction(this); @@ -206,6 +210,7 @@ public class MonkEnergy extends Buff implements ActionIndicator.Action { public void abilityUsed( MonkAbility abil ){ energy -= abil.energyCost(); + energy = Math.min(energy, energyCap()); if (target instanceof Hero && ((Hero) target).hasTalent(Talent.COMBINED_ENERGY) && abil.energyCost() >= 5-((Hero) target).pointsInTalent(Talent.COMBINED_ENERGY)) {