mirror of
https://github.com/magefree/mage.git
synced 2025-12-24 20:41:58 -08: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
|
||||
// "ATH" -- has cards from many sets, symbol does not exist on gatherer
|
||||
// "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
|
||||
};
|
||||
|
||||
|
|
@ -160,8 +160,6 @@ public class GathererSets implements Iterable<DownloadJob> {
|
|||
codeReplacements.put("USG", "UZ");
|
||||
codeReplacements.put("VIS", "VI");
|
||||
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() {
|
||||
|
|
@ -175,15 +173,6 @@ public class GathererSets implements Iterable<DownloadJob> {
|
|||
|
||||
// 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, 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,
|
||||
boolean haveCommon, boolean haveUncommon, boolean haveRare, boolean haveMyth) {
|
||||
|
|
@ -220,11 +209,6 @@ public class GathererSets implements Iterable<DownloadJob> {
|
|||
|
||||
for (ExpansionSet set : Sets.getInstance().values()) {
|
||||
|
||||
// ignore some inner sets
|
||||
if (codesToIgnoreCheck.get(set.getCode()) != null) {
|
||||
continue;
|
||||
}
|
||||
|
||||
CheckResult res = setsToDownload.get(set.getCode());
|
||||
|
||||
// 1. not configured at all
|
||||
|
|
|
|||
|
|
@ -16,10 +16,6 @@ import java.util.regex.Pattern;
|
|||
*/
|
||||
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_CARD_NAME_PATTERN = Pattern.compile("\\/(.+?)\\/", Pattern.MULTILINE);
|
||||
|
||||
|
|
@ -125,7 +121,6 @@ public class ScryfallImageSupportCards {
|
|||
add("LGN"); // Legions
|
||||
add("SCG"); // Scourge
|
||||
add("8ED"); // Eighth Edition
|
||||
add("8EB"); // Eighth Edition Box
|
||||
add("WC03"); // World Championship Decks 2003
|
||||
add("MRD"); // Mirrodin
|
||||
add("PAL04"); // Arena League 2004
|
||||
|
|
@ -145,7 +140,6 @@ public class ScryfallImageSupportCards {
|
|||
add("BOK"); // Betrayers of Kamigawa
|
||||
add("SOK"); // Saviors of Kamigawa
|
||||
add("9ED"); // Ninth Edition
|
||||
add("9EB"); // Ninth Edition Box
|
||||
//add("PSAL"); // Salvat 2005
|
||||
add("RAV"); // Ravnica: City of Guilds
|
||||
add("P2HG"); // Two-Headed Giant Tournament
|
||||
|
|
@ -957,7 +951,7 @@ public class ScryfallImageSupportCards {
|
|||
};
|
||||
|
||||
public static String findScryfallSetCode(String xmageCode) {
|
||||
return xmageSetsToScryfall.getOrDefault(xmageCode, xmageCode).toLowerCase(Locale.ENGLISH);
|
||||
return xmageCode.toLowerCase(Locale.ENGLISH);
|
||||
}
|
||||
|
||||
public static Set<String> getSupportedSets() {
|
||||
|
|
@ -987,8 +981,8 @@ public class ScryfallImageSupportCards {
|
|||
}
|
||||
|
||||
public static String extractSetCodeFromDirectKey(String key) {
|
||||
// from: 8EB/Giant Octopus
|
||||
// to: 8EB
|
||||
// from: 8ED/Giant Octopus
|
||||
// to: 8ED
|
||||
Matcher matcher = REGEXP_DIRECT_KEY_SET_CODE_PATTERN.matcher(key);
|
||||
if (matcher.find()) {
|
||||
return matcher.group(1);
|
||||
|
|
@ -997,7 +991,7 @@ public class ScryfallImageSupportCards {
|
|||
}
|
||||
|
||||
public static String extractCardNameFromDirectKey(String key) {
|
||||
// from: 8EB/Giant Octopus/
|
||||
// from: 8ED/Giant Octopus/
|
||||
// to: Giant Octopus
|
||||
Matcher matcher = REGEXP_DIRECT_KEY_CARD_NAME_PATTERN.matcher(key + "/"); // add / for regexp workaround
|
||||
if (matcher.find()) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue