v2.2.0: improved interactions between monk abilities and time freeze

This commit is contained in:
Evan Debenham
2023-10-11 16:57:07 -04:00
parent cbbbb22298
commit a768e9d398

View File

@@ -55,6 +55,7 @@ import com.watabou.noosa.Visual;
import com.watabou.noosa.audio.Sample;
import com.watabou.utils.Bundle;
import com.watabou.utils.Callback;
import com.watabou.utils.GameMath;
public class MonkEnergy extends Buff implements ActionIndicator.Action {
@@ -84,7 +85,7 @@ public class MonkEnergy extends Buff implements ActionIndicator.Action {
@Override
public float iconFadePercent() {
return Math.max(0, cooldown/MAX_COOLDOWN);
return GameMath.gate(0, cooldown/MAX_COOLDOWN, 1);
}
@Override
@@ -204,7 +205,7 @@ public class MonkEnergy extends Buff implements ActionIndicator.Action {
public void abilityUsed( MonkAbility abil ){
energy -= abil.energyCost();
cooldown = abil.cooldown();
cooldown = abil.cooldown() + (int)target.cooldown();
if (target instanceof Hero && ((Hero) target).hasTalent(Talent.COMBINED_ENERGY)
&& abil.energyCost() >= 5-((Hero) target).pointsInTalent(Talent.COMBINED_ENERGY)) {
@@ -314,7 +315,6 @@ public class MonkEnergy extends Buff implements ActionIndicator.Action {
@Override
public int cooldown() {
//1 less turn as no time is spent flurrying
return Dungeon.hero.buff(JustHitTracker.class) != null ? 0 : 5;
}
@@ -401,8 +401,7 @@ public class MonkEnergy extends Buff implements ActionIndicator.Action {
@Override
public int cooldown() {
//1 less if focus was instant
return Buff.affect(Dungeon.hero, MonkEnergy.class).abilitiesEmpowered(Dungeon.hero) ? 5 : 6;
return 5;
}
@Override
@@ -461,7 +460,7 @@ public class MonkEnergy extends Buff implements ActionIndicator.Action {
@Override
public int cooldown() {
return 5; //1 less turn as no time is spent dashing
return 5;
}
@Override
@@ -528,7 +527,7 @@ public class MonkEnergy extends Buff implements ActionIndicator.Action {
@Override
public int cooldown() {
return 6;
return 5;
}
@Override
@@ -620,9 +619,8 @@ public class MonkEnergy extends Buff implements ActionIndicator.Action {
}
@Override
//longer to account for turns spent meditating
public int cooldown() {
return 10;
return 5;
}
@Override
@@ -653,6 +651,11 @@ public class MonkEnergy extends Buff implements ActionIndicator.Action {
}
Actor.addDelayed(new Actor() {
{
actPriority = VFX_PRIO;
}
@Override
protected boolean act() {
Buff.affect(hero, Recharging.class, 8f);