v0.3.1: fixed a bug where new lightning traps were reducing wand charges instead of increasing them.

This commit is contained in:
Evan Debenham 2015-07-07 15:05:46 -04:00
parent 737563f256
commit 8f2b52e4f8

View File

@ -79,7 +79,7 @@ public class LightningTrap extends Trap {
Item item = heap.items.peek();
if (item instanceof Wand){
Wand wand = (Wand)item;
((Wand)item).curCharges += (int)Math.ceil((wand.curCharges - wand.maxCharges)/2f);
((Wand)item).curCharges += (int)Math.ceil((wand.maxCharges - wand.curCharges)/2f);
}
}