diff --git a/forge-ai/src/main/java/forge/ai/ComputerUtilAbility.java b/forge-ai/src/main/java/forge/ai/ComputerUtilAbility.java index c8c5331068f..af10923a66a 100644 --- a/forge-ai/src/main/java/forge/ai/ComputerUtilAbility.java +++ b/forge-ai/src/main/java/forge/ai/ComputerUtilAbility.java @@ -393,9 +393,13 @@ public class ComputerUtilAbility { } }; - public static List sortCreatureSpells(List all) { - // try to smoothen power creeping by making CMC less of a factor - List creatures = AiController.filterListByApi(Lists.newArrayList(all), ApiType.PermanentCreature); + public static List sortCreatureSpells(final List all) { + // try to smoothen power creep by making CMC less of a factor + final List creatures = AiController.filterListByApi(Lists.newArrayList(all), ApiType.PermanentCreature); + if (creatures.size() <= 1) { + return all; + } + // TODO this doesn't account for nearly identical creatures where one is a newer but more cost efficient variant Collections.sort(creatures, ComputerUtilCard.EvaluateCreatureSpellComparator); int idx = 0; for (int i = 0; i < all.size(); i++) {