v3.1.0: fixed a crash with lethal defense

This commit is contained in:
Evan Debenham
2025-05-20 14:43:09 -04:00
parent b95607ead0
commit 15fe48d785

View File

@@ -410,10 +410,8 @@ public class Combo extends Buff implements ActionIndicator.Action {
ch.sprite.bloodBurstA(target.sprite.center(), aoeHit);
ch.sprite.flash();
if (!ch.isAlive()
&& hero.hasTalent(Talent.LETHAL_DEFENSE)
&& hero.buff(BrokenSeal.WarriorShield.class) != null) {
hero.buff(BrokenSeal.WarriorShield.class).reduceCooldown(hero.pointsInTalent(Talent.LETHAL_DEFENSE)/3f);
if (!ch.isAlive() && hero.hasTalent(Talent.LETHAL_DEFENSE)) {
Buff.affect(hero, BrokenSeal.WarriorShield.class).reduceCooldown(hero.pointsInTalent(Talent.LETHAL_DEFENSE)/3f);
}
}
}
@@ -466,7 +464,7 @@ public class Combo extends Buff implements ActionIndicator.Action {
if (!enemy.isAlive() || (!wasAlly && enemy.alignment == target.alignment)) {
if (hero.hasTalent(Talent.LETHAL_DEFENSE)){
hero.buff(BrokenSeal.WarriorShield.class).reduceCooldown(hero.pointsInTalent(Talent.LETHAL_DEFENSE)/3f);
Buff.affect(hero, BrokenSeal.WarriorShield.class).reduceCooldown(hero.pointsInTalent(Talent.LETHAL_DEFENSE)/3f);
}
}