1) Added a canPlayAI() method to Reprisal.

2) Added the updated canPlayAI() method to Squirrel Nest.
This commit is contained in:
jendave
2011-08-06 04:04:22 +00:00
parent 712315b6f1
commit a089241e5c
2 changed files with 33 additions and 0 deletions

View File

@@ -17078,6 +17078,21 @@ public class CardFactory implements NewConstants {
final SpellAbility spell = new Spell(card) { final SpellAbility spell = new Spell(card) {
private static final long serialVersionUID = 8653455310355884536L; private static final long serialVersionUID = 8653455310355884536L;
public boolean canPlayAI() {
CardList list = new CardList(AllZone.Human_Play.getCards());
list = list.filter(new CardListFilter() {
public boolean addCard(Card c) {
return c.isCreature() && c.getNetAttack() > 3 && CardFactoryUtil.canTarget(card, c);
}
});
if (list.isEmpty()) return false;
CardListUtil.sortAttack(list);
CardListUtil.sortFlying(list);
setTargetCard(list.get(0));
return true;
}//canPlayAI()
public void resolve() { public void resolve() {
if(AllZone.GameAction.isCardInPlay(getTargetCard())) { if(AllZone.GameAction.isCardInPlay(getTargetCard())) {
AllZone.GameAction.destroy(getTargetCard()); AllZone.GameAction.destroy(getTargetCard());

View File

@@ -394,6 +394,23 @@ class CardFactory_Auras {
private static final long serialVersionUID = 6115713202262504968L; private static final long serialVersionUID = 6115713202262504968L;
@Override @Override
public boolean canPlayAI() {
CardList list = new CardList(AllZone.Computer_Play.getCards());
list = list.filter(new CardListFilter() {
public boolean addCard(Card c) {
return c.isLand() && !c.isEnchanted() && CardFactoryUtil.canTarget(card, c);
}
});
if (list.isEmpty()) return false;
else {
list.shuffle();
setTargetCard(list.get(0));
return true;
}
}//canPlayAI()
/*
public boolean canPlayAI() { public boolean canPlayAI() {
CardList list = new CardList(AllZone.Computer_Play.getCards()); CardList list = new CardList(AllZone.Computer_Play.getCards());
list = list.getType("Land"); list = list.getType("Land");
@@ -403,6 +420,7 @@ class CardFactory_Auras {
setTargetCard(list.get(0)); setTargetCard(list.get(0));
return true; return true;
}//canPlayAI() }//canPlayAI()
*/
@Override @Override
public void resolve() { public void resolve() {