v0.2.2: overhauled bones system(heroes remains). Fairly tentative, needs to be tested.
This commit is contained in:
parent
e10cdb3747
commit
fa53d78809
|
@ -17,17 +17,22 @@
|
||||||
*/
|
*/
|
||||||
package com.shatteredpixel.shatteredpixeldungeon;
|
package com.shatteredpixel.shatteredpixeldungeon;
|
||||||
|
|
||||||
import java.io.IOException;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
|
||||||
import java.io.InputStream;
|
import com.shatteredpixel.shatteredpixeldungeon.items.EquipableItem;
|
||||||
import java.io.OutputStream;
|
|
||||||
|
|
||||||
import com.watabou.noosa.Game;
|
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.Gold;
|
import com.shatteredpixel.shatteredpixeldungeon.items.Gold;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
|
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.rings.Ring;
|
import com.shatteredpixel.shatteredpixeldungeon.items.rings.Ring;
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.ui.QuickSlot;
|
||||||
|
import com.watabou.noosa.Game;
|
||||||
import com.watabou.utils.Bundle;
|
import com.watabou.utils.Bundle;
|
||||||
import com.watabou.utils.Random;
|
import com.watabou.utils.Random;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.io.InputStream;
|
||||||
|
import java.io.OutputStream;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Iterator;
|
||||||
|
|
||||||
public class Bones {
|
public class Bones {
|
||||||
|
|
||||||
private static final String BONES_FILE = "bones.dat";
|
private static final String BONES_FILE = "bones.dat";
|
||||||
|
@ -40,28 +45,8 @@ public class Bones {
|
||||||
|
|
||||||
public static void leave() {
|
public static void leave() {
|
||||||
|
|
||||||
item = null;
|
item = pickItem(Dungeon.hero);
|
||||||
switch (Random.Int( 4 )) {
|
|
||||||
case 0:
|
|
||||||
item = Dungeon.hero.belongings.weapon;
|
|
||||||
break;
|
|
||||||
case 1:
|
|
||||||
item = Dungeon.hero.belongings.armor;
|
|
||||||
break;
|
|
||||||
case 2:
|
|
||||||
item = Dungeon.hero.belongings.misc1;
|
|
||||||
break;
|
|
||||||
case 3:
|
|
||||||
item = Dungeon.hero.belongings.misc2;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
if (item == null) {
|
|
||||||
if (Dungeon.gold > 0) {
|
|
||||||
item = new Gold( Random.IntRange( 1, Dungeon.gold ) );
|
|
||||||
} else {
|
|
||||||
item = new Gold( 1 );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
depth = Dungeon.depth;
|
depth = Dungeon.depth;
|
||||||
|
|
||||||
|
@ -78,6 +63,56 @@ public class Bones {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static Item pickItem(Hero hero){
|
||||||
|
Item item = null;
|
||||||
|
if (Random.Int(2) == 0) {
|
||||||
|
switch (Random.Int(5)) {
|
||||||
|
case 0:
|
||||||
|
item = hero.belongings.weapon;
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
item = hero.belongings.armor;
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
item = hero.belongings.misc1;
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
item = hero.belongings.misc2;
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
item = QuickSlot.getItem();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if (item != null && !item.bones)
|
||||||
|
return pickItem(hero);
|
||||||
|
} else {
|
||||||
|
|
||||||
|
Iterator<Item> iterator = hero.belongings.backpack.iterator();
|
||||||
|
Item curItem;
|
||||||
|
ArrayList<Item> items = new ArrayList<Item>();
|
||||||
|
while (iterator.hasNext()){
|
||||||
|
curItem = iterator.next();
|
||||||
|
if (curItem.bones && !(curItem instanceof EquipableItem))
|
||||||
|
items.add(curItem);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!items.isEmpty()) {
|
||||||
|
item = Random.element(items);
|
||||||
|
if (item.stackable){
|
||||||
|
item.quantity(Random.NormalIntRange(1, (int)Math.sqrt(item.quantity())));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (item == null) {
|
||||||
|
if (Dungeon.gold > 0) {
|
||||||
|
item = new Gold( Random.NormalIntRange( 1, Dungeon.gold ) );
|
||||||
|
} else {
|
||||||
|
item = new Gold( 1 );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return item;
|
||||||
|
}
|
||||||
|
|
||||||
public static Item get() {
|
public static Item get() {
|
||||||
if (depth == -1) {
|
if (depth == -1) {
|
||||||
|
|
||||||
|
@ -100,7 +135,7 @@ public class Bones {
|
||||||
Game.instance.deleteFile( BONES_FILE );
|
Game.instance.deleteFile( BONES_FILE );
|
||||||
depth = 0;
|
depth = 0;
|
||||||
|
|
||||||
if (!item.stackable) {
|
if (item.isUpgradable()) {
|
||||||
item.cursed = true;
|
item.cursed = true;
|
||||||
item.cursedKnown = true;
|
item.cursedKnown = true;
|
||||||
if (item.isUpgradable()) {
|
if (item.isUpgradable()) {
|
||||||
|
|
|
@ -46,6 +46,10 @@ public class Ankh extends Item {
|
||||||
{
|
{
|
||||||
name = "Ankh";
|
name = "Ankh";
|
||||||
image = ItemSpriteSheet.ANKH;
|
image = ItemSpriteSheet.ANKH;
|
||||||
|
|
||||||
|
//You tell the ankh no, don't revive me, and then it comes back to revive you again in another run.
|
||||||
|
//I'm not sure if that's enthusiasm or passive-aggression.
|
||||||
|
bones = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
private Boolean blessed = false;
|
private Boolean blessed = false;
|
||||||
|
|
|
@ -31,6 +31,10 @@ public abstract class EquipableItem extends Item {
|
||||||
public static final String AC_EQUIP = "EQUIP";
|
public static final String AC_EQUIP = "EQUIP";
|
||||||
public static final String AC_UNEQUIP = "UNEQUIP";
|
public static final String AC_UNEQUIP = "UNEQUIP";
|
||||||
|
|
||||||
|
{
|
||||||
|
bones = true;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void execute( Hero hero, String action ) {
|
public void execute( Hero hero, String action ) {
|
||||||
if (action.equals( AC_EQUIP )) {
|
if (action.equals( AC_EQUIP )) {
|
||||||
|
|
|
@ -17,11 +17,6 @@
|
||||||
*/
|
*/
|
||||||
package com.shatteredpixel.shatteredpixeldungeon.items;
|
package com.shatteredpixel.shatteredpixeldungeon.items;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.Collections;
|
|
||||||
import java.util.Comparator;
|
|
||||||
|
|
||||||
import com.watabou.noosa.audio.Sample;
|
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.Assets;
|
import com.shatteredpixel.shatteredpixeldungeon.Assets;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.Badges;
|
import com.shatteredpixel.shatteredpixeldungeon.Badges;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
||||||
|
@ -40,10 +35,15 @@ import com.shatteredpixel.shatteredpixeldungeon.sprites.MissileSprite;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.ui.QuickSlot;
|
import com.shatteredpixel.shatteredpixeldungeon.ui.QuickSlot;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.utils.GLog;
|
import com.shatteredpixel.shatteredpixeldungeon.utils.GLog;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.utils.Utils;
|
import com.shatteredpixel.shatteredpixeldungeon.utils.Utils;
|
||||||
|
import com.watabou.noosa.audio.Sample;
|
||||||
import com.watabou.utils.Bundlable;
|
import com.watabou.utils.Bundlable;
|
||||||
import com.watabou.utils.Bundle;
|
import com.watabou.utils.Bundle;
|
||||||
import com.watabou.utils.Callback;
|
import com.watabou.utils.Callback;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Collections;
|
||||||
|
import java.util.Comparator;
|
||||||
|
|
||||||
public class Item implements Bundlable {
|
public class Item implements Bundlable {
|
||||||
|
|
||||||
private static final String TXT_PACK_FULL = "Your pack is too full for the %s";
|
private static final String TXT_PACK_FULL = "Your pack is too full for the %s";
|
||||||
|
@ -77,6 +77,9 @@ public class Item implements Bundlable {
|
||||||
// Unique items persist through revival
|
// Unique items persist through revival
|
||||||
public boolean unique = false;
|
public boolean unique = false;
|
||||||
|
|
||||||
|
// whether an item can be included in heroes remains
|
||||||
|
public boolean bones = false;
|
||||||
|
|
||||||
private static Comparator<Item> itemComparator = new Comparator<Item>() {
|
private static Comparator<Item> itemComparator = new Comparator<Item>() {
|
||||||
@Override
|
@Override
|
||||||
public int compare( Item lhs, Item rhs ) {
|
public int compare( Item lhs, Item rhs ) {
|
||||||
|
|
|
@ -17,9 +17,6 @@
|
||||||
*/
|
*/
|
||||||
package com.shatteredpixel.shatteredpixeldungeon.items;
|
package com.shatteredpixel.shatteredpixeldungeon.items;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
|
|
||||||
import com.watabou.noosa.audio.Sample;
|
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.Assets;
|
import com.shatteredpixel.shatteredpixeldungeon.Assets;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.effects.particles.PurpleParticle;
|
import com.shatteredpixel.shatteredpixeldungeon.effects.particles.PurpleParticle;
|
||||||
|
@ -28,6 +25,9 @@ import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
|
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.utils.GLog;
|
import com.shatteredpixel.shatteredpixeldungeon.utils.GLog;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.windows.WndBag;
|
import com.shatteredpixel.shatteredpixeldungeon.windows.WndBag;
|
||||||
|
import com.watabou.noosa.audio.Sample;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
|
||||||
public class Stylus extends Item {
|
public class Stylus extends Item {
|
||||||
|
|
||||||
|
@ -43,6 +43,8 @@ public class Stylus extends Item {
|
||||||
image = ItemSpriteSheet.STYLUS;
|
image = ItemSpriteSheet.STYLUS;
|
||||||
|
|
||||||
stackable = true;
|
stackable = true;
|
||||||
|
|
||||||
|
bones = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -17,10 +17,6 @@
|
||||||
*/
|
*/
|
||||||
package com.shatteredpixel.shatteredpixeldungeon.items;
|
package com.shatteredpixel.shatteredpixeldungeon.items;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
|
|
||||||
import com.watabou.noosa.BitmapTextMultiline;
|
|
||||||
import com.watabou.noosa.audio.Sample;
|
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.Assets;
|
import com.shatteredpixel.shatteredpixeldungeon.Assets;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.Weapon;
|
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.Weapon;
|
||||||
|
@ -33,6 +29,10 @@ import com.shatteredpixel.shatteredpixeldungeon.utils.GLog;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.utils.Utils;
|
import com.shatteredpixel.shatteredpixeldungeon.utils.Utils;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.windows.IconTitle;
|
import com.shatteredpixel.shatteredpixeldungeon.windows.IconTitle;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.windows.WndBag;
|
import com.shatteredpixel.shatteredpixeldungeon.windows.WndBag;
|
||||||
|
import com.watabou.noosa.BitmapTextMultiline;
|
||||||
|
import com.watabou.noosa.audio.Sample;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
|
||||||
public class Weightstone extends Item {
|
public class Weightstone extends Item {
|
||||||
|
|
||||||
|
@ -49,6 +49,8 @@ public class Weightstone extends Item {
|
||||||
image = ItemSpriteSheet.WEIGHT;
|
image = ItemSpriteSheet.WEIGHT;
|
||||||
|
|
||||||
stackable = true;
|
stackable = true;
|
||||||
|
|
||||||
|
bones = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -17,12 +17,12 @@
|
||||||
*/
|
*/
|
||||||
package com.shatteredpixel.shatteredpixeldungeon.items.armor;
|
package com.shatteredpixel.shatteredpixeldungeon.items.armor;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
|
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.utils.GLog;
|
import com.shatteredpixel.shatteredpixeldungeon.utils.GLog;
|
||||||
import com.watabou.utils.Bundle;
|
import com.watabou.utils.Bundle;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
|
||||||
abstract public class ClassArmor extends Armor {
|
abstract public class ClassArmor extends Armor {
|
||||||
|
|
||||||
private static final String TXT_LOW_HEALTH = "Your health is too low!";
|
private static final String TXT_LOW_HEALTH = "Your health is too low!";
|
||||||
|
@ -32,6 +32,8 @@ abstract public class ClassArmor extends Armor {
|
||||||
levelKnown = true;
|
levelKnown = true;
|
||||||
cursedKnown = true;
|
cursedKnown = true;
|
||||||
defaultAction = special();
|
defaultAction = special();
|
||||||
|
|
||||||
|
bones = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ClassArmor() {
|
public ClassArmor() {
|
||||||
|
|
|
@ -3,17 +3,37 @@ package com.shatteredpixel.shatteredpixeldungeon.items.food;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.Assets;
|
import com.shatteredpixel.shatteredpixeldungeon.Assets;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.Badges;
|
import com.shatteredpixel.shatteredpixeldungeon.Badges;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.Statistics;
|
import com.shatteredpixel.shatteredpixeldungeon.Statistics;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.*;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Barkskin;
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Bleeding;
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Cripple;
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Hunger;
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Invisibility;
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Poison;
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Weakness;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.npcs.Wandmaker;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.npcs.Wandmaker;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.effects.Speck;
|
import com.shatteredpixel.shatteredpixeldungeon.effects.Speck;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.effects.SpellSprite;
|
import com.shatteredpixel.shatteredpixeldungeon.effects.SpellSprite;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
|
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.potions.*;
|
import com.shatteredpixel.shatteredpixeldungeon.items.potions.Potion;
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfFrost;
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfHealing;
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfInvisibility;
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfLiquidFlame;
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfMindVision;
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfParalyticGas;
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfStrength;
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfToxicGas;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfRecharging;
|
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfRecharging;
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.plants.Blindweed;
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.plants.Earthroot;
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.plants.Fadeleaf;
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.plants.Firebloom;
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.plants.Icecap;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.plants.Plant.Seed;
|
import com.shatteredpixel.shatteredpixeldungeon.plants.Plant.Seed;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.plants.*;
|
import com.shatteredpixel.shatteredpixeldungeon.plants.Sorrowmoss;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
|
import com.shatteredpixel.shatteredpixeldungeon.plants.Sungrass;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSprite;
|
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSprite;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
|
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.utils.GLog;
|
import com.shatteredpixel.shatteredpixeldungeon.utils.GLog;
|
||||||
|
@ -38,6 +58,8 @@ public class Blandfruit extends Food {
|
||||||
image = ItemSpriteSheet.BLANDFRUIT;
|
image = ItemSpriteSheet.BLANDFRUIT;
|
||||||
energy = (Hunger.STARVING - Hunger.HUNGRY)/2;
|
energy = (Hunger.STARVING - Hunger.HUNGRY)/2;
|
||||||
hornValue = 6; //only applies when blandfruit is cooked
|
hornValue = 6; //only applies when blandfruit is cooked
|
||||||
|
|
||||||
|
bones = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -27,6 +27,8 @@ public class Pasty extends Food {
|
||||||
image = ItemSpriteSheet.PASTY;
|
image = ItemSpriteSheet.PASTY;
|
||||||
energy = Hunger.STARVING;
|
energy = Hunger.STARVING;
|
||||||
hornValue = 5;
|
hornValue = 5;
|
||||||
|
|
||||||
|
bones = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -23,6 +23,8 @@ public class PotionOfExperience extends Potion {
|
||||||
|
|
||||||
{
|
{
|
||||||
name = "Potion of Experience";
|
name = "Potion of Experience";
|
||||||
|
|
||||||
|
bones = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -31,6 +31,8 @@ public class PotionOfHealing extends Potion {
|
||||||
|
|
||||||
{
|
{
|
||||||
name = "Potion of Healing";
|
name = "Potion of Healing";
|
||||||
|
|
||||||
|
bones = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -26,6 +26,8 @@ public class PotionOfMight extends PotionOfStrength {
|
||||||
|
|
||||||
{
|
{
|
||||||
name = "Potion of Might";
|
name = "Potion of Might";
|
||||||
|
|
||||||
|
bones = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -26,6 +26,8 @@ public class PotionOfStrength extends Potion {
|
||||||
|
|
||||||
{
|
{
|
||||||
name = "Potion of Strength";
|
name = "Potion of Strength";
|
||||||
|
|
||||||
|
bones = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -29,6 +29,8 @@ public class ScrollOfIdentify extends InventoryScroll {
|
||||||
name = "Scroll of Identify";
|
name = "Scroll of Identify";
|
||||||
inventoryTitle = "Select an item to identify";
|
inventoryTitle = "Select an item to identify";
|
||||||
mode = WndBag.Mode.UNIDENTIFED;
|
mode = WndBag.Mode.UNIDENTIFED;
|
||||||
|
|
||||||
|
bones = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -36,6 +36,8 @@ public class ScrollOfPsionicBlast extends Scroll {
|
||||||
|
|
||||||
{
|
{
|
||||||
name = "Scroll of Psionic Blast";
|
name = "Scroll of Psionic Blast";
|
||||||
|
|
||||||
|
bones = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -33,6 +33,8 @@ public class ScrollOfUpgrade extends InventoryScroll {
|
||||||
name = "Scroll of Upgrade";
|
name = "Scroll of Upgrade";
|
||||||
inventoryTitle = "Select an item to upgrade";
|
inventoryTitle = "Select an item to upgrade";
|
||||||
mode = WndBag.Mode.UPGRADEABLE;
|
mode = WndBag.Mode.UPGRADEABLE;
|
||||||
|
|
||||||
|
bones = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -33,6 +33,8 @@ public class ScrollOfWeaponUpgrade extends InventoryScroll {
|
||||||
name = "Scroll of Weapon Upgrade";
|
name = "Scroll of Weapon Upgrade";
|
||||||
inventoryTitle = "Select a weapon to upgrade";
|
inventoryTitle = "Select a weapon to upgrade";
|
||||||
mode = WndBag.Mode.WEAPON;
|
mode = WndBag.Mode.WEAPON;
|
||||||
|
|
||||||
|
bones = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -17,9 +17,6 @@
|
||||||
*/
|
*/
|
||||||
package com.shatteredpixel.shatteredpixeldungeon.items.wands;
|
package com.shatteredpixel.shatteredpixeldungeon.items.wands;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
|
|
||||||
import com.watabou.noosa.audio.Sample;
|
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.Assets;
|
import com.shatteredpixel.shatteredpixeldungeon.Assets;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.Badges;
|
import com.shatteredpixel.shatteredpixeldungeon.Badges;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
||||||
|
@ -34,8 +31,11 @@ import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.utils.GLog;
|
import com.shatteredpixel.shatteredpixeldungeon.utils.GLog;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.utils.Utils;
|
import com.shatteredpixel.shatteredpixeldungeon.utils.Utils;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.windows.WndBag;
|
import com.shatteredpixel.shatteredpixeldungeon.windows.WndBag;
|
||||||
|
import com.watabou.noosa.audio.Sample;
|
||||||
import com.watabou.utils.Random;
|
import com.watabou.utils.Random;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
|
||||||
public class WandOfMagicMissile extends Wand {
|
public class WandOfMagicMissile extends Wand {
|
||||||
|
|
||||||
public static final String AC_DISENCHANT = "DISENCHANT";
|
public static final String AC_DISENCHANT = "DISENCHANT";
|
||||||
|
@ -52,6 +52,8 @@ public class WandOfMagicMissile extends Wand {
|
||||||
{
|
{
|
||||||
name = "Wand of Magic Missile";
|
name = "Wand of Magic Missile";
|
||||||
image = ItemSpriteSheet.WAND_MAGIC_MISSILE;
|
image = ItemSpriteSheet.WAND_MAGIC_MISSILE;
|
||||||
|
|
||||||
|
bones = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -17,9 +17,6 @@
|
||||||
*/
|
*/
|
||||||
package com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee;
|
package com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
|
|
||||||
import com.watabou.noosa.audio.Sample;
|
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.Assets;
|
import com.shatteredpixel.shatteredpixeldungeon.Assets;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.Badges;
|
import com.shatteredpixel.shatteredpixeldungeon.Badges;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
|
||||||
|
@ -30,6 +27,9 @@ import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
|
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.utils.GLog;
|
import com.shatteredpixel.shatteredpixeldungeon.utils.GLog;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.windows.WndBag;
|
import com.shatteredpixel.shatteredpixeldungeon.windows.WndBag;
|
||||||
|
import com.watabou.noosa.audio.Sample;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
|
||||||
public class ShortSword extends MeleeWeapon {
|
public class ShortSword extends MeleeWeapon {
|
||||||
|
|
||||||
|
@ -49,6 +49,8 @@ public class ShortSword extends MeleeWeapon {
|
||||||
{
|
{
|
||||||
name = "short sword";
|
name = "short sword";
|
||||||
image = ItemSpriteSheet.SHORT_SWORD;
|
image = ItemSpriteSheet.SHORT_SWORD;
|
||||||
|
|
||||||
|
bones = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ShortSword() {
|
public ShortSword() {
|
||||||
|
|
|
@ -38,6 +38,8 @@ public class Boomerang extends MissileWeapon {
|
||||||
MAX = 4;
|
MAX = 4;
|
||||||
|
|
||||||
stackable = false;
|
stackable = false;
|
||||||
|
|
||||||
|
bones = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -29,6 +29,8 @@ public class Dart extends MissileWeapon {
|
||||||
|
|
||||||
MIN = 1;
|
MIN = 1;
|
||||||
MAX = 4;
|
MAX = 4;
|
||||||
|
|
||||||
|
bones = false; //Finding them in bones would be semi-frequent and disappointing.
|
||||||
}
|
}
|
||||||
|
|
||||||
public Dart() {
|
public Dart() {
|
||||||
|
|
|
@ -68,6 +68,8 @@ public class Earthroot extends Plant {
|
||||||
|
|
||||||
plantClass = Earthroot.class;
|
plantClass = Earthroot.class;
|
||||||
alchemyClass = PotionOfParalyticGas.class;
|
alchemyClass = PotionOfParalyticGas.class;
|
||||||
|
|
||||||
|
bones = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -65,6 +65,8 @@ public class Sungrass extends Plant {
|
||||||
|
|
||||||
plantClass = Sungrass.class;
|
plantClass = Sungrass.class;
|
||||||
alchemyClass = PotionOfHealing.class;
|
alchemyClass = PotionOfHealing.class;
|
||||||
|
|
||||||
|
bones = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -142,6 +142,11 @@ public class QuickSlot extends Button implements WndBag.Listener {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static Item getItem(){
|
||||||
|
Item item = select();
|
||||||
|
return (item != null && item.quantity() != 0)? item : null;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onSelect( Item item ) {
|
public void onSelect( Item item ) {
|
||||||
if (item != null) {
|
if (item != null) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user