mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 12:18:00 +00:00
- Improved the AI of AF DestroyAll to take permanents with SacMe SVar into account.
This commit is contained in:
@@ -759,9 +759,19 @@ 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
|
||||||
|
|||||||
Reference in New Issue
Block a user