mirror of
https://github.com/magefree/mage.git
synced 2026-01-26 21:29:17 -08:00
Tests: added additional checks on boosters (see #8081);
This commit is contained in:
parent
1ac33efd1b
commit
5e91099f62
3 changed files with 21 additions and 0 deletions
|
|
@ -911,11 +911,16 @@ public class VerifyCardDataTest {
|
|||
cardNames.add(cardInfo.getName());
|
||||
}
|
||||
|
||||
boolean containsDoubleSideCards = false;
|
||||
for (ExpansionSet.SetCardInfo cardInfo : set.getSetCardInfo()) {
|
||||
Card card = CardImpl.createCard(cardInfo.getCardClass(), new CardSetInfo(cardInfo.getName(), set.getCode(),
|
||||
cardInfo.getCardNumber(), cardInfo.getRarity(), cardInfo.getGraphicInfo()));
|
||||
Assert.assertNotNull(card);
|
||||
|
||||
if (card.getSecondCardFace() != null) {
|
||||
containsDoubleSideCards = true;
|
||||
}
|
||||
|
||||
// CHECK: all planeswalkers must be legendary
|
||||
if (card.isPlaneswalker() && !card.getSuperType().contains(SuperType.LEGENDARY)) {
|
||||
errorsList.add("Error: planeswalker must have legendary type: " + set.getCode() + " - " + set.getName() + " - " + card.getName() + " - " + card.getCardNumber());
|
||||
|
|
@ -940,6 +945,16 @@ public class VerifyCardDataTest {
|
|||
}
|
||||
*/
|
||||
}
|
||||
|
||||
// CHECK: double side cards must be in boosters
|
||||
boolean hasBoosterSettings = (set.getNumBoosterDoubleFaced() > 0);
|
||||
if (set.hasBoosters()
|
||||
&& (set.getNumBoosterDoubleFaced() != -1) // -1 must ignore double cards in booster
|
||||
&& containsDoubleSideCards
|
||||
&& !hasBoosterSettings) {
|
||||
errorsList.add("Error: set with boosters contains second side cards, but numBoosterDoubleFaced is not set - "
|
||||
+ set.getCode() + " - " + set.getName());
|
||||
}
|
||||
}
|
||||
|
||||
printMessages(warningsList);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue