mirror of
https://github.com/magefree/mage.git
synced 2026-01-10 21:02:08 -08:00
Fix dual lands generation in the Core Set 2019 boosters
This commit is contained in:
parent
30246732b8
commit
36c004122a
3 changed files with 27 additions and 29 deletions
|
|
@ -7,6 +7,9 @@ import java.util.List;
|
|||
import mage.cards.Card;
|
||||
import mage.cards.repository.CardInfo;
|
||||
import mage.cards.repository.CardScanner;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.sets.CoreSet2019;
|
||||
import mage.sets.FateReforged;
|
||||
import mage.sets.MastersEditionII;
|
||||
import mage.sets.MastersEditionIV;
|
||||
|
|
@ -99,6 +102,19 @@ public class BoosterGenerationTest extends MageTestBase {
|
|||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testCoreSet2019_DualLandsAreGenerated() {
|
||||
List<Card> allCards = new ArrayList<>();
|
||||
for (int i = 0; i < 50; i++) {
|
||||
List<Card> booster = CoreSet2019.getInstance().createBooster();
|
||||
// check that booster contains a land card
|
||||
assertTrue(booster.stream().anyMatch(card -> card.getCardType().contains(CardType.LAND)));
|
||||
allCards.addAll(booster);
|
||||
}
|
||||
// check that some dual lands were generated
|
||||
assertTrue(allCards.stream().anyMatch(card -> card.getCardType().contains(CardType.LAND) && card.getRarity().equals(Rarity.COMMON)));
|
||||
}
|
||||
|
||||
private static String str(List<Card> cards) {
|
||||
StringBuilder sb = new StringBuilder("[");
|
||||
Iterator<Card> iterator = cards.iterator();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue