@Override public ArrayList<String> actions( Hero hero ) { ArrayList<String> actions = super.actions( hero ); if (isEquipped( hero ) && charge > 0 && !cursed) actions.add(AC_READ); if (isEquipped( hero ) && level() < levelCap && !cursed) actions.add(AC_ADD); return actions; }
@Override public void charge(Hero target) { if (charge < chargeCap){ partialCharge += 0.1f; if (partialCharge >= 1){ partialCharge--; charge++; updateQuickslot(); } } }
else if (!isEquipped( hero )) GLog.i( Messages.get(Artifact.class, "need_to_equip") ); else if (charge <= 0) GLog.i( Messages.get(this, "no_charge") ); else if (cursed) GLog.i( Messages.get(this, "cursed") ); scroll.doRead(); updateQuickslot();
@Override public void onSelect(Item item) { if (item != null && item instanceof Scroll && item.isIdentified()){ Hero hero = Dungeon.hero; for (int i = 0; ( i <= 1 && i < scrolls.size() ); i++){ if (scrolls.get(i).equals(item.getClass())){ hero.sprite.operate( hero.pos ); hero.busy(); hero.spend( 2f ); Sample.INSTANCE.play(Assets.SND_BURNING); hero.sprite.emitter().burst( ElmoParticle.FACTORY, 12 ); scrolls.remove(i); item.detach(hero.belongings.backpack); upgrade(); GLog.i( Messages.get(UnstableSpellbook.class, "infuse_scroll") ); return; } } GLog.w( Messages.get(UnstableSpellbook.class, "unable_scroll") ); } else if (item instanceof Scroll && !item.isIdentified()) GLog.w( Messages.get(UnstableSpellbook.class, "unknown_scroll") ); } };
"The previous unique mechanics of earthfruit, sorrowfruit, and firefruit have been recycled into the new alchemy system.")); changes.addButton( new ChangeButton(new UnstableSpellbook(), "The unstable spellbook has received a mini-rework to go along with the new exotic scrolls.\n\n" + "_-_ Previous enhanced scroll mechanic removed.\n\n" + infos.add(changes); changes.addButton( new ChangeButton( new UnstableSpellbook(), "The Unstable spellbook wasn't really worth upgrading, so it's getting some new effects to make it worth investing in!\n\n" + "_-_ Infusing a scroll into the unstable spellbook will now grant a unique empowered effect whenever that scroll's spell is cast from the book.\n\n" +
else if (!isEquipped( hero )) GLog.i( Messages.get(Artifact.class, "need_to_equip") ); else if (charge <= 0) GLog.i( Messages.get(this, "no_charge") ); else if (cursed) GLog.i( Messages.get(this, "cursed") ); scroll.doRead(); updateQuickslot();
@Override public void onSelect(Item item) { if (item != null && item instanceof Scroll && item.isIdentified()){ Hero hero = Dungeon.hero; for (int i = 0; ( i <= 1 && i < scrolls.size() ); i++){ if (scrolls.get(i).equals(item.getClass())){ hero.sprite.operate( hero.pos ); hero.busy(); hero.spend( 2f ); Sample.INSTANCE.play(Assets.SND_BURNING); hero.sprite.emitter().burst( ElmoParticle.FACTORY, 12 ); scrolls.remove(i); item.detach(hero.belongings.backpack); upgrade(); GLog.i( Messages.get(UnstableSpellbook.class, "infuse_scroll") ); return; } } GLog.w( Messages.get(UnstableSpellbook.class, "unable_scroll") ); } else if (item instanceof Scroll && !item.isIdentified()) GLog.w( Messages.get(UnstableSpellbook.class, "unknown_scroll") ); } };
"The previous unique mechanics of earthfruit, sorrowfruit, and firefruit have been recycled into the new alchemy system.")); changes.addButton( new ChangeButton(new UnstableSpellbook(), "The unstable spellbook has received a mini-rework to go along with the new exotic scrolls.\n\n" + "_-_ Previous enhanced scroll mechanic removed.\n\n" + infos.add(changes); changes.addButton( new ChangeButton( new UnstableSpellbook(), "The Unstable spellbook wasn't really worth upgrading, so it's getting some new effects to make it worth investing in!\n\n" + "_-_ Infusing a scroll into the unstable spellbook will now grant a unique empowered effect whenever that scroll's spell is cast from the book.\n\n" +
@Override public ArrayList<String> actions( Hero hero ) { ArrayList<String> actions = super.actions( hero ); if (isEquipped( hero ) && charge > 0 && !cursed) actions.add(AC_READ); if (isEquipped( hero ) && level() < levelCap && !cursed) actions.add(AC_ADD); return actions; }
@Override public void charge(Hero target) { if (charge < chargeCap){ partialCharge += 0.1f; if (partialCharge >= 1){ partialCharge--; charge++; updateQuickslot(); } } }
@Override public String desc() { String desc = super.desc(); if (isEquipped(Dungeon.hero)) { if (cursed) { desc += "\n\n" + Messages.get(this, "desc_cursed"); } if (level() < levelCap && scrolls.size() > 0) { desc += "\n\n" + Messages.get(this, "desc_index"); desc += "\n" + "_" + Messages.get(scrolls.get(0), "name") + "_"; if (scrolls.size() > 1) desc += "\n" + "_" + Messages.get(scrolls.get(1), "name") + "_"; } } if (level() > 0) { desc += "\n\n" + Messages.get(this, "desc_empowered"); } return desc; }
@Override public String desc() { String desc = super.desc(); if (isEquipped(Dungeon.hero)) { if (cursed) { desc += "\n\n" + Messages.get(this, "desc_cursed"); } if (level() < levelCap && scrolls.size() > 0) { desc += "\n\n" + Messages.get(this, "desc_index"); desc += "\n" + "_" + Messages.get(scrolls.get(0), "name") + "_"; if (scrolls.size() > 1) desc += "\n" + "_" + Messages.get(scrolls.get(1), "name") + "_"; } } if (level() > 0) { desc += "\n\n" + Messages.get(this, "desc_empowered"); } return desc; }