@Override protected void onItemSelected(Item item) { Weapon weapon = (Weapon) item; ScrollOfRemoveCurse.uncurse(Dungeon.hero, weapon); weapon.upgrade(true); GLog.p(TXT_LOOKS_BETTER, weapon.name()); Badges.validateItemLevelAquired(weapon); curUser.sprite.emitter().start(Speck.factory(Speck.UP), 0.2f, 3); }
@Override public Item random() { if (Random.Float() < 0.4) { int n = 1; if (Random.Int(3) == 0) { n++; if (Random.Int(3) == 0) { n++; } } if (Random.Int(2) == 0) { upgrade(n); } else { degrade(n); cursed = true; } } return this; }