From 929d9a85dd2e54245ad137db0977bddc3d52be6e Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Sun, 7 Jun 2015 02:27:00 -0400 Subject: [PATCH] v0.3.0c: fixed some bugs with the +1 charges effect from the mages staff --- .../items/weapon/melee/MagesStaff.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/MagesStaff.java b/src/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/MagesStaff.java index 56030635b..e619d742d 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/MagesStaff.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/MagesStaff.java @@ -64,6 +64,7 @@ public class MagesStaff extends MeleeWeapon { wand.cursed = false; this.wand = wand; wand.maxCharges = Math.min(wand.maxCharges + 1, 10); + wand.curCharges = wand.maxCharges; } @Override @@ -151,6 +152,7 @@ public class MagesStaff extends MeleeWeapon { this.wand = wand; wand.maxCharges = Math.min(wand.maxCharges + 1, 10); + wand.curCharges = wand.maxCharges; wand.identify(); wand.cursed = false; wand.charge(owner); @@ -168,9 +170,12 @@ public class MagesStaff extends MeleeWeapon { //does not lose strength requirement if (wand != null) { + int curCharges = wand.curCharges; wand.upgrade(); //gives the wand one additional charge wand.maxCharges = Math.min(wand.maxCharges + 1, 10); + wand.curCharges = curCharges+1; + updateQuickslot(); } return this; @@ -183,9 +188,12 @@ public class MagesStaff extends MeleeWeapon { STR = 10; if (wand != null) { + int curCharges = wand.curCharges; wand.degrade(); //gives the wand one additional charge wand.maxCharges = Math.min(wand.maxCharges + 1, 10); + wand.curCharges = curCharges-1; + updateQuickslot(); } return this;