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