From 15fe48d785a4307d68460e8df846f2530305d02e Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Tue, 20 May 2025 14:43:09 -0400 Subject: [PATCH] v3.1.0: fixed a crash with lethal defense --- .../shatteredpixeldungeon/actors/buffs/Combo.java | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Combo.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Combo.java index 08583373e..079f79761 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Combo.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Combo.java @@ -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); } }