From f746d4d8d2a69804ce0514fcd5bde7b9a973a71d Mon Sep 17 00:00:00 2001 From: Oleg Agafonov Date: Sat, 8 Aug 2020 10:14:17 +0400 Subject: [PATCH] Images download: * removed duplicated set (Clash Pack); * added images download for Eighth Edition Box, Ninth Edition Box; --- .../java/mage/client/cards/DragCardGrid.java | 4 ++- .../dl/sources/ScryfallImageSupportCards.java | 5 +++ Mage.Sets/src/mage/sets/ClashPack.java | 36 ------------------- Mage.Sets/src/mage/sets/EighthEdition.java | 4 +++ Mage.Sets/src/mage/sets/EighthEditionBox.java | 4 +-- Mage.Sets/src/mage/sets/NinthEdition.java | 3 ++ 6 files changed, 17 insertions(+), 39 deletions(-) delete mode 100644 Mage.Sets/src/mage/sets/ClashPack.java diff --git a/Mage.Client/src/main/java/mage/client/cards/DragCardGrid.java b/Mage.Client/src/main/java/mage/client/cards/DragCardGrid.java index b98fadfe5e..231a4feb56 100644 --- a/Mage.Client/src/main/java/mage/client/cards/DragCardGrid.java +++ b/Mage.Client/src/main/java/mage/client/cards/DragCardGrid.java @@ -1509,7 +1509,9 @@ public class DragCardGrid extends JPanel implements DragCardSource, DragCardTarg Map pimpedCards = new HashMap<>(); pimpedSets.put("CP", 1); pimpedSets.put("MPS", 1); - pimpedSets.put("CLASH", 1); + pimpedSets.put("CP1", 1); + pimpedSets.put("CP2", 1); + pimpedSets.put("CP3", 1); // Judge Reward Gifts pimpedSets.put("JGP", 1); diff --git a/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/ScryfallImageSupportCards.java b/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/ScryfallImageSupportCards.java index c77ec42b36..4c51a110d0 100644 --- a/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/ScryfallImageSupportCards.java +++ b/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/ScryfallImageSupportCards.java @@ -487,6 +487,10 @@ public class ScryfallImageSupportCards { add("MPS-AKH"); add("M21"); add("JMP"); + + // + add("8EB"); // Eighth Edition Box + add("9EB"); // Ninth Edition Box } }; @@ -542,6 +546,7 @@ public class ScryfallImageSupportCards { put("DPAP/Soul of Zendikar", "https://api.scryfall.com/cards/pdp14/2/"); // 8th Edition box set and 9th Edition box set + // scryfall stores it with one set, by xmage split into two -- 8ED and 8EB, 9ED and 9EB put("8EB/Eager Cadet", "https://api.scryfall.com/cards/8ed/S1"); put("8EB/Vengeance", "https://api.scryfall.com/cards/8ed/S2"); put("8EB/Giant Octopus", "https://api.scryfall.com/cards/8ed/S3"); diff --git a/Mage.Sets/src/mage/sets/ClashPack.java b/Mage.Sets/src/mage/sets/ClashPack.java deleted file mode 100644 index 93453e15b0..0000000000 --- a/Mage.Sets/src/mage/sets/ClashPack.java +++ /dev/null @@ -1,36 +0,0 @@ - -package mage.sets; - -import mage.cards.ExpansionSet; -import mage.constants.Rarity; -import mage.constants.SetType; - -/** - * - * @author LevelX2 - */ -public final class ClashPack extends ExpansionSet { - - private static final ClashPack instance = new ClashPack(); - - public static ClashPack getInstance() { - return instance; - } - - private ClashPack() { - super("Clash Pack", "CLASH", ExpansionSet.buildDate(2014, 7, 18), SetType.SUPPLEMENTAL); - this.hasBasicLands = false; - cards.add(new SetCardInfo("Courser of Kruphix", 12, Rarity.SPECIAL, mage.cards.c.CourserOfKruphix.class)); - cards.add(new SetCardInfo("Fated Intervention", 2, Rarity.SPECIAL, mage.cards.f.FatedIntervention.class)); - cards.add(new SetCardInfo("Font of Fertility", 3, Rarity.SPECIAL, mage.cards.f.FontOfFertility.class)); - cards.add(new SetCardInfo("Hero's Downfall", 8, Rarity.SPECIAL, mage.cards.h.HerosDownfall.class)); - cards.add(new SetCardInfo("Hydra Broodmaster", 4, Rarity.SPECIAL, mage.cards.h.HydraBroodmaster.class)); - cards.add(new SetCardInfo("Necropolis Fiend", 7, Rarity.SPECIAL, mage.cards.n.NecropolisFiend.class)); - cards.add(new SetCardInfo("Prognostic Sphinx", 1, Rarity.SPECIAL, mage.cards.p.PrognosticSphinx.class)); - cards.add(new SetCardInfo("Prophet of Kruphix", 5, Rarity.SPECIAL, mage.cards.p.ProphetOfKruphix.class)); - cards.add(new SetCardInfo("Reaper of the Wilds", 10, Rarity.SPECIAL, mage.cards.r.ReaperOfTheWilds.class)); - cards.add(new SetCardInfo("Sultai Ascendancy", 9, Rarity.SPECIAL, mage.cards.s.SultaiAscendancy.class)); - cards.add(new SetCardInfo("Temple of Mystery", 6, Rarity.SPECIAL, mage.cards.t.TempleOfMystery.class)); - cards.add(new SetCardInfo("Whip of Erebos", 11, Rarity.SPECIAL, mage.cards.w.WhipOfErebos.class)); - } -} diff --git a/Mage.Sets/src/mage/sets/EighthEdition.java b/Mage.Sets/src/mage/sets/EighthEdition.java index 3d235376c5..5419781c38 100644 --- a/Mage.Sets/src/mage/sets/EighthEdition.java +++ b/Mage.Sets/src/mage/sets/EighthEdition.java @@ -20,6 +20,10 @@ public final class EighthEdition extends ExpansionSet { this.numBoosterUncommon = 3; this.numBoosterRare = 1; this.ratioBoosterMythic = 0; + + // scryfall combines Eighth Edition and Eighth Edition Box sets in one, but xmage must split it + // reason: remove box's cards from booster? TODO: implement booster ignore settings for cards instead max card number + cards.add(new SetCardInfo("Abyssal Specter", 117, Rarity.UNCOMMON, mage.cards.a.AbyssalSpecter.class)); cards.add(new SetCardInfo("Air Elemental", 59, Rarity.UNCOMMON, mage.cards.a.AirElemental.class)); cards.add(new SetCardInfo("Aladdin's Ring", 291, Rarity.RARE, mage.cards.a.AladdinsRing.class)); diff --git a/Mage.Sets/src/mage/sets/EighthEditionBox.java b/Mage.Sets/src/mage/sets/EighthEditionBox.java index 84cf11a524..1f6c51aa42 100644 --- a/Mage.Sets/src/mage/sets/EighthEditionBox.java +++ b/Mage.Sets/src/mage/sets/EighthEditionBox.java @@ -13,11 +13,11 @@ public final class EighthEditionBox extends ExpansionSet { } private EighthEditionBox() { - super("EighthEditionBox", "8EB", ExpansionSet.buildDate(2003, 7, 28), SetType.CORE); + super("Eighth Edition Box", "8EB", ExpansionSet.buildDate(2003, 7, 28), SetType.CORE); this.hasBoosters = false; this.hasBasicLands = false; - // // http://www.magiclibrarities.net/540-rarities-eighth-edition-box-set-cards-english-cards-index.html + // http://www.magiclibrarities.net/540-rarities-eighth-edition-box-set-cards-english-cards-index.html cards.add(new SetCardInfo("Eager Cadet", 1, Rarity.COMMON, mage.cards.e.EagerCadet.class)); cards.add(new SetCardInfo("Vengeance", 2, Rarity.UNCOMMON, mage.cards.v.Vengeance.class)); cards.add(new SetCardInfo("Giant Octopus", 3, Rarity.COMMON, mage.cards.g.GiantOctopus.class)); diff --git a/Mage.Sets/src/mage/sets/NinthEdition.java b/Mage.Sets/src/mage/sets/NinthEdition.java index 93759bbb0f..3d8882d91a 100644 --- a/Mage.Sets/src/mage/sets/NinthEdition.java +++ b/Mage.Sets/src/mage/sets/NinthEdition.java @@ -21,6 +21,9 @@ public final class NinthEdition extends ExpansionSet { this.numBoosterRare = 1; this.ratioBoosterMythic = 0; + // scryfall combines Ninth Edition and Ninth Edition Box sets in one, but xmage must split it + // reason: remove box's cards from booster? TODO: implement booster ignore settings for cards instead max card number + cards.add(new SetCardInfo("Adarkar Wastes", 317, Rarity.RARE, mage.cards.a.AdarkarWastes.class)); cards.add(new SetCardInfo("Air Elemental", 58, Rarity.UNCOMMON, mage.cards.a.AirElemental.class)); cards.add(new SetCardInfo("Aladdin's Ring", 286, Rarity.RARE, mage.cards.a.AladdinsRing.class));