v0.3.0c: refactor staff levelling, mages staff now gives a wand +1 max charges (magic missile reduced to 3 charges to compensate)
This commit is contained in:
parent
57b3de2ae3
commit
39c736189d
|
@ -72,7 +72,7 @@ public class WandOfMagicMissile extends Wand {
|
||||||
}
|
}
|
||||||
|
|
||||||
protected int initialCharges() {
|
protected int initialCharges() {
|
||||||
return 4;
|
return 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -63,15 +63,7 @@ public class MagesStaff extends MeleeWeapon {
|
||||||
wand.identify();
|
wand.identify();
|
||||||
wand.cursed = false;
|
wand.cursed = false;
|
||||||
this.wand = wand;
|
this.wand = wand;
|
||||||
}
|
wand.maxCharges = Math.min(wand.maxCharges + 1, 10);
|
||||||
|
|
||||||
@Override
|
|
||||||
public Item upgrade(boolean enchant) {
|
|
||||||
MIN++;
|
|
||||||
MAX++;
|
|
||||||
//does not lose strength requirement
|
|
||||||
|
|
||||||
return super.upgrade( enchant );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -158,6 +150,7 @@ public class MagesStaff extends MeleeWeapon {
|
||||||
wand.degrade(Math.abs(wandLevelDiff));
|
wand.degrade(Math.abs(wandLevelDiff));
|
||||||
|
|
||||||
this.wand = wand;
|
this.wand = wand;
|
||||||
|
wand.maxCharges = Math.min(wand.maxCharges + 1, 10);
|
||||||
wand.identify();
|
wand.identify();
|
||||||
wand.cursed = false;
|
wand.cursed = false;
|
||||||
wand.charge(owner);
|
wand.charge(owner);
|
||||||
|
@ -169,15 +162,33 @@ public class MagesStaff extends MeleeWeapon {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Item upgrade() {
|
public Item upgrade(boolean enchant) {
|
||||||
if (wand != null) wand.upgrade();
|
super.upgrade( enchant );
|
||||||
return super.upgrade();
|
STR = 10;
|
||||||
|
//does not lose strength requirement
|
||||||
|
|
||||||
|
if (wand != null) {
|
||||||
|
wand.upgrade();
|
||||||
|
//gives the wand one additional charge
|
||||||
|
wand.maxCharges = Math.min(wand.maxCharges + 1, 10);
|
||||||
|
}
|
||||||
|
|
||||||
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Item degrade() {
|
public Item degrade() {
|
||||||
if (wand != null) wand.degrade();
|
super.degrade();
|
||||||
return super.degrade();
|
|
||||||
|
STR = 10;
|
||||||
|
|
||||||
|
if (wand != null) {
|
||||||
|
wand.degrade();
|
||||||
|
//gives the wand one additional charge
|
||||||
|
wand.maxCharges = Math.min(wand.maxCharges + 1, 10);
|
||||||
|
}
|
||||||
|
|
||||||
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -223,6 +234,7 @@ public class MagesStaff extends MeleeWeapon {
|
||||||
public void restoreFromBundle(Bundle bundle) {
|
public void restoreFromBundle(Bundle bundle) {
|
||||||
super.restoreFromBundle(bundle);
|
super.restoreFromBundle(bundle);
|
||||||
wand = (Wand) bundle.get(WAND);
|
wand = (Wand) bundle.get(WAND);
|
||||||
|
if (wand != null) wand.maxCharges = Math.min(wand.maxCharges + 1, 10);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in New Issue
Block a user