v3.1.0: fixed lethal defense not using new logic in all places
This commit is contained in:
@@ -30,7 +30,6 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
|
|||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Talent;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Talent;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.DwarfKing;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.DwarfKing;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.effects.FloatingText;
|
import com.shatteredpixel.shatteredpixeldungeon.effects.FloatingText;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.BrokenSeal;
|
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.wands.WandOfBlastWave;
|
import com.shatteredpixel.shatteredpixeldungeon.items.wands.WandOfBlastWave;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.mechanics.Ballistica;
|
import com.shatteredpixel.shatteredpixeldungeon.mechanics.Ballistica;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
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.AttackIndicator;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.ui.BuffIndicator;
|
import com.shatteredpixel.shatteredpixeldungeon.ui.BuffIndicator;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.ui.HeroIcon;
|
import com.shatteredpixel.shatteredpixeldungeon.ui.HeroIcon;
|
||||||
import com.watabou.utils.BArray;
|
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.utils.GLog;
|
import com.shatteredpixel.shatteredpixeldungeon.utils.GLog;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.windows.WndCombo;
|
import com.shatteredpixel.shatteredpixeldungeon.windows.WndCombo;
|
||||||
import com.watabou.noosa.BitmapText;
|
import com.watabou.noosa.BitmapText;
|
||||||
import com.watabou.noosa.Image;
|
import com.watabou.noosa.Image;
|
||||||
import com.watabou.noosa.Visual;
|
import com.watabou.noosa.Visual;
|
||||||
import com.watabou.noosa.audio.Sample;
|
import com.watabou.noosa.audio.Sample;
|
||||||
|
import com.watabou.utils.BArray;
|
||||||
import com.watabou.utils.Bundle;
|
import com.watabou.utils.Bundle;
|
||||||
import com.watabou.utils.Callback;
|
import com.watabou.utils.Callback;
|
||||||
import com.watabou.utils.PathFinder;
|
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 (!enemy.isAlive() || (!wasAlly && enemy.alignment == target.alignment)) {
|
||||||
if (hero.hasTalent(Talent.LETHAL_DEFENSE) && hero.buff(BrokenSeal.WarriorShield.class) != null){
|
if (hero.hasTalent(Talent.LETHAL_DEFENSE)){
|
||||||
BrokenSeal.WarriorShield shield = hero.buff(BrokenSeal.WarriorShield.class);
|
int shieldToGive = Math.round(6.67f * hero.pointsInTalent(Talent.LETHAL_DEFENSE));
|
||||||
int shieldAmt = Math.round(shield.maxShield() * hero.pointsInTalent(Talent.LETHAL_DEFENSE) / 3f);
|
hero.sprite.showStatusWithIcon(CharSprite.POSITIVE, Integer.toString(shieldToGive), FloatingText.SHIELDING);
|
||||||
shield.supercharge(shieldAmt);
|
Buff.affect(hero, Barrier.class).setShield(shieldToGive);
|
||||||
hero.sprite.showStatusWithIcon(CharSprite.POSITIVE, Integer.toString(shieldAmt), FloatingText.SHIELDING);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user