v2.0.0: fixed antimagic not preventing shield battery use

This commit is contained in:
Evan Debenham
2022-11-14 14:32:58 -05:00
parent 1c633787a8
commit 55597433e1

View File

@@ -573,6 +573,12 @@ public abstract class Wand extends Item {
if (target == curUser.pos || cell == curUser.pos) {
if (target == curUser.pos && curUser.hasTalent(Talent.SHIELD_BATTERY)){
if (curUser.buff(MagicImmune.class) != null){
GLog.w( Messages.get(this, "no_magic") );
return;
}
float shield = curUser.HT * (0.04f*curWand.curCharges);
if (curUser.pointsInTalent(Talent.SHIELD_BATTERY) == 2) shield *= 1.5f;
Buff.affect(curUser, Barrier.class).setShield(Math.round(shield));