v0.2.4d: added name initials for identified potions and scrolls

This commit is contained in:
Evan Debenham
2015-03-21 15:37:33 -04:00
parent b6a1e3ec9e
commit 394d7a0a73
27 changed files with 59 additions and 3 deletions
@@ -40,7 +40,9 @@ public abstract class Scroll extends Item {
public static final String AC_READ = "READ";
protected static final float TIME_TO_READ = 1f;
protected String initials;
private static final Class<?>[] scrolls = {
ScrollOfIdentify.class,
ScrollOfMagicMapping.class,
@@ -169,6 +171,10 @@ public abstract class Scroll extends Item {
"This parchment is covered with indecipherable writing, and bears a title " +
"of rune " + rune + ". Who knows what it will do when read aloud?";
}
public String initials(){
return isKnown() ? initials : null;
}
@Override
public boolean isUpgradable() {
@@ -27,6 +27,8 @@ public class ScrollOfIdentify extends InventoryScroll {
{
name = "Scroll of Identify";
initials = "Id";
inventoryTitle = "Select an item to identify";
mode = WndBag.Mode.UNIDENTIFED;
@@ -23,7 +23,6 @@ import com.shatteredpixel.shatteredpixeldungeon.Assets;
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Invisibility;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Sleep;
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Mob;
import com.shatteredpixel.shatteredpixeldungeon.effects.Speck;
import com.shatteredpixel.shatteredpixeldungeon.levels.Level;
@@ -33,6 +32,7 @@ public class ScrollOfLullaby extends Scroll {
{
name = "Scroll of Lullaby";
initials = "Lu";
}
@Override
@@ -35,6 +35,7 @@ public class ScrollOfMagicMapping extends Scroll {
{
name = "Scroll of Magic Mapping";
initials = "MM";
}
@Override
@@ -32,6 +32,8 @@ public class ScrollOfMagicalInfusion extends InventoryScroll {
{
name = "Scroll of Magical Infusion";
initials = "MaI";
inventoryTitle = "Select an item to infuse";
mode = WndBag.Mode.ENCHANTABLE;
@@ -35,6 +35,7 @@ public class ScrollOfMirrorImage extends Scroll {
{
name = "Scroll of Mirror Image";
initials = "MI";
}
@Override
@@ -36,6 +36,7 @@ public class ScrollOfPsionicBlast extends Scroll {
{
name = "Scroll of Psionic Blast";
initials = "PB";
bones = true;
}
@@ -34,6 +34,7 @@ public class ScrollOfRage extends Scroll {
{
name = "Scroll of Rage";
initials = "Ra";
}
@Override
@@ -29,6 +29,7 @@ public class ScrollOfRecharging extends Scroll {
{
name = "Scroll of Recharging";
initials = "Re";
}
@Override
@@ -36,6 +36,7 @@ public class ScrollOfRemoveCurse extends Scroll {
{
name = "Scroll of Remove Curse";
initials = "RC";
}
@Override
@@ -35,6 +35,7 @@ public class ScrollOfTeleportation extends Scroll {
{
name = "Scroll of Teleportation";
initials = "TP";
}
@Override
@@ -32,6 +32,7 @@ public class ScrollOfTerror extends Scroll {
{
name = "Scroll of Terror";
initials = "Te";
}
@Override
@@ -31,6 +31,8 @@ public class ScrollOfUpgrade extends InventoryScroll {
{
name = "Scroll of Upgrade";
initials = "Up";
inventoryTitle = "Select an item to upgrade";
mode = WndBag.Mode.UPGRADEABLE;