v2.1.1: fixed shield battery being usable with an empty wand

This commit is contained in:
Evan Debenham
2023-06-06 12:09:30 -04:00
parent 52f33c4413
commit 242e426b9d

View File

@@ -579,6 +579,11 @@ public abstract class Wand extends Item {
return;
}
if (curWand.curCharges == 0){
GLog.w( Messages.get(Wand.class, "fizzles") );
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));