Slight cleanup amendment to the MoveCounters AI (#8866)

* - Fix MoveCounters with beneficial counters.

* - Slight cleanup.
This commit is contained in:
Agetian
2025-10-08 14:23:11 +03:00
committed by GitHub
parent 5a59113d78
commit f0f1f5a1d4

View File

@@ -426,11 +426,9 @@ public class CountersMoveAi extends SpellAbilityAi {
// try to move to something useless or something that would leave play // try to move to something useless or something that would leave play
boolean isNegative = ComputerUtil.isNegativeCounter(cType, src); boolean isNegative = ComputerUtil.isNegativeCounter(cType, src);
List<Card> filteredTgtList; List<Card> filteredTgtList;
if (isNegative) { filteredTgtList = isNegative ? CardLists.filterControlledBy(tgtCards, ai.getOpponents()) :
filteredTgtList = CardLists.filterControlledBy(tgtCards, ai.getOpponents()); CardLists.filter(tgtCards, CardPredicates.isControlledByAnyOf(ai.getAllies()).or(CardPredicates.isController(ai)));
} else {
filteredTgtList = CardLists.filter(tgtCards, CardPredicates.isControlledByAnyOf(ai.getAllies()).or(CardPredicates.isController(ai)));
}
if (!filteredTgtList.isEmpty()) { if (!filteredTgtList.isEmpty()) {
List<Card> best = CardLists.filter(filteredTgtList, card -> { List<Card> best = CardLists.filter(filteredTgtList, card -> {
// gain from useless // gain from useless