use of com.watabou.pixeldungeon.items.keys.Key in project pixel-dungeon by watabou.
the class Belongings method resurrect.
public void resurrect(int depth) {
for (Item item : backpack.items.toArray(new Item[0])) {
if (item instanceof Key) {
if (((Key) item).depth == depth) {
item.detachAll(backpack);
}
} else if (item.unique) {
// Keep unique items
} else if (!item.isEquipped(owner)) {
item.detachAll(backpack);
}
}
if (weapon != null) {
weapon.cursed = false;
weapon.activate(owner);
}
if (armor != null) {
armor.cursed = false;
}
if (ring1 != null) {
ring1.cursed = false;
ring1.activate(owner);
}
if (ring2 != null) {
ring2.cursed = false;
ring2.activate(owner);
}
}
use of com.watabou.pixeldungeon.items.keys.Key in project pixel-dungeon-remix by NYRDS.
the class Belongings method resurrect.
public void resurrect(int depth) {
for (Item item : backpack.items.toArray(new Item[backpack.items.size()])) {
if (item instanceof Key) {
if (((Key) item).depth == depth) {
item.detachAll(backpack);
}
} else if (item instanceof Amulet) {
} else if (!item.isEquipped(owner)) {
item.detachAll(backpack);
}
}
if (weapon != null) {
weapon.cursed = false;
weapon.activate(owner);
}
if (armor != null) {
armor.cursed = false;
}
if (ring1 != null) {
ring1.cursed = false;
ring1.activate(owner);
}
if (ring2 != null) {
ring2.cursed = false;
ring2.activate(owner);
}
}