mirror of
https://github.com/correl/mage.git
synced 2024-11-25 03:00:11 +00:00
Remove unofficial Eighth Edition Box and Ninth Edition Box sets
This commit is contained in:
parent
646600665f
commit
aac6518c1b
6 changed files with 5 additions and 91 deletions
|
@ -68,7 +68,7 @@ public class GathererSets implements Iterable<DownloadJob> {
|
||||||
// "PALP" -- Gatherer does not have the set Asia Pacific Land Program
|
// "PALP" -- Gatherer does not have the set Asia Pacific Land Program
|
||||||
// "ATH" -- has cards from many sets, symbol does not exist on gatherer
|
// "ATH" -- has cards from many sets, symbol does not exist on gatherer
|
||||||
// "CP", "DPA", "PELP", "PGPX", "PGRU", "H17", "JR", "SWS", // need to fix
|
// "CP", "DPA", "PELP", "PGPX", "PGRU", "H17", "JR", "SWS", // need to fix
|
||||||
"H09", "PD2", "PD3", "UNH", "CM1", "V11", "A25", "UST", "IMA", "DD2", "EVG", "DDC", "DDE", "DDD", "8EB", "9EB", "CHR", "G18", "GVL", "S00", "S99", "UGL" // ok
|
"H09", "PD2", "PD3", "UNH", "CM1", "V11", "A25", "UST", "IMA", "DD2", "EVG", "DDC", "DDE", "DDD", "CHR", "G18", "GVL", "S00", "S99", "UGL" // ok
|
||||||
// current testing
|
// current testing
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -160,8 +160,6 @@ public class GathererSets implements Iterable<DownloadJob> {
|
||||||
codeReplacements.put("USG", "UZ");
|
codeReplacements.put("USG", "UZ");
|
||||||
codeReplacements.put("VIS", "VI");
|
codeReplacements.put("VIS", "VI");
|
||||||
codeReplacements.put("WTH", "WL");
|
codeReplacements.put("WTH", "WL");
|
||||||
codeReplacements.put("8EB", "8ED"); // inner xmage set for 8th edition
|
|
||||||
codeReplacements.put("9EB", "8ED"); // inner xmage set for 9th edition
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public GathererSets() {
|
public GathererSets() {
|
||||||
|
@ -175,15 +173,6 @@ public class GathererSets implements Iterable<DownloadJob> {
|
||||||
|
|
||||||
// checks for wrong card settings and support (easy to control what all good)
|
// checks for wrong card settings and support (easy to control what all good)
|
||||||
private static final HashMap<String, CheckResult> setsToDownload = new HashMap<>();
|
private static final HashMap<String, CheckResult> setsToDownload = new HashMap<>();
|
||||||
private static final HashMap<String, String> codesToIgnoreCheck = new HashMap<>();
|
|
||||||
|
|
||||||
static {
|
|
||||||
// xMage have inner sets for 8th and 9th Edition for booster workaround (cards from core game do not include in boosters)
|
|
||||||
// see https://mtg.gamepedia.com/8th_Edition/Core_Game
|
|
||||||
// check must ignore that sets
|
|
||||||
codesToIgnoreCheck.put("8EB", "8th Edition Box");
|
|
||||||
codesToIgnoreCheck.put("9EB", "9th Edition Box");
|
|
||||||
}
|
|
||||||
|
|
||||||
private void CheckSearchResult(String searchCode, ExpansionSet foundedExp, boolean canDownloadTask,
|
private void CheckSearchResult(String searchCode, ExpansionSet foundedExp, boolean canDownloadTask,
|
||||||
boolean haveCommon, boolean haveUncommon, boolean haveRare, boolean haveMyth) {
|
boolean haveCommon, boolean haveUncommon, boolean haveRare, boolean haveMyth) {
|
||||||
|
@ -220,11 +209,6 @@ public class GathererSets implements Iterable<DownloadJob> {
|
||||||
|
|
||||||
for (ExpansionSet set : Sets.getInstance().values()) {
|
for (ExpansionSet set : Sets.getInstance().values()) {
|
||||||
|
|
||||||
// ignore some inner sets
|
|
||||||
if (codesToIgnoreCheck.get(set.getCode()) != null) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
CheckResult res = setsToDownload.get(set.getCode());
|
CheckResult res = setsToDownload.get(set.getCode());
|
||||||
|
|
||||||
// 1. not configured at all
|
// 1. not configured at all
|
||||||
|
|
|
@ -16,10 +16,6 @@ import java.util.regex.Pattern;
|
||||||
*/
|
*/
|
||||||
public class ScryfallImageSupportCards {
|
public class ScryfallImageSupportCards {
|
||||||
|
|
||||||
private static final Map<String, String> xmageSetsToScryfall = ImmutableMap.<String, String>builder()
|
|
||||||
.put("8EB", "8ED")
|
|
||||||
.put("9EB", "9ED")
|
|
||||||
.build();
|
|
||||||
static final Pattern REGEXP_DIRECT_KEY_SET_CODE_PATTERN = Pattern.compile("(\\w+)\\/", Pattern.MULTILINE);
|
static final Pattern REGEXP_DIRECT_KEY_SET_CODE_PATTERN = Pattern.compile("(\\w+)\\/", Pattern.MULTILINE);
|
||||||
static final Pattern REGEXP_DIRECT_KEY_CARD_NAME_PATTERN = Pattern.compile("\\/(.+?)\\/", Pattern.MULTILINE);
|
static final Pattern REGEXP_DIRECT_KEY_CARD_NAME_PATTERN = Pattern.compile("\\/(.+?)\\/", Pattern.MULTILINE);
|
||||||
|
|
||||||
|
@ -125,7 +121,6 @@ public class ScryfallImageSupportCards {
|
||||||
add("LGN"); // Legions
|
add("LGN"); // Legions
|
||||||
add("SCG"); // Scourge
|
add("SCG"); // Scourge
|
||||||
add("8ED"); // Eighth Edition
|
add("8ED"); // Eighth Edition
|
||||||
add("8EB"); // Eighth Edition Box
|
|
||||||
add("WC03"); // World Championship Decks 2003
|
add("WC03"); // World Championship Decks 2003
|
||||||
add("MRD"); // Mirrodin
|
add("MRD"); // Mirrodin
|
||||||
add("PAL04"); // Arena League 2004
|
add("PAL04"); // Arena League 2004
|
||||||
|
@ -145,7 +140,6 @@ public class ScryfallImageSupportCards {
|
||||||
add("BOK"); // Betrayers of Kamigawa
|
add("BOK"); // Betrayers of Kamigawa
|
||||||
add("SOK"); // Saviors of Kamigawa
|
add("SOK"); // Saviors of Kamigawa
|
||||||
add("9ED"); // Ninth Edition
|
add("9ED"); // Ninth Edition
|
||||||
add("9EB"); // Ninth Edition Box
|
|
||||||
//add("PSAL"); // Salvat 2005
|
//add("PSAL"); // Salvat 2005
|
||||||
add("RAV"); // Ravnica: City of Guilds
|
add("RAV"); // Ravnica: City of Guilds
|
||||||
add("P2HG"); // Two-Headed Giant Tournament
|
add("P2HG"); // Two-Headed Giant Tournament
|
||||||
|
@ -957,7 +951,7 @@ public class ScryfallImageSupportCards {
|
||||||
};
|
};
|
||||||
|
|
||||||
public static String findScryfallSetCode(String xmageCode) {
|
public static String findScryfallSetCode(String xmageCode) {
|
||||||
return xmageSetsToScryfall.getOrDefault(xmageCode, xmageCode).toLowerCase(Locale.ENGLISH);
|
return xmageCode.toLowerCase(Locale.ENGLISH);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Set<String> getSupportedSets() {
|
public static Set<String> getSupportedSets() {
|
||||||
|
@ -987,8 +981,8 @@ public class ScryfallImageSupportCards {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String extractSetCodeFromDirectKey(String key) {
|
public static String extractSetCodeFromDirectKey(String key) {
|
||||||
// from: 8EB/Giant Octopus
|
// from: 8ED/Giant Octopus
|
||||||
// to: 8EB
|
// to: 8ED
|
||||||
Matcher matcher = REGEXP_DIRECT_KEY_SET_CODE_PATTERN.matcher(key);
|
Matcher matcher = REGEXP_DIRECT_KEY_SET_CODE_PATTERN.matcher(key);
|
||||||
if (matcher.find()) {
|
if (matcher.find()) {
|
||||||
return matcher.group(1);
|
return matcher.group(1);
|
||||||
|
@ -997,7 +991,7 @@ public class ScryfallImageSupportCards {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String extractCardNameFromDirectKey(String key) {
|
public static String extractCardNameFromDirectKey(String key) {
|
||||||
// from: 8EB/Giant Octopus/
|
// from: 8ED/Giant Octopus/
|
||||||
// to: Giant Octopus
|
// to: Giant Octopus
|
||||||
Matcher matcher = REGEXP_DIRECT_KEY_CARD_NAME_PATTERN.matcher(key + "/"); // add / for regexp workaround
|
Matcher matcher = REGEXP_DIRECT_KEY_CARD_NAME_PATTERN.matcher(key + "/"); // add / for regexp workaround
|
||||||
if (matcher.find()) {
|
if (matcher.find()) {
|
||||||
|
|
|
@ -1,29 +0,0 @@
|
||||||
package mage.sets;
|
|
||||||
|
|
||||||
import mage.cards.ExpansionSet;
|
|
||||||
import mage.constants.Rarity;
|
|
||||||
import mage.constants.SetType;
|
|
||||||
|
|
||||||
public final class EighthEditionBox extends ExpansionSet {
|
|
||||||
|
|
||||||
private static final EighthEditionBox instance = new EighthEditionBox();
|
|
||||||
|
|
||||||
public static EighthEditionBox getInstance() {
|
|
||||||
return instance;
|
|
||||||
}
|
|
||||||
|
|
||||||
private EighthEditionBox() {
|
|
||||||
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
|
|
||||||
cards.add(new SetCardInfo("Eager Cadet", "S1", Rarity.COMMON, mage.cards.e.EagerCadet.class));
|
|
||||||
cards.add(new SetCardInfo("Enormous Baloth", "S6", Rarity.UNCOMMON, mage.cards.e.EnormousBaloth.class));
|
|
||||||
cards.add(new SetCardInfo("Giant Octopus", "S3", Rarity.COMMON, mage.cards.g.GiantOctopus.class));
|
|
||||||
cards.add(new SetCardInfo("Sea Eagle", "S4", Rarity.COMMON, mage.cards.s.SeaEagle.class));
|
|
||||||
cards.add(new SetCardInfo("Silverback Ape", "S7", Rarity.UNCOMMON, mage.cards.s.SilverbackApe.class));
|
|
||||||
cards.add(new SetCardInfo("Vengeance", "S2", Rarity.UNCOMMON, mage.cards.v.Vengeance.class));
|
|
||||||
cards.add(new SetCardInfo("Vizzerdrix", "S5", Rarity.RARE, mage.cards.v.Vizzerdrix.class));
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,30 +0,0 @@
|
||||||
package mage.sets;
|
|
||||||
|
|
||||||
import mage.cards.ExpansionSet;
|
|
||||||
import mage.constants.Rarity;
|
|
||||||
import mage.constants.SetType;
|
|
||||||
|
|
||||||
public final class NinthEditionBox extends ExpansionSet {
|
|
||||||
|
|
||||||
private static final NinthEditionBox instance = new NinthEditionBox();
|
|
||||||
|
|
||||||
public static NinthEditionBox getInstance() {
|
|
||||||
return instance;
|
|
||||||
}
|
|
||||||
|
|
||||||
private NinthEditionBox() {
|
|
||||||
super("Ninth Edition Box", "9EB", ExpansionSet.buildDate(2005, 7, 29), SetType.CORE);
|
|
||||||
this.hasBoosters = false;
|
|
||||||
this.hasBasicLands = false;
|
|
||||||
|
|
||||||
cards.add(new SetCardInfo("Coral Eel", "S3", Rarity.COMMON, mage.cards.c.CoralEel.class));
|
|
||||||
cards.add(new SetCardInfo("Eager Cadet", "S1", Rarity.COMMON, mage.cards.e.EagerCadet.class));
|
|
||||||
cards.add(new SetCardInfo("Enormous Baloth", "S9", Rarity.UNCOMMON, mage.cards.e.EnormousBaloth.class));
|
|
||||||
cards.add(new SetCardInfo("Giant Octopus", "S4", Rarity.COMMON, mage.cards.g.GiantOctopus.class));
|
|
||||||
cards.add(new SetCardInfo("Goblin Raider", "S8", Rarity.COMMON, mage.cards.g.GoblinRaider.class));
|
|
||||||
cards.add(new SetCardInfo("Index", "S5", Rarity.COMMON, mage.cards.i.Index.class));
|
|
||||||
cards.add(new SetCardInfo("Spined Wurm", "S10", Rarity.COMMON, mage.cards.s.SpinedWurm.class));
|
|
||||||
cards.add(new SetCardInfo("Vengeance", "S2", Rarity.UNCOMMON, mage.cards.v.Vengeance.class));
|
|
||||||
cards.add(new SetCardInfo("Vizzerdrix", "S7", Rarity.RARE, mage.cards.v.Vizzerdrix.class));
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -24,8 +24,6 @@ public final class MtgJsonService {
|
||||||
for (Map.Entry<String, String> entry : mtgJsonToXMageCodes.entrySet()) {
|
for (Map.Entry<String, String> entry : mtgJsonToXMageCodes.entrySet()) {
|
||||||
xMageToMtgJsonCodes.put(entry.getValue(), entry.getKey());
|
xMageToMtgJsonCodes.put(entry.getValue(), entry.getKey());
|
||||||
}
|
}
|
||||||
xMageToMtgJsonCodes.put("8EB", "8ED");
|
|
||||||
xMageToMtgJsonCodes.put("9EB", "9ED");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private static Map<String, MtgJsonCard> loadAllCards() throws IOException {
|
private static Map<String, MtgJsonCard> loadAllCards() throws IOException {
|
||||||
|
|
|
@ -201,8 +201,6 @@ public class VerifyCardDataTest {
|
||||||
// scryfall download sets (missing from scryfall website)
|
// scryfall download sets (missing from scryfall website)
|
||||||
skipListCreate(SKIP_LIST_SCRYFALL_DOWNLOAD_SETS);
|
skipListCreate(SKIP_LIST_SCRYFALL_DOWNLOAD_SETS);
|
||||||
skipListAddName(SKIP_LIST_SCRYFALL_DOWNLOAD_SETS, "SWS"); // Star Wars
|
skipListAddName(SKIP_LIST_SCRYFALL_DOWNLOAD_SETS, "SWS"); // Star Wars
|
||||||
//skipListAddName(SKIP_LIST_SCRYFALL_DOWNLOAD_SETS, "8EB"); // Eighth Edition Box - inner xmage set, split from 8ED
|
|
||||||
//skipListAddName(SKIP_LIST_SCRYFALL_DOWNLOAD_SETS, "9EB"); // Ninth Edition Box - inner xmage set, split from 9ED
|
|
||||||
|
|
||||||
// sample decks checking - some decks can contains unimplemented cards, so ignore it
|
// sample decks checking - some decks can contains unimplemented cards, so ignore it
|
||||||
// file name must be related to sample-decks folder
|
// file name must be related to sample-decks folder
|
||||||
|
@ -481,7 +479,6 @@ public class VerifyCardDataTest {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: 8EB and 9EB uses workaround to split from main set, so it will be in unofficial list until booster cards improve
|
|
||||||
xmageUnofficialSets++;
|
xmageUnofficialSets++;
|
||||||
xmageUnofficialCards += set.getSetCardInfo().size();
|
xmageUnofficialCards += set.getSetCardInfo().size();
|
||||||
info.add("Unofficial set: " + set.getCode() + " - " + set.getName() + ", cards: " + set.getSetCardInfo().size() + ", year: " + set.getReleaseYear());
|
info.add("Unofficial set: " + set.getCode() + " - " + set.getName() + ", cards: " + set.getSetCardInfo().size() + ", year: " + set.getReleaseYear());
|
||||||
|
|
Loading…
Reference in a new issue