AI should no longer attempt to use Animate Artifact to animate an equipment.

This commit is contained in:
jendave
2011-08-06 04:42:27 +00:00
parent 42ee86d473
commit 3311b084f2

View File

@@ -689,11 +689,16 @@ class CardFactory_Auras {
@Override @Override
public boolean canPlayAI() { public boolean canPlayAI() {
/*
CardList list = new CardList(AllZone.Computer_Play.getCards()); // Target computer artifact * AI targets computer artifact but not artifact equipment
*/
CardList list = new CardList(AllZone.Computer_Play.getCards());
list = list.filter(new CardListFilter() { list = list.filter(new CardListFilter() {
public boolean addCard(Card c) { public boolean addCard(Card c) {
return !c.isCreature() && CardFactoryUtil.canTarget(card, c) && c.isArtifact(); return !c.isCreature() &&
CardFactoryUtil.canTarget(card, c) &&
c.isArtifact() &&
!c.getType().contains("Equipment");
} }
}); });
@@ -701,7 +706,6 @@ class CardFactory_Auras {
return false; return false;
} else { } else {
Card crd = CardFactoryUtil.AI_getBestArtifact(list); Card crd = CardFactoryUtil.AI_getBestArtifact(list);
// int cmc = CardUtil.getConvertedManaCost(crd);
if (CardUtil.getConvertedManaCost(crd) >= 2) setTargetCard(crd); if (CardUtil.getConvertedManaCost(crd) >= 2) setTargetCard(crd);
else return false; else return false;
} }