This commit is contained in:
tool4EvEr
2023-01-26 10:15:53 +01:00
parent 616309c22f
commit 5ae42b4c71
7 changed files with 11 additions and 12 deletions

View File

@@ -1637,6 +1637,8 @@ public class AiController {
return false;
}
// TODO needed to pay propaganda
return true;
}

View File

@@ -240,9 +240,9 @@ public class AiCostDecision extends CostDecisionMakerBase {
@Override
public PaymentDecision visit(final CostEnlist cost) {
CardCollection choices = cost.getCardsForEnlisting(player, source, ability);
CardCollection choices = CostEnlist.getCardsForEnlisting(player);
CardLists.sortByPowerDesc(choices);
return PaymentDecision.card(choices.getFirst());
return choices.isEmpty() ? null : PaymentDecision.card(choices.getFirst());
}
@Override

View File

@@ -1208,6 +1208,8 @@ public class ComputerUtilCombat {
theTriggers.addAll(blocker.getTriggers());
}
// TODO consider Exert + Enlist
// look out for continuous static abilities that only care for attacking creatures
if (!withoutCombatStaticAbilities) {
final CardCollectionView cardList = CardCollection.combine(game.getCardsIn(ZoneType.Battlefield), game.getCardsIn(ZoneType.Command));

View File

@@ -341,7 +341,7 @@ public class PlayerControllerAi extends PlayerController {
@Override
public List<Card> enlistAttackers(List<Card> attackers) {
CardCollection cards = CostEnlist.getCardsForEnlisting(brains.getPlayer(), null, null);
CardCollection cards = CostEnlist.getCardsForEnlisting(brains.getPlayer());
ComputerUtilCard.sortByEvaluateCreature(new CardCollection(attackers));
// do not enlist more than available payment choices
attackers = attackers.subList(0, cards.size());