mirror of
https://github.com/correl/mage.git
synced 2024-12-25 11:11:16 +00:00
updated ZNR and KHM boosters to use new mythic rare likelihood
This commit is contained in:
parent
21ef775700
commit
5b02430837
3 changed files with 9 additions and 5 deletions
|
@ -34,7 +34,7 @@ public final class Kaldheim extends ExpansionSet {
|
||||||
this.numBoosterCommon = 10;
|
this.numBoosterCommon = 10;
|
||||||
this.numBoosterUncommon = 3;
|
this.numBoosterUncommon = 3;
|
||||||
this.numBoosterRare = 1;
|
this.numBoosterRare = 1;
|
||||||
this.ratioBoosterMythic = 8;
|
this.ratioBoosterMythic = 7.4;
|
||||||
this.maxCardNumberInBooster = 285;
|
this.maxCardNumberInBooster = 285;
|
||||||
this.ratioBoosterSpecialLand = 12;
|
this.ratioBoosterSpecialLand = 12;
|
||||||
this.ratioBoosterSpecialLandNumerator = 5;
|
this.ratioBoosterSpecialLandNumerator = 5;
|
||||||
|
|
|
@ -28,7 +28,7 @@ public final class ZendikarRising extends ExpansionSet {
|
||||||
this.numBoosterCommon = 10;
|
this.numBoosterCommon = 10;
|
||||||
this.numBoosterUncommon = 3;
|
this.numBoosterUncommon = 3;
|
||||||
this.numBoosterRare = 1;
|
this.numBoosterRare = 1;
|
||||||
this.ratioBoosterMythic = 8;
|
this.ratioBoosterMythic = 7.4;
|
||||||
this.maxCardNumberInBooster = 280;
|
this.maxCardNumberInBooster = 280;
|
||||||
|
|
||||||
cards.add(new SetCardInfo("Acquisitions Expert", 89, Rarity.UNCOMMON, mage.cards.a.AcquisitionsExpert.class));
|
cards.add(new SetCardInfo("Acquisitions Expert", 89, Rarity.UNCOMMON, mage.cards.a.AcquisitionsExpert.class));
|
||||||
|
|
|
@ -108,7 +108,7 @@ public abstract class ExpansionSet implements Serializable {
|
||||||
protected int numBoosterUncommon;
|
protected int numBoosterUncommon;
|
||||||
protected int numBoosterRare;
|
protected int numBoosterRare;
|
||||||
protected int numBoosterDoubleFaced; // -1 = include normally 0 = exclude 1-n = include explicit
|
protected int numBoosterDoubleFaced; // -1 = include normally 0 = exclude 1-n = include explicit
|
||||||
protected int ratioBoosterMythic;
|
protected double ratioBoosterMythic;
|
||||||
protected boolean hasPartnerMechanic = false;
|
protected boolean hasPartnerMechanic = false;
|
||||||
|
|
||||||
protected boolean needsLegendCreature = false;
|
protected boolean needsLegendCreature = false;
|
||||||
|
@ -333,6 +333,10 @@ public abstract class ExpansionSet implements Serializable {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private boolean checkMythic() {
|
||||||
|
return ratioBoosterMythic > 0 && ratioBoosterMythic * RandomUtil.nextDouble() <= 1;
|
||||||
|
}
|
||||||
|
|
||||||
public List<Card> createPartnerBooster() {
|
public List<Card> createPartnerBooster() {
|
||||||
|
|
||||||
List<Card> booster = new ArrayList<>();
|
List<Card> booster = new ArrayList<>();
|
||||||
|
@ -369,7 +373,7 @@ public abstract class ExpansionSet implements Serializable {
|
||||||
List<CardInfo> rares = getCardsByRarity(Rarity.RARE);
|
List<CardInfo> rares = getCardsByRarity(Rarity.RARE);
|
||||||
List<CardInfo> mythics = getCardsByRarity(Rarity.MYTHIC);
|
List<CardInfo> mythics = getCardsByRarity(Rarity.MYTHIC);
|
||||||
for (int i = 0; i < numBoosterRare; i++) {
|
for (int i = 0; i < numBoosterRare; i++) {
|
||||||
if (ratioBoosterMythic > 0 && RandomUtil.nextInt(ratioBoosterMythic) == 0) {
|
if (checkMythic()) {
|
||||||
while (true) {
|
while (true) {
|
||||||
addToBooster(booster, mythics);
|
addToBooster(booster, mythics);
|
||||||
int check = addMissingPartner(booster, partnerAllowed, -1, 1);
|
int check = addMissingPartner(booster, partnerAllowed, -1, 1);
|
||||||
|
@ -448,7 +452,7 @@ public abstract class ExpansionSet implements Serializable {
|
||||||
List<CardInfo> rares = getCardsByRarity(Rarity.RARE);
|
List<CardInfo> rares = getCardsByRarity(Rarity.RARE);
|
||||||
List<CardInfo> mythics = getCardsByRarity(Rarity.MYTHIC);
|
List<CardInfo> mythics = getCardsByRarity(Rarity.MYTHIC);
|
||||||
for (int i = 0; i < numBoosterRare; i++) {
|
for (int i = 0; i < numBoosterRare; i++) {
|
||||||
if (ratioBoosterMythic > 0 && RandomUtil.nextInt(ratioBoosterMythic) == 0) {
|
if (checkMythic()) {
|
||||||
addToBooster(booster, mythics);
|
addToBooster(booster, mythics);
|
||||||
} else {
|
} else {
|
||||||
addToBooster(booster, rares);
|
addToBooster(booster, rares);
|
||||||
|
|
Loading…
Reference in a new issue