mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-11 16:26:22 +00:00
Slight cleanup amendment to the MoveCounters AI (#8866)
* - Fix MoveCounters with beneficial counters. * - Slight cleanup.
This commit is contained in:
@@ -426,11 +426,9 @@ public class CountersMoveAi extends SpellAbilityAi {
|
||||
// try to move to something useless or something that would leave play
|
||||
boolean isNegative = ComputerUtil.isNegativeCounter(cType, src);
|
||||
List<Card> filteredTgtList;
|
||||
if (isNegative) {
|
||||
filteredTgtList = CardLists.filterControlledBy(tgtCards, ai.getOpponents());
|
||||
} else {
|
||||
filteredTgtList = CardLists.filter(tgtCards, CardPredicates.isControlledByAnyOf(ai.getAllies()).or(CardPredicates.isController(ai)));
|
||||
}
|
||||
filteredTgtList = isNegative ? CardLists.filterControlledBy(tgtCards, ai.getOpponents()) :
|
||||
CardLists.filter(tgtCards, CardPredicates.isControlledByAnyOf(ai.getAllies()).or(CardPredicates.isController(ai)));
|
||||
|
||||
if (!filteredTgtList.isEmpty()) {
|
||||
List<Card> best = CardLists.filter(filteredTgtList, card -> {
|
||||
// gain from useless
|
||||
|
||||
Reference in New Issue
Block a user