mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 11:48:02 +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 **************************
|
//*************** START *********** START **************************
|
||||||
else if(cardName.equals("Parallel Evolution")) {
|
else if(cardName.equals("Parallel Evolution")) {
|
||||||
SpellAbility spell = new Spell(card) {
|
SpellAbility spell = new Spell(card) {
|
||||||
|
|
||||||
private static final long serialVersionUID = 3456160935845779623L;
|
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
|
@Override
|
||||||
public void resolve() {
|
public void resolve() {
|
||||||
|
|
||||||
// for each play zone add a copy of each creature token card
|
// for each play zone add a copy of each creature token card
|
||||||
CardList creature = new CardList();
|
CardList AllTokenCreatures = new CardList();
|
||||||
creature.addAll(AllZone.Human_Play.getCards());
|
AllTokenCreatures.addAll(AllZone.Human_Play.getCards());
|
||||||
creature.addAll(AllZone.Computer_Play.getCards());
|
AllTokenCreatures.addAll(AllZone.Computer_Play.getCards());
|
||||||
|
|
||||||
creature = creature.getType("Creature");
|
AllTokenCreatures = getTokenCreats(AllTokenCreatures);
|
||||||
|
|
||||||
creature = creature.filter(new CardListFilter()
|
CardFactoryUtil.copyTokens(AllTokenCreatures);
|
||||||
{
|
|
||||||
public boolean addCard(Card crd)
|
}//resolve()
|
||||||
{
|
};//SpellAbility
|
||||||
return crd.isToken();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
CardFactoryUtil.copyTokens(creature);
|
|
||||||
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
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.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.setFlashback(true);
|
||||||
card.clearSpellAbility();
|
card.clearSpellAbility();
|
||||||
card.addSpellAbility(spell);
|
card.addSpellAbility(spell);
|
||||||
card.addSpellAbility(CardFactoryUtil.ability_Flashback(card, "4 G G G", "0"));
|
card.addSpellAbility(CardFactoryUtil.ability_Flashback(card, "4 G G G", "0"));
|
||||||
|
|
||||||
}//*************** END ************ END **************************
|
}//*************** END ************ END **************************
|
||||||
|
|
||||||
//*************** START *********** START **************************
|
//*************** START *********** START **************************
|
||||||
|
|||||||
Reference in New Issue
Block a user