v2.0.0: fixed antimagic not preventing shield battery use
This commit is contained in:
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user