use of com.watabou.pixeldungeon.items.Ankh in project pixel-dungeon by watabou.
the class Hero method die.
@Override
public void die(Object cause) {
curAction = null;
DewVial.autoDrink(this);
if (isAlive()) {
new Flare(8, 32).color(0xFFFF66, true).show(sprite, 2f);
return;
}
Actor.fixTime();
super.die(cause);
Ankh ankh = (Ankh) belongings.getItem(Ankh.class);
if (ankh == null) {
reallyDie(cause);
} else {
Dungeon.deleteGame(Dungeon.hero.heroClass, false);
GameScene.show(new WndResurrect(ankh, cause));
}
}
use of com.watabou.pixeldungeon.items.Ankh in project pixel-dungeon by watabou.
the class ShopPainter method range.
private static Item[] range() {
ArrayList<Item> items = new ArrayList<Item>();
switch(Dungeon.depth) {
case 6:
items.add((Random.Int(2) == 0 ? new Quarterstaff() : new Spear()).identify());
items.add(new LeatherArmor().identify());
items.add(new SeedPouch());
items.add(new Weightstone());
break;
case 11:
items.add((Random.Int(2) == 0 ? new Sword() : new Mace()).identify());
items.add(new MailArmor().identify());
items.add(new ScrollHolder());
items.add(new Weightstone());
break;
case 16:
items.add((Random.Int(2) == 0 ? new Longsword() : new BattleAxe()).identify());
items.add(new ScaleArmor().identify());
items.add(new WandHolster());
items.add(new Weightstone());
break;
case 21:
switch(Random.Int(3)) {
case 0:
items.add(new Glaive().identify());
break;
case 1:
items.add(new WarHammer().identify());
break;
case 2:
items.add(new PlateArmor().identify());
break;
}
items.add(new Torch());
items.add(new Torch());
break;
}
items.add(new PotionOfHealing());
for (int i = 0; i < 3; i++) {
items.add(Generator.random(Generator.Category.POTION));
}
items.add(new ScrollOfIdentify());
items.add(new ScrollOfRemoveCurse());
items.add(new ScrollOfMagicMapping());
items.add(Generator.random(Generator.Category.SCROLL));
items.add(new OverpricedRation());
items.add(new OverpricedRation());
items.add(new Ankh());
Item[] range = items.toArray(new Item[0]);
Random.shuffle(range);
return range;
}
Aggregations