diff --git a/Mage.Sets/src/mage/sets/StarWars.java b/Mage.Sets/src/mage/sets/StarWars.java index 2ebff3c3f8..2c540af138 100644 --- a/Mage.Sets/src/mage/sets/StarWars.java +++ b/Mage.Sets/src/mage/sets/StarWars.java @@ -28,7 +28,9 @@ public final class StarWars extends ExpansionSet { this.numBoosterCommon = 10; this.numBoosterUncommon = 3; this.numBoosterRare = 1; + this.numBoosterDoubleFaced = 1; this.ratioBoosterMythic = 8; + cards.add(new SetCardInfo("A-Wing", 96, Rarity.UNCOMMON, mage.cards.a.AWing.class)); cards.add(new SetCardInfo("AAT-1", 160, Rarity.UNCOMMON, mage.cards.a.AAT1.class)); cards.add(new SetCardInfo("Acklay of the Arena", 161, Rarity.RARE, mage.cards.a.AcklayOfTheArena.class)); diff --git a/Mage.Verify/src/test/java/mage/verify/VerifyCardDataTest.java b/Mage.Verify/src/test/java/mage/verify/VerifyCardDataTest.java index 15f6f3bf3f..392750d46d 100644 --- a/Mage.Verify/src/test/java/mage/verify/VerifyCardDataTest.java +++ b/Mage.Verify/src/test/java/mage/verify/VerifyCardDataTest.java @@ -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); diff --git a/Mage/src/main/java/mage/cards/ExpansionSet.java b/Mage/src/main/java/mage/cards/ExpansionSet.java index edfa6e8e5d..23b35ae9d5 100644 --- a/Mage/src/main/java/mage/cards/ExpansionSet.java +++ b/Mage/src/main/java/mage/cards/ExpansionSet.java @@ -672,4 +672,8 @@ public abstract class ExpansionSet implements Serializable { return maxCardNumberInBooster; } + public int getNumBoosterDoubleFaced() { + return numBoosterDoubleFaced; + } + }