mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-15 18:28:00 +00:00
Fix ignoring Guardian Beast
This commit is contained in:
@@ -265,7 +265,8 @@ public class AiCostDecision extends CostDecisionMakerBase {
|
|||||||
|
|
||||||
int c = cost.getAbilityAmount(ability);
|
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) {
|
if (typeList.size() < c) {
|
||||||
return null;
|
return null;
|
||||||
|
|||||||
@@ -77,6 +77,7 @@ public class CostGainControl extends CostPartWithList {
|
|||||||
final Card source = ability.getHostCard();
|
final Card source = ability.getHostCard();
|
||||||
CardCollectionView typeList = payer.getGame().getCardsIn(ZoneType.Battlefield);
|
CardCollectionView typeList = payer.getGame().getCardsIn(ZoneType.Battlefield);
|
||||||
typeList = CardLists.getValidCards(typeList, this.getType().split(";"), payer, source, ability);
|
typeList = CardLists.getValidCards(typeList, this.getType().split(";"), payer, source, ability);
|
||||||
|
typeList = CardLists.filter(typeList, c -> c.canBeControlledBy(payer));
|
||||||
|
|
||||||
return typeList.size() >= getAbilityAmount(ability);
|
return typeList.size() >= getAbilityAmount(ability);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -509,7 +509,8 @@ public class HumanCostDecision extends CostDecisionMakerBase {
|
|||||||
int c = cost.getAbilityAmount(ability);
|
int c = cost.getAbilityAmount(ability);
|
||||||
|
|
||||||
final CardCollectionView list = player.getCardsIn(ZoneType.Battlefield);
|
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 InputSelectCardsFromList inp = new InputSelectCardsFromList(controller, c, validCards, ability);
|
||||||
final String desc = cost.getTypeDescription() == null ? cost.getType() : cost.getTypeDescription();
|
final String desc = cost.getTypeDescription() == null ? cost.getType() : cost.getTypeDescription();
|
||||||
|
|||||||
Reference in New Issue
Block a user