Fix Zendikar Expeditions lands in boostes - BFZ booster should contain only expeditions 1-25, OTG only 26-45

This commit is contained in:
Quercitron 2016-01-22 13:07:10 +03:00
parent b23ddd99a0
commit 37db757c4b
4 changed files with 48 additions and 9 deletions

View file

@ -156,7 +156,7 @@ public abstract class ExpansionSet implements Serializable {
List<CardInfo> specialLands = getSpecialLand();
List<CardInfo> basicLands = getCardsByRarity(Rarity.LAND);
for (int i = 0; i < numBoosterLands; i++) {
if (ratioBoosterSpecialLand > 0 && rnd.nextInt(ratioBoosterSpecialLand) == 1 && specialLands != null) {
if (ratioBoosterSpecialLand > 0 && rnd.nextInt(ratioBoosterSpecialLand) == 0 && specialLands != null) {
addToBooster(booster, specialLands);
} else {
addToBooster(booster, basicLands);
@ -174,7 +174,7 @@ public abstract class ExpansionSet implements Serializable {
List<CardInfo> rares = getCardsByRarity(Rarity.RARE);
List<CardInfo> mythics = getCardsByRarity(Rarity.MYTHIC);
for (int i = 0; i < numBoosterRare; i++) {
if (ratioBoosterMythic > 0 && rnd.nextInt(ratioBoosterMythic) == 1) {
if (ratioBoosterMythic > 0 && rnd.nextInt(ratioBoosterMythic) == 0) {
addToBooster(booster, mythics);
} else {
addToBooster(booster, rares);

View file

@ -63,6 +63,7 @@ public class CardCriteria {
private String sortBy;
private Long start;
private Long count;
private int minCardNumber;
private int maxCardNumber;
public CardCriteria() {
@ -81,6 +82,7 @@ public class CardCriteria {
this.white = true;
this.colorless = true;
this.minCardNumber = Integer.MIN_VALUE;
this.maxCardNumber = Integer.MAX_VALUE;
}
@ -179,6 +181,11 @@ public class CardCriteria {
return this;
}
public CardCriteria minCardNumber(int minCardNumber) {
this.minCardNumber = minCardNumber;
return this;
}
public CardCriteria maxCardNumber(int maxCardNumber) {
this.maxCardNumber = maxCardNumber;
return this;
@ -292,6 +299,11 @@ public class CardCriteria {
}
}
if (minCardNumber != Integer.MIN_VALUE) {
where.ge("cardNumber", minCardNumber);
clausesCount++;
}
if (maxCardNumber != Integer.MAX_VALUE) {
where.le("cardNumber", maxCardNumber);
clausesCount++;