Swap out lingering use of Iterables.any

This commit is contained in:
Jetz
2024-10-14 22:51:16 -04:00
parent 6b93e628ac
commit 2d6952f126

View File

@@ -848,7 +848,7 @@ public class CardProperty {
final String restriction = property.split("sharesAllCardTypesWithOther ")[1]; final String restriction = property.split("sharesAllCardTypesWithOther ")[1];
CardCollection list = AbilityUtils.getDefinedCards(source, restriction, spellAbility); CardCollection list = AbilityUtils.getDefinedCards(source, restriction, spellAbility);
list.remove(card); list.remove(card);
return Iterables.any(list, CardPredicates.sharesAllCardTypesWith(card)); return list.anyMatch(CardPredicates.sharesAllCardTypesWith(card));
} else if (property.startsWith("sharesLandTypeWith")) { } else if (property.startsWith("sharesLandTypeWith")) {
final String restriction = property.split("sharesLandTypeWith ")[1]; final String restriction = property.split("sharesLandTypeWith ")[1];
if (!AbilityUtils.getDefinedCards(source, restriction, spellAbility).anyMatch(CardPredicates.sharesLandTypeWith(card))) { if (!AbilityUtils.getDefinedCards(source, restriction, spellAbility).anyMatch(CardPredicates.sharesLandTypeWith(card))) {