/** * getTokenCreatures. * * @param cards a {@link java.util.ArrayList} object. * @return a {@link java.util.ArrayList} object. */ public static ArrayList<Card> getTokenCreatures(ArrayList<Card> cards) { ArrayList<Card> ret = new ArrayList<Card>(); for (Card c : cards) { if (c.isCreature() && c.isToken() && !c.isEquipped() && !c.isEnchanted()) ret.add(c); } return ret; }
/** * getTokenCreatures. * * @param cards a {@link java.util.ArrayList} object. * @param tokenName a {@link java.lang.String} object. * @return a {@link java.util.ArrayList} object. */ public static ArrayList<Card> getTokenCreatures(ArrayList<Card> cards, String tokenName) { ArrayList<Card> ret = new ArrayList<Card>(); for (Card c : cards) { String name = c.getName(); if (c.isCreature() && c.isToken() && name.equals(tokenName)) ret.add(c); } return ret; }
/** * isStackable. * * @param c a {@link forge.Card} object. * @return a boolean. */ public static boolean isStackable(Card c) { /*String name = c.getName(); if( name.equals("Swamp") || name.equals("Bog") || name.equals("Forest") || name.equals("Grass") || name.equals("Plains") || name.equals("White Sand") || name.equals("Mountain") || name.equals("Rock") || name.equals("Island") || name.equals("Underwater")) { return true; } */ if (c.isLand() || (c.getName().startsWith("Mox") && !c.getName().equals("Mox Diamond")) || (c.isLand() && c.isEnchanted()) || (c.isAura() && c.isEnchanting()) || (c.isToken() && CardFactoryUtil.multipleControlled(c)) || (c.isCreature() && (c.isEquipped() || c.isEnchanted())) || (c.isEquipment() && c.isEquipping()) || (c.isEnchantment()) || (c instanceof ManaPool && c.isSnow())) return true; return false; }