@Override public boolean isIdentified() { return isKnown(); }
public void anonymize(){ if (!isKnown()) image = ItemSpriteSheet.POTION_HOLDER; anonymous = true; }
public void anonymize(){ if (!isKnown()) image = ItemSpriteSheet.POTION_HOLDER; anonymous = true; }
@Override public boolean isIdentified() { return isKnown(); }
public Integer initials(){ return isKnown() ? initials : null; }
public Integer initials(){ return isKnown() ? initials : null; }
@Override public String info() { return isKnown() ? desc() : Messages.get(this, "unknown_desc"); }
@Override public String name() { return isKnown() ? super.name() : Messages.get(this, color); }
@Override public String info() { return isKnown() ? desc() : Messages.get(this, "unknown_desc"); }
@Override public String name() { return isKnown() ? super.name() : Messages.get(this, color); }
public void setKnown() { if (!anonymous) { if (!isKnown()) { handler.know(this); updateQuickslot(); Potion p = Dungeon.hero.belongings.getItem(getClass()); if (p != null) p.setAction(); if (ExoticPotion.regToExo.get(getClass()) != null) { p = Dungeon.hero.belongings.getItem(ExoticPotion.regToExo.get(getClass())); if (p != null) p.setAction(); } } if (Dungeon.hero.isAlive()) { Catalog.setSeen(getClass()); } } }
@Override public void doThrow( final Hero hero ) { if (isKnown() && !mustThrowPots.contains(this.getClass()) && !canThrowPots.contains(this.getClass())) { GameScene.show( new WndOptions( Messages.get(Potion.class, "beneficial"), Messages.get(Potion.class, "sure_throw"), Messages.get(Potion.class, "yes"), Messages.get(Potion.class, "no") ) { @Override protected void onSelect(int index) { if (index == 0) { Potion.super.doThrow( hero ); } }; } ); } else { super.doThrow( hero ); } }
public void setKnown() { if (!anonymous) { if (!isKnown()) { handler.know(this); updateQuickslot(); Potion p = Dungeon.hero.belongings.getItem(getClass()); if (p != null) p.setAction(); if (ExoticPotion.regToExo.get(getClass()) != null) { p = Dungeon.hero.belongings.getItem(ExoticPotion.regToExo.get(getClass())); if (p != null) p.setAction(); } } if (Dungeon.hero.isAlive()) { Catalog.setSeen(getClass()); } } }
@Override public void doThrow( final Hero hero ) { if (isKnown() && !mustThrowPots.contains(this.getClass()) && !canThrowPots.contains(this.getClass())) { GameScene.show( new WndOptions( Messages.get(Potion.class, "beneficial"), Messages.get(Potion.class, "sure_throw"), Messages.get(Potion.class, "yes"), Messages.get(Potion.class, "no") ) { @Override protected void onSelect(int index) { if (index == 0) { Potion.super.doThrow( hero ); } }; } ); } else { super.doThrow( hero ); } }
if (isKnown() && mustThrowPots.contains(getClass())) {
if (isKnown() && mustThrowPots.contains(getClass())) {
(item instanceof PotionOfStrength && ((Potion)item).isKnown()); if (important) { GLog.p( Messages.get(this, "you_now_have", item.name()) );
(item instanceof PotionOfStrength && ((Potion)item).isKnown()); if (important) { GLog.p( Messages.get(this, "you_now_have", item.name()) );