Fixing Planeshift set alter foils in boosters

-Now always foil, and with the (guesstimated) correct chance.
This commit is contained in:
Seravy
2018-02-12 01:11:03 +01:00
parent 36917c0d18
commit 8f9857e72d
2 changed files with 30 additions and 5 deletions

View File

@@ -91,11 +91,12 @@ public class BoosterGenerator {
// 7 Time Shifted
// 8 VMA Special
// 9 DFC
// 10 Planeshift alternate art foil
// if result not valid for pack, reroll
// Other special types of foil slots, add here
CardRarity foilCard = CardRarity.Unknown;
while (foilCard == CardRarity.Unknown) {
int randomNum = rand.nextInt(9) + 1;
int randomNum = rand.nextInt(10) + 1;
switch (randomNum) {
case 1:
// Rare or Mythic
@@ -139,6 +140,19 @@ public class BoosterGenerator {
}
}
break;
case 10:
if (edition != null) {
if (edition.getName().equals("Planeshift")) {
// Chance equals chance of getting the same card as non-alter foil rare.
// so 3 out of the 53 rares in the set.
// while information cannot be found, my personal (subjective) experience from that time was
// that they were indeed similar chance, at least not significantly less.
if (rand.nextInt(53) <= 3) {
foilCard = CardRarity.Special;
}
}
}
break;
// Insert any additional special rarities/slot types for special
// sets here, for 11 and up
default:
@@ -225,6 +239,17 @@ public class BoosterGenerator {
numCards--;
}
// Planeshift foil alternate art replaces rare slot even though it comes from the
// special slot that normally has no cards!
if (edition != null) {
if ((edition.getName().equals("Planeshift")) &&
(slotType.startsWith(BoosterSlots.RARE))
&& (foilSlot.startsWith(BoosterSlots.SPECIAL))
) {
numCards--;
}
}
if (replaceCommon && slotType.startsWith(BoosterSlots.COMMON)) {
numCards--;
String replaceKey = StaticData.instance().getEditions().contains(setCode)