mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 12:48:00 +00:00
ComputerUtil: chooseTapType add exclude parameter (like using for already selected for tapping)
This commit is contained in:
@@ -449,8 +449,13 @@ public class ComputerUtil {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static CardCollection chooseTapType(final Player ai, final String type, final Card activate, final boolean tap, final int amount) {
|
public static CardCollection chooseTapType(final Player ai, final String type, final Card activate, final boolean tap, final int amount) {
|
||||||
|
return chooseTapType(ai, type, activate, tap, amount, CardCollection.EMPTY);
|
||||||
|
}
|
||||||
|
public static CardCollection chooseTapType(final Player ai, final String type, final Card activate, final boolean tap, final int amount, final CardCollectionView exclude) {
|
||||||
|
CardCollection all = new CardCollection(ai.getCardsIn(ZoneType.Battlefield));
|
||||||
|
all.removeAll(exclude);
|
||||||
CardCollection typeList =
|
CardCollection typeList =
|
||||||
CardLists.getValidCards(ai.getCardsIn(ZoneType.Battlefield), type.split(";"), activate.getController(), activate, null);
|
CardLists.getValidCards(all, type.split(";"), activate.getController(), activate, null);
|
||||||
|
|
||||||
// is this needed?
|
// is this needed?
|
||||||
typeList = CardLists.filter(typeList, Presets.UNTAPPED);
|
typeList = CardLists.filter(typeList, Presets.UNTAPPED);
|
||||||
|
|||||||
Reference in New Issue
Block a user