- Converted "DifferentCardNames", ready for new DGM card Maze's End

This commit is contained in:
swordshine
2013-04-02 05:21:53 +00:00
parent 0567c7a3a5
commit aa46a48888
2 changed files with 7 additions and 11 deletions

View File

@@ -6,7 +6,7 @@ SVar:DBChoose:DB$ ChooseCard | Defined$ You | Amount$ 1 | AtRandom$ True | Choic
SVar:DBChange:DB$ ChangeZone | Origin$ Library | Destination$ Hand | Defined$ ChosenCard | StackDescription$ None | SubAbility$ DBShuffle | ConditionCheckSVar$ X | ConditionSVarCompare$ EQ3
SVar:DBShuffle:DB$ ChangeZoneAll | ChangeType$ Card.IsRemembered | Origin$ Library | Destination$ Library | Shuffle$ True | SubAbility$ DBCleanup
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
SVar:X:Count$DifferentCardNamesRemembered
SVar:X:Count$DifferentCardNames_Creature.IsRemembered
SVar:RemAIDeck:True
SVar:Picture:http://www.wizards.com/global/images/magic/general/signal_the_clans.jpg
Oracle:Search your library for three creature cards and reveal them. If you reveal three cards with different names, choose one of them at random and put that card into your hand. Shuffle the rest into your library.

View File

@@ -1247,22 +1247,18 @@ public class CardFactoryUtil {
return highest;
}
if (l[0].startsWith("DifferentCardNamesRemembered")) {
final List<Card> list = new ArrayList<Card>();
if (l[0].startsWith("DifferentCardNames_")) {
final List<String> crdname = new ArrayList<String>();
if (c.getRemembered().size() > 0) {
for (final Object o : c.getRemembered()) {
if (o instanceof Card) {
list.add(Singletons.getModel().getGame().getCardState((Card) o));
}
}
}
final String restriction = l[0].substring(19);
final String[] rest = restriction.split(",");
List<Card> list = cardController.getGame().getCardsInGame();
list = CardLists.getValidCards(list, rest, cardController, c);
for (final Card card : list) {
if (!crdname.contains(card.getName())) {
crdname.add(card.getName());
}
}
return crdname.size();
return CardFactoryUtil.doXMath(crdname.size(), m, c);
}
if (l[0].startsWith("RememberedSize")) {