diff --git a/Mage.Verify/src/test/java/mage/verify/VerifyCardDataTest.java b/Mage.Verify/src/test/java/mage/verify/VerifyCardDataTest.java index 5c9ecdcf22..5b031b4f6d 100644 --- a/Mage.Verify/src/test/java/mage/verify/VerifyCardDataTest.java +++ b/Mage.Verify/src/test/java/mage/verify/VerifyCardDataTest.java @@ -1364,7 +1364,14 @@ public class VerifyCardDataTest { List cardsList = new ArrayList<>(CardScanner.getAllCards()); Map> setsWithTokens = new HashMap<>(); for (Card card : cardsList) { - String allRules = String.join(" ", card.getRules()).toLowerCase(Locale.ENGLISH); + // must check all card parts (example: Mila, Crafty Companion with Lukka Emblem) + String allRules = CardUtil.getObjectPartsAsObjects(card) + .stream() + .map(obj -> (Card) obj) + .map(Card::getRules) + .flatMap(Collection::stream) + .map(r -> r.toLowerCase(Locale.ENGLISH)) + .collect(Collectors.joining("; ")); if ((allRules.contains("create") && allRules.contains("token")) || (allRules.contains("get") && allRules.contains("emblem"))) { List sourceCards = setsWithTokens.getOrDefault(card.getExpansionSetCode(), null); @@ -1400,8 +1407,12 @@ public class VerifyCardDataTest { String needTokenName = token.getName() .replace(" Token", "") .replace("Emblem ", ""); - // need add card name, so it will skip no name emblems like Sarkhan, the Dragonspeaker + // cards with emblems don't use emblem's name, so check it in card name itself (example: Sarkhan, the Dragonspeaker) + // also must check all card parts (example: Mila, Crafty Companion with Lukka Emblem) if (sourceCards.stream() + .map(CardUtil::getObjectPartsAsObjects) + .flatMap(Collection::stream) + .map(obj -> (Card) obj) .map(card -> card.getName() + " - " + String.join(", ", card.getRules())) .noneMatch(s -> s.contains(needTokenName))) { warningsList.add("info, tok-data has un-used tokens: "