v0.3.0c: fixed some bugs with the +1 charges effect from the mages staff
This commit is contained in:
parent
f1e4d35792
commit
929d9a85dd
|
@ -64,6 +64,7 @@ public class MagesStaff extends MeleeWeapon {
|
||||||
wand.cursed = false;
|
wand.cursed = false;
|
||||||
this.wand = wand;
|
this.wand = wand;
|
||||||
wand.maxCharges = Math.min(wand.maxCharges + 1, 10);
|
wand.maxCharges = Math.min(wand.maxCharges + 1, 10);
|
||||||
|
wand.curCharges = wand.maxCharges;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -151,6 +152,7 @@ public class MagesStaff extends MeleeWeapon {
|
||||||
|
|
||||||
this.wand = wand;
|
this.wand = wand;
|
||||||
wand.maxCharges = Math.min(wand.maxCharges + 1, 10);
|
wand.maxCharges = Math.min(wand.maxCharges + 1, 10);
|
||||||
|
wand.curCharges = wand.maxCharges;
|
||||||
wand.identify();
|
wand.identify();
|
||||||
wand.cursed = false;
|
wand.cursed = false;
|
||||||
wand.charge(owner);
|
wand.charge(owner);
|
||||||
|
@ -168,9 +170,12 @@ public class MagesStaff extends MeleeWeapon {
|
||||||
//does not lose strength requirement
|
//does not lose strength requirement
|
||||||
|
|
||||||
if (wand != null) {
|
if (wand != null) {
|
||||||
|
int curCharges = wand.curCharges;
|
||||||
wand.upgrade();
|
wand.upgrade();
|
||||||
//gives the wand one additional charge
|
//gives the wand one additional charge
|
||||||
wand.maxCharges = Math.min(wand.maxCharges + 1, 10);
|
wand.maxCharges = Math.min(wand.maxCharges + 1, 10);
|
||||||
|
wand.curCharges = curCharges+1;
|
||||||
|
updateQuickslot();
|
||||||
}
|
}
|
||||||
|
|
||||||
return this;
|
return this;
|
||||||
|
@ -183,9 +188,12 @@ public class MagesStaff extends MeleeWeapon {
|
||||||
STR = 10;
|
STR = 10;
|
||||||
|
|
||||||
if (wand != null) {
|
if (wand != null) {
|
||||||
|
int curCharges = wand.curCharges;
|
||||||
wand.degrade();
|
wand.degrade();
|
||||||
//gives the wand one additional charge
|
//gives the wand one additional charge
|
||||||
wand.maxCharges = Math.min(wand.maxCharges + 1, 10);
|
wand.maxCharges = Math.min(wand.maxCharges + 1, 10);
|
||||||
|
wand.curCharges = curCharges-1;
|
||||||
|
updateQuickslot();
|
||||||
}
|
}
|
||||||
|
|
||||||
return this;
|
return this;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user