mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 19:28:01 +00:00
- Added a canPlayAI() method to Parallel Evolution.
This commit is contained in:
@@ -12577,40 +12577,52 @@ public class CardFactory implements NewConstants {
|
||||
//*************** START *********** START **************************
|
||||
else if(cardName.equals("Parallel Evolution")) {
|
||||
SpellAbility spell = new Spell(card) {
|
||||
|
||||
private static final long serialVersionUID = 3456160935845779623L;
|
||||
|
||||
@Override
|
||||
public boolean canPlayAI() {
|
||||
CardList humTokenCreats = new CardList();
|
||||
humTokenCreats.addAll(AllZone.Human_Play.getCards());
|
||||
humTokenCreats = getTokenCreats(humTokenCreats);
|
||||
|
||||
CardList compTokenCreats = new CardList();
|
||||
compTokenCreats.addAll(AllZone.Computer_Play.getCards());
|
||||
compTokenCreats = getTokenCreats(compTokenCreats);
|
||||
|
||||
return compTokenCreats.size() > humTokenCreats.size();
|
||||
}//canPlayAI()
|
||||
|
||||
CardList getTokenCreats(CardList list) {
|
||||
list = list.filter(new CardListFilter() {
|
||||
public boolean addCard(Card c) {
|
||||
return c.isCreature() && c.isToken();
|
||||
}
|
||||
});
|
||||
return list;
|
||||
}//getTokenCreats()
|
||||
|
||||
@Override
|
||||
public void resolve() {
|
||||
|
||||
// for each play zone add a copy of each creature token card
|
||||
CardList creature = new CardList();
|
||||
creature.addAll(AllZone.Human_Play.getCards());
|
||||
creature.addAll(AllZone.Computer_Play.getCards());
|
||||
|
||||
creature = creature.getType("Creature");
|
||||
|
||||
creature = creature.filter(new CardListFilter()
|
||||
{
|
||||
public boolean addCard(Card crd)
|
||||
{
|
||||
return crd.isToken();
|
||||
}
|
||||
});
|
||||
|
||||
CardFactoryUtil.copyTokens(creature);
|
||||
|
||||
}
|
||||
};
|
||||
// for each play zone add a copy of each creature token card
|
||||
CardList AllTokenCreatures = new CardList();
|
||||
AllTokenCreatures.addAll(AllZone.Human_Play.getCards());
|
||||
AllTokenCreatures.addAll(AllZone.Computer_Play.getCards());
|
||||
|
||||
AllTokenCreatures = getTokenCreats(AllTokenCreatures);
|
||||
|
||||
CardFactoryUtil.copyTokens(AllTokenCreatures);
|
||||
|
||||
}//resolve()
|
||||
};//SpellAbility
|
||||
|
||||
spell.setDescription("For each creature token on the battlefield, its controller puts a token that's a copy of that creature onto the battlefield.");
|
||||
spell.setStackDescription("For each creature token on the battlefield, its controller puts a token that's a copy of that creature onto the battlefield.");
|
||||
spell.setStackDescription("Parallel Evolution - For each creature token on the battlefield, its controller puts a token that's a copy of that creature onto the battlefield.");
|
||||
|
||||
card.setFlashback(true);
|
||||
card.clearSpellAbility();
|
||||
card.addSpellAbility(spell);
|
||||
card.addSpellAbility(CardFactoryUtil.ability_Flashback(card, "4 G G G", "0"));
|
||||
|
||||
}//*************** END ************ END **************************
|
||||
|
||||
//*************** START *********** START **************************
|
||||
|
||||
Reference in New Issue
Block a user