mirror of
https://github.com/correl/mage.git
synced 2024-11-15 11:09:30 +00:00
Fix that MaxCardNumberInBooster filter is applied incorrectly and only part of the commons is used for booster generation in the Core Set 2019, Dragon's Maze and Fate Reforged sets
This commit is contained in:
parent
a63fe12fce
commit
992470e1ea
3 changed files with 9 additions and 9 deletions
|
@ -370,10 +370,10 @@ public final class CoreSet2019 extends ExpansionSet {
|
|||
CardCriteria criteria = new CardCriteria();
|
||||
criteria.rarities(Rarity.COMMON);
|
||||
criteria.setCodes(this.code).notTypes(CardType.LAND);
|
||||
if (maxCardNumberInBooster != Integer.MAX_VALUE) {
|
||||
criteria.maxCardNumber(maxCardNumberInBooster);
|
||||
}
|
||||
savedCardsInfos = CardRepository.instance.findCards(criteria);
|
||||
if (maxCardNumberInBooster != Integer.MAX_VALUE) {
|
||||
savedCardsInfos.removeIf(next -> next.getCardNumberAsInt() > maxCardNumberInBooster && rarity != Rarity.LAND);
|
||||
}
|
||||
savedCards.put(rarity, savedCardsInfos);
|
||||
}
|
||||
// Return a copy of the saved cards information, as not to let modify the original.
|
||||
|
|
|
@ -202,10 +202,10 @@ public final class DragonsMaze extends ExpansionSet {
|
|||
CardCriteria criteria = new CardCriteria();
|
||||
criteria.setCodes(this.code).notTypes(CardType.LAND);
|
||||
criteria.rarities(rarity).doubleFaced(false);
|
||||
if (maxCardNumberInBooster != Integer.MAX_VALUE) {
|
||||
criteria.maxCardNumber(maxCardNumberInBooster);
|
||||
}
|
||||
savedCardsInfos = CardRepository.instance.findCards(criteria);
|
||||
if (maxCardNumberInBooster != Integer.MAX_VALUE) {
|
||||
savedCardsInfos.removeIf(next -> next.getCardNumberAsInt() > maxCardNumberInBooster && rarity != Rarity.LAND);
|
||||
}
|
||||
savedCards.put(rarity, savedCardsInfos);
|
||||
}
|
||||
// Return a copy of the saved cards information, as not to modify the original.
|
||||
|
|
|
@ -236,10 +236,10 @@ public final class FateReforged extends ExpansionSet {
|
|||
CardCriteria criteria = new CardCriteria();
|
||||
criteria.rarities(Rarity.COMMON);
|
||||
criteria.setCodes(this.code).notTypes(CardType.LAND);
|
||||
if (maxCardNumberInBooster != Integer.MAX_VALUE) {
|
||||
criteria.maxCardNumber(maxCardNumberInBooster);
|
||||
}
|
||||
savedCardsInfos = CardRepository.instance.findCards(criteria);
|
||||
if (maxCardNumberInBooster != Integer.MAX_VALUE) {
|
||||
savedCardsInfos.removeIf(next -> next.getCardNumberAsInt() > maxCardNumberInBooster && rarity != Rarity.LAND);
|
||||
}
|
||||
savedCards.put(rarity, savedCardsInfos);
|
||||
}
|
||||
// Return a copy of the saved cards information, as not to let modify the original.
|
||||
|
|
Loading…
Reference in a new issue