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
|
// 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
|
||||||
|
|||||||
Reference in New Issue
Block a user