v3.3.0: fixed no monk energy gain if killing with ability at max energy
This commit is contained in:
@@ -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)) {
|
||||
|
||||
Reference in New Issue
Block a user