v0.3.0: removed the ability to disenchant the wand of magic missile, removed wands as weapons, added save transfer logic for pre-0.3.0
This commit is contained in:
@@ -75,10 +75,20 @@ public class Belongings implements Iterable<Item> {
|
||||
|
||||
backpack.clear();
|
||||
backpack.restoreFromBundle( bundle );
|
||||
|
||||
weapon = (KindOfWeapon)bundle.get( WEAPON );
|
||||
if (weapon != null) {
|
||||
weapon.activate( owner );
|
||||
|
||||
if (bundle.get( WEAPON ) instanceof Wand){
|
||||
//handles the case of an equipped wand from pre-0.3.0
|
||||
Wand item = (Wand) bundle.get(WEAPON);
|
||||
//try to add the wand to inventory
|
||||
if (!item.collect(backpack)){
|
||||
//if it's too full, shove it in anyway
|
||||
backpack.items.add(item);
|
||||
}
|
||||
} else {
|
||||
weapon = (KindOfWeapon) bundle.get(WEAPON);
|
||||
if (weapon != null) {
|
||||
weapon.activate(owner);
|
||||
}
|
||||
}
|
||||
|
||||
armor = (Armor)bundle.get( ARMOR );
|
||||
|
||||
@@ -869,7 +869,7 @@ public class Hero extends Char {
|
||||
}
|
||||
break;
|
||||
case BATTLEMAGE:
|
||||
if (wep instanceof Wand || wep instanceof MagesStaff) {
|
||||
if (wep instanceof MagesStaff) {
|
||||
//gives wands 50% charge
|
||||
Buff.affect( this, ScrollOfRecharging.Recharging.class, 2f);
|
||||
ScrollOfRecharging.charge( this );
|
||||
|
||||
Reference in New Issue
Block a user