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:
@@ -43,16 +43,7 @@ import java.util.ArrayList;
|
||||
public class WandOfMagicMissile extends Wand {
|
||||
|
||||
public static final String AC_DISENCHANT = "DISENCHANT";
|
||||
|
||||
private static final String TXT_SELECT_WAND = "Select a wand to upgrade";
|
||||
|
||||
private static final String TXT_DISENCHANTED =
|
||||
"you disenchanted the Wand of Magic Missile and used its essence to upgrade your %s";
|
||||
|
||||
private static final float TIME_TO_DISENCHANT = 2f;
|
||||
|
||||
private boolean disenchantEquipped;
|
||||
|
||||
|
||||
{
|
||||
name = "Wand of Magic Missile";
|
||||
image = ItemSpriteSheet.WAND_MAGIC_MISSILE;
|
||||
@@ -60,15 +51,6 @@ public class WandOfMagicMissile extends Wand {
|
||||
bones = false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ArrayList<String> actions( Hero hero ) {
|
||||
ArrayList<String> actions = super.actions( hero );
|
||||
if (level > 0) {
|
||||
actions.add( AC_DISENCHANT );
|
||||
}
|
||||
return actions;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onZap( Ballistica bolt ) {
|
||||
|
||||
@@ -94,29 +76,6 @@ public class WandOfMagicMissile extends Wand {
|
||||
partialCharge += ((maxCharges - curCharges)/20f)*staff.level;
|
||||
SpellSprite.show(attacker, SpellSprite.CHARGE);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void execute( Hero hero, String action ) {
|
||||
if (action.equals( AC_DISENCHANT )) {
|
||||
|
||||
if (hero.belongings.weapon == this) {
|
||||
disenchantEquipped = true;
|
||||
hero.belongings.weapon = null;
|
||||
updateQuickslot();
|
||||
} else {
|
||||
disenchantEquipped = false;
|
||||
detach( hero.belongings.backpack );
|
||||
}
|
||||
|
||||
curUser = hero;
|
||||
GameScene.selectItem( itemSelector, WndBag.Mode.WAND, TXT_SELECT_WAND );
|
||||
|
||||
} else {
|
||||
|
||||
super.execute( hero, action );
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
protected int initialCharges() {
|
||||
return 4;
|
||||
@@ -127,34 +86,4 @@ public class WandOfMagicMissile extends Wand {
|
||||
return
|
||||
"This wand launches missiles of pure magical energy, dealing moderate damage to a target creature.";
|
||||
}
|
||||
|
||||
private final WndBag.Listener itemSelector = new WndBag.Listener() {
|
||||
@Override
|
||||
public void onSelect( Item item ) {
|
||||
if (item != null) {
|
||||
|
||||
Sample.INSTANCE.play( Assets.SND_EVOKE );
|
||||
ScrollOfUpgrade.upgrade( curUser );
|
||||
evoke( curUser );
|
||||
|
||||
GLog.w( TXT_DISENCHANTED, item.name() );
|
||||
|
||||
Dungeon.quickslot.clearItem(WandOfMagicMissile.this);
|
||||
WandOfMagicMissile.this.updateQuickslot();
|
||||
|
||||
item.upgrade();
|
||||
curUser.spendAndNext( TIME_TO_DISENCHANT );
|
||||
|
||||
Badges.validateItemLevelAquired( item );
|
||||
|
||||
} else {
|
||||
if (disenchantEquipped) {
|
||||
curUser.belongings.weapon = WandOfMagicMissile.this;
|
||||
WandOfMagicMissile.this.updateQuickslot();
|
||||
} else {
|
||||
collect( curUser.belongings.backpack );
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user