Merge branch 'master' into 'master'

Improve ChangeZoneAI for exiling any number of stuff from the battlefield

See merge request core-developers/forge!4033
This commit is contained in:
Michael Kamensky
2021-02-27 07:11:46 +00:00
2 changed files with 35 additions and 0 deletions

View File

@@ -1548,6 +1548,40 @@ public class ChangeZoneAi extends SpellAbilityAi {
if (player.isOpponentOf(decider)) {
c = ComputerUtilCard.getBestAI(fetchList);
} else {
// exclude tokens, they won't come back, and enchanted stuff, since auras will go away
if (!sa.hasParam("Mandatory") && origin.contains(ZoneType.Battlefield)) {
fetchList = CardLists.filter(fetchList, new Predicate<Card>() {
@Override
public boolean apply(final Card card) {
if (card.getOwner().isOpponentOf(decider)) {
return true;
}
if (card.isToken()) {
return false;
}
if (card.isCreature() && ComputerUtilCard.isUselessCreature(decider, card)) {
return true;
} else if (card.isEquipped()) {
return false;
} else if (card.isEnchanted()) {
for (Card enc : card.getEnchantedBy()) {
if (enc.getOwner().isOpponentOf(decider)) {
return true;
}
}
return false;
} else if (card.isAura()) {
return false;
}
return true;
}
});
if (fetchList.isEmpty()) {
return null;
}
}
c = ComputerUtilCard.getWorstAI(fetchList);
if (ComputerUtilAbility.getAbilitySourceName(sa).equals("Temur Sabertooth")) {
Card tobounce = canBouncePermanent(player, sa, fetchList);

View File

@@ -7,3 +7,4 @@ There are new Net Deck categories - the Standard, Modern, and Pioneer archives.
Draft cubes have been updated to account for the newly supported cards, MTGO Vintage December 2020 cube was added.
New Possibility Storm puzzles were added to the Puzzle Mode (IKO/M21/ZNR/KHM), including puzzles that utilize Mutate.
Planar Conquest now has a new plane accessible - Eldraine.
Forge now supports promos which are available on Scryfall.