v0.2.3: artifact refactoring, pulled some display logic into superclass

This commit is contained in:
Evan Debenham
2014-12-10 13:58:20 -05:00
parent 7940bc78ec
commit e359b5f9ef
12 changed files with 73 additions and 103 deletions
@@ -15,7 +15,6 @@ import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
import com.shatteredpixel.shatteredpixeldungeon.ui.QuickSlot;
import com.shatteredpixel.shatteredpixeldungeon.utils.GLog;
import com.shatteredpixel.shatteredpixeldungeon.utils.Utils;
import com.shatteredpixel.shatteredpixeldungeon.windows.WndBag;
import com.watabou.noosa.audio.Sample;
import com.watabou.utils.Bundle;
@@ -31,21 +30,22 @@ public class UnstableSpellbook extends Artifact {
//TODO: add display logic
{
name = "unstable spellbook";
name = "Unstable Spellbook";
image = ItemSpriteSheet.ARTIFACT_SPELLBOOK;
level = 0;
levelCap = 10;
charge = ((level/2)+1);
partialCharge = 0;
chargeCap = ((level/2)+1);
defaultAction = AC_READ;
}
public static final String AC_READ = "READ";
public static final String AC_ADD = "ADD";
private static final String TXT_CHARGE = "%d/%d";
private final ArrayList<String> scrolls = new ArrayList<String>();
protected String inventoryTitle = "Select a scroll";
@@ -160,11 +160,6 @@ public class UnstableSpellbook extends Artifact {
return desc;
}
@Override
public String status() {
return Utils.format(TXT_CHARGE, charge, chargeCap);
}
//needs to bundle chargecap as it is dynamic.
private static final String CHARGECAP = "chargecap";
private static final String SCROLLS = "scrolls";