Fix ignoring Guardian Beast

This commit is contained in:
tool4EvEr
2023-02-13 18:18:29 +01:00
parent 3733983874
commit e48ac2e623
3 changed files with 5 additions and 2 deletions

View File

@@ -265,7 +265,8 @@ public class AiCostDecision extends CostDecisionMakerBase {
int c = cost.getAbilityAmount(ability);
final CardCollection typeList = CardLists.getValidCards(player.getGame().getCardsIn(ZoneType.Battlefield), cost.getType().split(";"), player, source, ability);
CardCollection typeList = CardLists.getValidCards(player.getGame().getCardsIn(ZoneType.Battlefield), cost.getType().split(";"), player, source, ability);
typeList = CardLists.filter(typeList, crd -> crd.canBeControlledBy(player));
if (typeList.size() < c) {
return null;

View File

@@ -77,6 +77,7 @@ public class CostGainControl extends CostPartWithList {
final Card source = ability.getHostCard();
CardCollectionView typeList = payer.getGame().getCardsIn(ZoneType.Battlefield);
typeList = CardLists.getValidCards(typeList, this.getType().split(";"), payer, source, ability);
typeList = CardLists.filter(typeList, c -> c.canBeControlledBy(payer));
return typeList.size() >= getAbilityAmount(ability);
}

View File

@@ -509,7 +509,8 @@ public class HumanCostDecision extends CostDecisionMakerBase {
int c = cost.getAbilityAmount(ability);
final CardCollectionView list = player.getCardsIn(ZoneType.Battlefield);
final CardCollectionView validCards = CardLists.getValidCards(list, cost.getType().split(";"), player, source, ability);
CardCollectionView validCards = CardLists.getValidCards(list, cost.getType().split(";"), player, source, ability);
validCards = CardLists.filter(validCards, crd -> crd.canBeControlledBy(player));
final InputSelectCardsFromList inp = new InputSelectCardsFromList(controller, c, validCards, ability);
final String desc = cost.getTypeDescription() == null ? cost.getType() : cost.getTypeDescription();