From 8f9857e72d66ed1ef1faab85da0990190dd2fe28 Mon Sep 17 00:00:00 2001 From: Seravy Date: Mon, 12 Feb 2018 01:11:03 +0100 Subject: [PATCH] Fixing Planeshift set alter foils in boosters -Now always foil, and with the (guesstimated) correct chance. --- .../item/generation/BoosterGenerator.java | 27 ++++++++++++++++++- forge-gui/res/editions/Planeshift.txt | 8 +++--- 2 files changed, 30 insertions(+), 5 deletions(-) diff --git a/forge-core/src/main/java/forge/item/generation/BoosterGenerator.java b/forge-core/src/main/java/forge/item/generation/BoosterGenerator.java index d83734ab95e..3cc2ef96ee8 100644 --- a/forge-core/src/main/java/forge/item/generation/BoosterGenerator.java +++ b/forge-core/src/main/java/forge/item/generation/BoosterGenerator.java @@ -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) diff --git a/forge-gui/res/editions/Planeshift.txt b/forge-gui/res/editions/Planeshift.txt index 2dc45f66c00..3feadc7c6e9 100644 --- a/forge-gui/res/editions/Planeshift.txt +++ b/forge-gui/res/editions/Planeshift.txt @@ -6,7 +6,7 @@ Code2=PS MciCode=ps Type=Expansion BoosterCovers=1 -Booster=11 Common, 3 Uncommon, 1 Rare +Booster=11 Common, 3 Uncommon, 1 Rare, 0 Special Foil=OldStyle FoilAlwaysInCommonSlot=False @@ -44,7 +44,7 @@ FoilAlwaysInCommonSlot=False 106 R Eladamri's Call 24 U Ertai's Trickery 107 R Ertai, the Corrupted -107 R Ertai, the Corrupted +107 S Ertai, the Corrupted 25 C Escape Routes 43 U Exotic Disease 79 C Falling Timber @@ -125,7 +125,7 @@ FoilAlwaysInCommonSlot=False 54 C Sinister Strength 33 C Sisay's Ingenuity 133 R Skyship Weatherlight -133 R Skyship Weatherlight +133 S Skyship Weatherlight 92 U Skyshroud Blessing 55 U Slay 34 C Sleeping Potion @@ -142,7 +142,7 @@ FoilAlwaysInCommonSlot=False 16 U Sunscape Battlemage 17 C Sunscape Familiar 18 U Surprise Deployment -74 R Tahngarth, Talruum Hero +74 S Tahngarth, Talruum Hero 74 R Tahngarth, Talruum Hero 142 U Terminal Moraine 128 C Terminate