From 529552dd2cce441e4426687e55890342fe2210b4 Mon Sep 17 00:00:00 2001 From: Thomas Hess Date: Tue, 17 Mar 2020 16:06:44 +0100 Subject: [PATCH] Fixed set codes for the Duel Deck Anthology deck sets. The decks now use the set codes from Scryfall. --- .../plugins/card/dl/sources/GathererSets.java | 20 ++++++++--------- .../src/main/resources/card-pictures-tok.txt | 22 +++++++++---------- .../serverside/deck/DeckValidatorTest.java | 2 +- .../src/main/java/mage/verify/MtgJson.java | 5 ++--- .../mage/game/permanent/token/BeastToken.java | 4 ++-- .../game/permanent/token/BeastToken2.java | 4 ++-- .../permanent/token/ElementalShamanToken.java | 2 +- .../game/permanent/token/ElephantToken.java | 2 +- .../game/permanent/token/GoblinToken.java | 2 +- Utils/get_modo_artids.pl | 8 +++---- Utils/mtg-sets-data.txt | 8 +++---- 11 files changed, 39 insertions(+), 40 deletions(-) diff --git a/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/GathererSets.java b/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/GathererSets.java index 2688771943..f18151e681 100644 --- a/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/GathererSets.java +++ b/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/GathererSets.java @@ -64,13 +64,13 @@ public class GathererSets implements Iterable { // "PALP" -- Gatherer does not have the set Asia Pacific Land Program // "ATH" -- has cards from many sets, symbol does not exist on gatherer // "CLASH", "CP", "DPA", "PELP", "PGPX", "GRC", "GUR", "H17", "JR", "MBP", "MGDC", "MLP", "PPRE", "SUS", "SWS", "WMCQ", // need to fix - "H09", "PD2", "PD3", "UNH", "CM1", "V11", "A25", "UST", "IMA", "DD2", "EVG", "DDC", "DDE", "DDD", "8EB", "9EB", "CHR", "G18", "DD3GVL", "S00", "S99", "UGL" // ok + "H09", "PD2", "PD3", "UNH", "CM1", "V11", "A25", "UST", "IMA", "DD2", "EVG", "DDC", "DDE", "DDD", "8EB", "9EB", "CHR", "G18", "GVL", "S00", "S99", "UGL" // ok // current testing }; private static final String[] symbolsBasicWithMyth = {"M10", "M11", "M12", "M13", "M14", "M15", "ORI", "DDF", "DDG", "DDH", "DDI", "DDJ", "DDK", "DDL", "DDM", "DDN", - "DD3DVD", "DD3JVC", "DDO", "DDP", "DDQ", "DDR", "DDS", "DDT", "DDU", + "DVD", "JVC", "DDO", "DDP", "DDQ", "DDR", "DDS", "DDT", "DDU", "ALA", "CON", "ARB", "ZEN", "WWK", "ROE", "SOM", "MBS", "NPH", @@ -98,11 +98,11 @@ public class GathererSets implements Iterable { }; private static final String[] symbolsOnlyMyth = { - "DRB", "V09", "V10", "V12", "V13", "V14", "V15", "V16", "V17", "EXP", "MEDM" + "DRB", "V09", "V10", "V12", "V13", "V14", "V15", "V16", "V17", "EXP", "MED" // "HTR" does not exist }; private static final String[] symbolsOnlySpecial = { - "MPS", "MPS-AKH" + "MPS", "MP2" }; private static final HashMap codeReplacements = new HashMap<>(); @@ -120,10 +120,10 @@ public class GathererSets implements Iterable { codeReplacements.put("ATQ", "AQ"); codeReplacements.put("CMA", "CM1"); codeReplacements.put("CHR", "CH"); - codeReplacements.put("DD3DVD", "DD3_DVD"); - codeReplacements.put("DD3EVG", "DD3_EVG"); - codeReplacements.put("DD3GVL", "DD3_GVL"); - codeReplacements.put("DD3JVC", "DD3_JVC"); + codeReplacements.put("DVD", "DD3_DVD"); + codeReplacements.put("EVG", "DD3_EVG"); + codeReplacements.put("GVL", "DD3_GVL"); + codeReplacements.put("JVC", "DD3_JVC"); codeReplacements.put("DRK", "DK"); codeReplacements.put("EXO", "EX"); codeReplacements.put("FEM", "FE"); @@ -133,9 +133,9 @@ public class GathererSets implements Iterable { codeReplacements.put("LEA", "1E"); codeReplacements.put("LEB", "2E"); codeReplacements.put("LEG", "LE"); - codeReplacements.put("MEDM", "MPS_WAR"); + codeReplacements.put("MED", "MPS_WAR"); codeReplacements.put("MPS", "MPS_KLD"); - codeReplacements.put("MPS-AKH", "MPS_AKH"); + codeReplacements.put("MP2", "MPS_AKH"); codeReplacements.put("MIR", "MI"); codeReplacements.put("MMQ", "MM"); codeReplacements.put("NEM", "NE"); diff --git a/Mage.Client/src/main/resources/card-pictures-tok.txt b/Mage.Client/src/main/resources/card-pictures-tok.txt index 1ef4df299c..712f9912df 100644 --- a/Mage.Client/src/main/resources/card-pictures-tok.txt +++ b/Mage.Client/src/main/resources/card-pictures-tok.txt @@ -502,18 +502,18 @@ |Generate|TOK:DD3C|Beast|1| |Generate|TOK:DD3C|Beast|2| |Generate|TOK:DD3C|Elephant|| -|Generate|TOK:DD3DVD|Demon|||ReignOfThePitToken| -|Generate|TOK:DD3DVD|Spirit|||SpiritWhiteToken| -|Generate|TOK:DD3DVD|Thrull|||BreedingPitBlackInsectToken| +|Generate|TOK:DVD|Demon|||ReignOfThePitToken| +|Generate|TOK:DVD|Spirit|||SpiritWhiteToken| +|Generate|TOK:DVD|Thrull|||BreedingPitBlackInsectToken| |Generate|TOK:DD3D|Elemental Shaman|| -|Generate|TOK:DD3EVG|Elf Warrior|||ElfToken| -|Generate|TOK:DD3EVG|Goblin|||GoblinToken| -|Generate|TOK:DD3GVL|Ape|||PongifyApeToken| -|Generate|TOK:DD3GVL|Bat|||BatToken| -|Generate|TOK:DD3GVL|Beast|||BeastToken2| -|Generate|TOK:DD3GVL|Beast|||BeastToken| -|Generate|TOK:DD3GVL|Elephant|||ElephantToken| -|Generate|TOK:DD3JVC|Elemental Shaman|||ElementalShamanToken| +|Generate|TOK:EVG|Elf Warrior|||ElfToken| +|Generate|TOK:EVG|Goblin|||GoblinToken| +|Generate|TOK:GVL|Ape|||PongifyApeToken| +|Generate|TOK:GVL|Bat|||BatToken| +|Generate|TOK:GVL|Beast|||BeastToken2| +|Generate|TOK:GVL|Beast|||BeastToken| +|Generate|TOK:GVL|Elephant|||ElephantToken| +|Generate|TOK:JVC|Elemental Shaman|||ElementalShamanToken| |Generate|TOK:DDC|Demon|||ReignOfThePitToken| |Generate|TOK:DDC|Spirit|||SpiritWhiteToken| |Generate|TOK:DDC|Thrull|||BreedingPitBlackInsectToken| diff --git a/Mage.Tests/src/test/java/org/mage/test/serverside/deck/DeckValidatorTest.java b/Mage.Tests/src/test/java/org/mage/test/serverside/deck/DeckValidatorTest.java index 1628d329dc..c0cd480fb9 100644 --- a/Mage.Tests/src/test/java/org/mage/test/serverside/deck/DeckValidatorTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/serverside/deck/DeckValidatorTest.java @@ -115,7 +115,7 @@ public class DeckValidatorTest extends MageTestBase { @Test public void testModernCounterspell1() { ArrayList deckList = new ArrayList<>(); - deckList.add(new CardNameAmount("DD3JVC", 24, 4)); + deckList.add(new CardNameAmount("JVC", 24, 4)); deckList.add(new CardNameAmount("Mountain", 56)); Assert.assertFalse("Counterspell not allowed in modern", testDeckValid(new Modern(), deckList)); diff --git a/Mage.Verify/src/main/java/mage/verify/MtgJson.java b/Mage.Verify/src/main/java/mage/verify/MtgJson.java index dd12823d15..bf42cd50e1 100644 --- a/Mage.Verify/src/main/java/mage/verify/MtgJson.java +++ b/Mage.Verify/src/main/java/mage/verify/MtgJson.java @@ -28,7 +28,6 @@ public final class MtgJson { // TODO: MtgJson now seems to use upper case set codes only. // Review the ones beginning with a lower case "p" and remove the redundant entries. static { - mtgJsonToXMageCodes.put("pWCQ", "WMCQ"); mtgJsonToXMageCodes.put("pSUS", "SUS"); mtgJsonToXMageCodes.put("pPRE", "PPRE"); // mtgJsonToXMageCodes.put("pMPR", "MPRP"); // TODO: The set was split into the individual sets @@ -41,9 +40,9 @@ public final class MtgJson { mtgJsonToXMageCodes.put("pARL", "PARL"); // TODO: What about the other Arena League sets (1999-2006)? mtgJsonToXMageCodes.put("pALP", "PALP"); mtgJsonToXMageCodes.put("PO2", "P02"); - mtgJsonToXMageCodes.put("DD3_JVC", "DD3JVC"); + mtgJsonToXMageCodes.put("DD3_JVC", "JVC"); mtgJsonToXMageCodes.put("DD3_GVL", "DDD"); - mtgJsonToXMageCodes.put("DD3_EVG", "DD3EVG"); + mtgJsonToXMageCodes.put("DD3_EVG", "EVG"); mtgJsonToXMageCodes.put("DD3_DVD", "DDC"); mtgJsonToXMageCodes.put("NMS", "NEM"); mtgJsonToXMageCodes.put("MPS_AKH", "MPS-AKH"); diff --git a/Mage/src/main/java/mage/game/permanent/token/BeastToken.java b/Mage/src/main/java/mage/game/permanent/token/BeastToken.java index 50727e81da..78e19582c0 100644 --- a/Mage/src/main/java/mage/game/permanent/token/BeastToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/BeastToken.java @@ -16,7 +16,7 @@ public final class BeastToken extends TokenImpl { static final private List tokenImageSets = new ArrayList<>(); static { - tokenImageSets.addAll(Arrays.asList("C14", "LRW", "M15", "M14", "DDL", "M13", "M12", "DD3GVL", "NPH", "M11", "M10", "EVE", "MM3", "CMA", "E01", "C19")); + tokenImageSets.addAll(Arrays.asList("C14", "LRW", "M15", "M14", "DDL", "M13", "M12", "GVL", "NPH", "M11", "M10", "EVE", "MM3", "CMA", "E01", "C19")); } public BeastToken() { @@ -45,7 +45,7 @@ public final class BeastToken extends TokenImpl { if (getOriginalExpansionSetCode().equals("M15")) { this.setTokenType(2); } - if (getOriginalExpansionSetCode().equals("DD3GVL") || getOriginalExpansionSetCode().equals("C14") || getOriginalExpansionSetCode().equals("DDD") || getOriginalExpansionSetCode().equals("MM3")) { + if (getOriginalExpansionSetCode().equals("GVL") || getOriginalExpansionSetCode().equals("C14") || getOriginalExpansionSetCode().equals("DDD") || getOriginalExpansionSetCode().equals("MM3")) { this.setTokenType(1); } } diff --git a/Mage/src/main/java/mage/game/permanent/token/BeastToken2.java b/Mage/src/main/java/mage/game/permanent/token/BeastToken2.java index f59cbc94a6..c25bd3e8b4 100644 --- a/Mage/src/main/java/mage/game/permanent/token/BeastToken2.java +++ b/Mage/src/main/java/mage/game/permanent/token/BeastToken2.java @@ -16,7 +16,7 @@ public final class BeastToken2 extends TokenImpl { static final private List tokenImageSets = new ArrayList<>(); static { - tokenImageSets.addAll(Arrays.asList("ZEN", "C14", "DDD", "C15", "DD3GVL", "MM3", "CMA", "E01", "C19")); + tokenImageSets.addAll(Arrays.asList("ZEN", "C14", "DDD", "C15", "GVL", "MM3", "CMA", "E01", "C19")); } public BeastToken2() { @@ -50,7 +50,7 @@ public final class BeastToken2 extends TokenImpl { @Override public void setExpansionSetCodeForImage(String code) { super.setExpansionSetCodeForImage(code); - if (getOriginalExpansionSetCode().equals("C14") || getOriginalExpansionSetCode().equals("DDD") || getOriginalExpansionSetCode().equals("DD3GVL") || getOriginalExpansionSetCode().equals("MM3")) { + if (getOriginalExpansionSetCode().equals("C14") || getOriginalExpansionSetCode().equals("DDD") || getOriginalExpansionSetCode().equals("GVL") || getOriginalExpansionSetCode().equals("MM3")) { this.setTokenType(2); } } diff --git a/Mage/src/main/java/mage/game/permanent/token/ElementalShamanToken.java b/Mage/src/main/java/mage/game/permanent/token/ElementalShamanToken.java index 88637b7b67..0ebe90174f 100644 --- a/Mage/src/main/java/mage/game/permanent/token/ElementalShamanToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/ElementalShamanToken.java @@ -18,7 +18,7 @@ public final class ElementalShamanToken extends TokenImpl { static final private List tokenImageSets = new ArrayList<>(); static { - tokenImageSets.addAll(Arrays.asList("C15", "DD3JVC", "DD2", "LRW")); + tokenImageSets.addAll(Arrays.asList("C15", "JVC", "DD2", "LRW")); } public ElementalShamanToken(boolean withHaste) { diff --git a/Mage/src/main/java/mage/game/permanent/token/ElephantToken.java b/Mage/src/main/java/mage/game/permanent/token/ElephantToken.java index 71ae36fa8b..e98809db1c 100644 --- a/Mage/src/main/java/mage/game/permanent/token/ElephantToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/ElephantToken.java @@ -16,7 +16,7 @@ public final class ElephantToken extends TokenImpl { static final private List tokenImageSets = new ArrayList<>(); static { - tokenImageSets.addAll(Arrays.asList("C14", "CNS", "DDD", "MM2", "WWK", "OGW", "C15", "DD3GVL", "MM3", "CMA", "MH1")); + tokenImageSets.addAll(Arrays.asList("C14", "CNS", "DDD", "MM2", "WWK", "OGW", "C15", "GVL", "MM3", "CMA", "MH1")); } public ElephantToken() { diff --git a/Mage/src/main/java/mage/game/permanent/token/GoblinToken.java b/Mage/src/main/java/mage/game/permanent/token/GoblinToken.java index da279757c1..5eae26f2d3 100644 --- a/Mage/src/main/java/mage/game/permanent/token/GoblinToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/GoblinToken.java @@ -18,7 +18,7 @@ public final class GoblinToken extends TokenImpl { static { tokenImageSets.addAll(Arrays.asList("10E", "ALA", "SOM", "M10", "NPH", "M13", "RTR", - "MMA", "M15", "C14", "KTK", "EVG", "DTK", "ORI", "DDG", "DDN", "DD3EVG", "MM2", + "MMA", "M15", "C14", "KTK", "EVG", "DTK", "ORI", "DDG", "DDN", "EVG", "MM2", "MM3", "EMA", "C16", "DOM", "ANA", "RNA", "WAR", "MH1")); } diff --git a/Utils/get_modo_artids.pl b/Utils/get_modo_artids.pl index 287ce363dd..6eea049402 100644 --- a/Utils/get_modo_artids.pl +++ b/Utils/get_modo_artids.pl @@ -34,10 +34,10 @@ $fix_set_codes {"AP"} = "APC"; $fix_set_codes {"AN"} = "ARN"; $fix_set_codes {"AQ"} = "ATQ"; $fix_set_codes {"CM1"} = "CMA"; -$fix_set_codes {"DD3_DVD"} = "DD3DVD"; -$fix_set_codes {"DD3_EVG"} = "DD3EVG"; -$fix_set_codes {"DD3_GLV"} = "DD3GLV"; -$fix_set_codes {"DD3_JVC"} = "DD3JVC"; +$fix_set_codes {"DD3_DVD"} = "DVD"; +$fix_set_codes {"DD3_EVG"} = "EVG"; +$fix_set_codes {"DD3_GLV"} = "GLV"; +$fix_set_codes {"DD3_JVC"} = "JVC"; $fix_set_codes {"DK"} = "DRK"; $fix_set_codes {"EX"} = "EXO"; $fix_set_codes {"FE"} = "FEM"; diff --git a/Utils/mtg-sets-data.txt b/Utils/mtg-sets-data.txt index dcf78d3f08..cebde6a01d 100644 --- a/Utils/mtg-sets-data.txt +++ b/Utils/mtg-sets-data.txt @@ -47,10 +47,10 @@ Conflux|CON| Champs|CP| Coldsnap|CSP| Duel Decks: Jace vs. Chandra|DD2| -Duel Decks: Anthology, Divine vs. Demonic|DD3DVD| -Duel Decks: Anthology, Elves vs. Goblins|DD3EVG| -Duel Decks: Anthology, Garruk vs. Liliana|DD3GVL| -Duel Decks: Anthology, Jace vs. Chandra|DD3JVC| +Duel Decks: Anthology, Divine vs. Demonic|DVD| +Duel Decks: Anthology, Elves vs. Goblins|EVG| +Duel Decks: Anthology, Garruk vs. Liliana|GVL| +Duel Decks: Anthology, Jace vs. Chandra|JVC| Duel Decks: Divine vs. Demonic|DDC| Duel Decks: Garruk vs. Liliana|DDD| Duel Decks: Phyrexia vs. the Coalition|DDE|