@Override public ArrayList<String> actions(Hero hero) { ArrayList<String> actions = super.actions( hero ); actions.remove( AC_DRINK ); return actions; }
private void anonymize(Item item){ if (item instanceof Potion){ ((Potion) item).anonymize(); } else if (item instanceof Scroll){ ((Scroll) item).anonymize(); } }
Invisibility.dispel(); HashSet<Class<? extends Potion>> potions = Potion.getUnknown(); HashSet<Class<? extends Scroll>> scrolls = Scroll.getUnknown(); HashSet<Class<? extends Ring>> rings = Ring.getUnknown(); p.setKnown(); IDed.add(p); potions.remove(p.getClass());
@Override protected void onSelect(int index) { if (index == 0) { drink( hero ); } }; }
@Override public void execute( Hero hero, String action ) { if (action.equals( AC_EAT ) && potionAttrib == null) { GLog.w( Messages.get(this, "raw")); return; } super.execute(hero, action); if (action.equals( AC_EAT ) && potionAttrib != null){ potionAttrib.apply(hero); } }
Potion.initColors(); Ring.initGems();
} else if (currentItemIdx == POTION_IDX){ itemClasses = new ArrayList<>(Catalog.POTIONS.items()); for (Class<? extends Item> cls : itemClasses) known.put(cls, Potion.getKnown().contains(cls)); } else if (currentItemIdx == SCROLL_IDX) { itemClasses = new ArrayList<>(Catalog.SCROLLS.items());
iconInt = ((Scroll) item).initials(); } else { iconInt = ((Potion) item).initials();
return; } else if (item instanceof Potion){ unIDed.addAll(Potion.getUnknown()); all = potions.clone(); if (item instanceof ExoticPotion){
Invisibility.dispel(); HashSet<Class<? extends Potion>> potions = Potion.getUnknown(); HashSet<Class<? extends Scroll>> scrolls = getUnknown(); HashSet<Class<? extends Ring>> rings = Ring.getUnknown(); p.setKnown(); IDed.add(p); potions.remove(p.getClass());
@Override protected void onSelect(int index) { if (index == 0) { drink( hero ); } }; }
@Override public void execute( Hero hero, String action ) { if (action.equals( AC_EAT ) && potionAttrib == null) { GLog.w( Messages.get(this, "raw")); return; } super.execute(hero, action); if (action.equals( AC_EAT ) && potionAttrib != null){ potionAttrib.apply(hero); } }
Potion.initColors(); Ring.initGems();
} else if (currentItemIdx == POTION_IDX){ itemClasses = new ArrayList<>(Catalog.POTIONS.items()); for (Class<? extends Item> cls : itemClasses) known.put(cls, Potion.getKnown().contains(cls)); } else if (currentItemIdx == SCROLL_IDX) { itemClasses = new ArrayList<>(Catalog.SCROLLS.items());
iconInt = ((Scroll) item).initials(); } else { iconInt = ((Potion) item).initials();