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 (misc1 != null) { misc1.cursed = false; misc1.activate(owner); } if (misc2 != null) { misc2.cursed = false; misc2.activate(owner); } }
public void observe() { if (weapon != null) { weapon.identify(); Badges.validateItemLevelAquired(weapon); } if (armor != null) { armor.identify(); Badges.validateItemLevelAquired(armor); } if (misc1 != null) { misc1.identify(); Badges.validateItemLevelAquired(misc1); } if (misc2 != null) { misc2.identify(); Badges.validateItemLevelAquired(misc2); } for (Item item : backpack) { item.cursedKnown = true; } }