mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 20:28:00 +00:00
Swap out lingering use of Iterables.any
This commit is contained in:
@@ -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))) {
|
||||||
|
|||||||
Reference in New Issue
Block a user