- Rechanged ValidGrave to Valid<AnyZone> count method that was lost in the merge.

This commit is contained in:
moomarc
2012-11-28 05:29:18 +00:00
parent 693a9bc119
commit b4e9c9ec15

View File

@@ -1975,11 +1975,13 @@ public class CardFactoryUtil {
} }
} }
// count valid cards in the garveyard // count valid cards in any specified zone/s
if (l[0].startsWith("ValidGrave")) { if (l[0].startsWith("Valid") && !l[0].contains("Valid ")) {
String restrictions = l[0].replace("ValidGrave ", ""); String[] lparts = l[0].split(" ", 2);
final List<ZoneType> vZone = ZoneType.listValueOf(lparts[0].split("Valid")[1]);
String restrictions = l[0].replace(lparts[0] + " ", "");
final String[] rest = restrictions.split(","); final String[] rest = restrictions.split(",");
List<Card> cards = Singletons.getModel().getGame().getCardsIn(ZoneType.Graveyard); List<Card> cards = Singletons.getModel().getGame().getCardsIn(vZone);
cards = CardLists.getValidCards(cards, rest, cardController, c); cards = CardLists.getValidCards(cards, rest, cardController, c);
n = cards.size(); n = cards.size();