- Improved the AI of AF DestroyAll to take permanents with SacMe SVar into account.

This commit is contained in:
Sloth
2012-01-13 14:56:34 +00:00
parent c43155c666
commit 4ca067582b

View File

@@ -760,8 +760,18 @@ public class AbilityFactoryDestroy {
humanlist = humanlist.getValidCards(valid.split(","), source.getController(), source); humanlist = humanlist.getValidCards(valid.split(","), source.getController(), source);
computerlist = computerlist.getValidCards(valid.split(","), source.getController(), source); computerlist = computerlist.getValidCards(valid.split(","), source.getController(), source);
humanlist = humanlist.getNotKeyword("Indestructible"); humanlist = humanlist.filter(new CardListFilter() {
computerlist = computerlist.getNotKeyword("Indestructible"); @Override
public boolean addCard(final Card c) {
return !(c.hasKeyword("Indestructible") || c.getSVar("SacMe").length() > 0);
}
});
computerlist = computerlist.filter(new CardListFilter() {
@Override
public boolean addCard(final Card c) {
return !(c.hasKeyword("Indestructible") || c.getSVar("SacMe").length() > 0);
}
});
if (abCost != null) { if (abCost != null) {
// AI currently disabled for some costs // AI currently disabled for some costs