From 70e9f3f9f7eb8d517591859a81df470fa7ed395b Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Sun, 13 Apr 2025 11:34:16 -0400 Subject: [PATCH] v3.1.0: fixed lethal defense not using new logic in all places --- .../shatteredpixeldungeon/actors/buffs/Combo.java | 12 +++++------- 1 file changed, 5 insertions(+), 7 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 0990c55db..b78f338aa 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 @@ -30,7 +30,6 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero; import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Talent; import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.DwarfKing; import com.shatteredpixel.shatteredpixeldungeon.effects.FloatingText; -import com.shatteredpixel.shatteredpixeldungeon.items.BrokenSeal; import com.shatteredpixel.shatteredpixeldungeon.items.wands.WandOfBlastWave; import com.shatteredpixel.shatteredpixeldungeon.mechanics.Ballistica; import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; @@ -42,13 +41,13 @@ import com.shatteredpixel.shatteredpixeldungeon.ui.ActionIndicator; import com.shatteredpixel.shatteredpixeldungeon.ui.AttackIndicator; import com.shatteredpixel.shatteredpixeldungeon.ui.BuffIndicator; import com.shatteredpixel.shatteredpixeldungeon.ui.HeroIcon; -import com.watabou.utils.BArray; import com.shatteredpixel.shatteredpixeldungeon.utils.GLog; import com.shatteredpixel.shatteredpixeldungeon.windows.WndCombo; import com.watabou.noosa.BitmapText; import com.watabou.noosa.Image; import com.watabou.noosa.Visual; import com.watabou.noosa.audio.Sample; +import com.watabou.utils.BArray; import com.watabou.utils.Bundle; import com.watabou.utils.Callback; import com.watabou.utils.PathFinder; @@ -466,11 +465,10 @@ 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) != null){ - BrokenSeal.WarriorShield shield = hero.buff(BrokenSeal.WarriorShield.class); - int shieldAmt = Math.round(shield.maxShield() * hero.pointsInTalent(Talent.LETHAL_DEFENSE) / 3f); - shield.supercharge(shieldAmt); - hero.sprite.showStatusWithIcon(CharSprite.POSITIVE, Integer.toString(shieldAmt), FloatingText.SHIELDING); + if (hero.hasTalent(Talent.LETHAL_DEFENSE)){ + int shieldToGive = Math.round(6.67f * hero.pointsInTalent(Talent.LETHAL_DEFENSE)); + hero.sprite.showStatusWithIcon(CharSprite.POSITIVE, Integer.toString(shieldToGive), FloatingText.SHIELDING); + Buff.affect(hero, Barrier.class).setShield(shieldToGive); } }