mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 19:58:00 +00:00
- Improved tapUnpreferredTargeting AI.
This commit is contained in:
@@ -247,9 +247,15 @@ public abstract class TapAiBase extends SpellAbilityAi {
|
||||
list = CardLists.getValidCards(list, tgt.getValidTgts(), source.getController(), source);
|
||||
list = CardLists.getTargetableCards(list, sa);
|
||||
|
||||
// try to tap anything controlled by the computer
|
||||
List<Card> tapList = CardLists.filterControlledBy(list, ai.getOpponents());
|
||||
if (tapTargetList(ai, sa, tapList, mandatory)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// filter by enchantments and planeswalkers, their tapped state doesn't matter.
|
||||
final String[] tappablePermanents = { "Enchantment", "Planeswalker" };
|
||||
List<Card> tapList = CardLists.getValidCards(list, tappablePermanents, source.getController(), source);
|
||||
tapList = CardLists.getValidCards(list, tappablePermanents, source.getController(), source);
|
||||
|
||||
if (tapTargetList(ai, sa, tapList, mandatory)) {
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user