From ce72b0a744f098dad4fdc71e10443f1cfa9f0abd Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Mon, 7 Apr 2014 15:40:38 +0200 Subject: [PATCH] Added Journey into Nyx set. --- .../client/util/sets/ConstructedFormats.java | 7 ++- .../plugins/card/dl/sources/GathererSets.java | 2 +- .../dl/sources/MagicCardsImageSource.java | 1 + .../dl/sources/WizardCardsImageSource.java | 1 + .../src/main/resources/image.url.properties | 2 +- Mage.Sets/src/mage/sets/JourneyIntoNyx.java | 60 +++++++++++++++++++ Utils/known-sets.txt | 1 + Utils/mtg-sets-data.txt | 1 + 8 files changed, 71 insertions(+), 4 deletions(-) create mode 100644 Mage.Sets/src/mage/sets/JourneyIntoNyx.java diff --git a/Mage.Client/src/main/java/mage/client/util/sets/ConstructedFormats.java b/Mage.Client/src/main/java/mage/client/util/sets/ConstructedFormats.java index 57cce3aa394..5c9705f28c1 100644 --- a/Mage.Client/src/main/java/mage/client/util/sets/ConstructedFormats.java +++ b/Mage.Client/src/main/java/mage/client/util/sets/ConstructedFormats.java @@ -24,7 +24,7 @@ public class ConstructedFormats { private static final String[] constructedFormats = { ALL, STANDARD, EXTENDED, MODERN, "Commander 2013 Edition", - "* Theros Block", "Born of the Gods", "Theros", + "* Theros Block", "Journey into Nyx", "Born of the Gods", "Theros", "Magic 2014", "Modern Masters", "* Return to Ravnica Block", "Dragon's Maze", "Gatecrash", "Return to Ravnica", @@ -79,7 +79,10 @@ public class ConstructedFormats { public static List getSetsByFormat(String format) { if (format.equals("* Theros Block")) { - return Arrays.asList("THS", "BNG"); + return Arrays.asList("THS", "BNG","JOU"); + } + if (format.equals("Journey into Nyx")) { + return Arrays.asList("JOU"); } if (format.equals("Born of the Gods")) { return Arrays.asList("BNG"); 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 e90e52d27a9..54ce7163745 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 @@ -42,7 +42,7 @@ public class GathererSets implements Iterable { "ISD", "DKA", "AVR", "RTR", "GTC", "DGM", "MMA", - "THS", "BNG"}; + "THS", "BNG", "JOU"}; private static final HashMap symbolsReplacements = new HashMap<>(); static { diff --git a/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/MagicCardsImageSource.java b/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/MagicCardsImageSource.java index ae900518709..d6f8dea211c 100644 --- a/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/MagicCardsImageSource.java +++ b/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/MagicCardsImageSource.java @@ -18,6 +18,7 @@ public class MagicCardsImageSource implements CardImageSource { private static final Map setNameReplacement = new HashMap() { { + put("JOU", "journey-into-nyx"); put("BNG", "born-of-the-gods"); put("C13", "commander-2013-edition"); put("THS", "theros"); diff --git a/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/WizardCardsImageSource.java b/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/WizardCardsImageSource.java index b2aa3d10e74..72e93ed27cb 100644 --- a/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/WizardCardsImageSource.java +++ b/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/WizardCardsImageSource.java @@ -29,6 +29,7 @@ public class WizardCardsImageSource implements CardImageSource { public WizardCardsImageSource() { sets = new HashMap<>(); setsAliases = new HashMap<>(); + setsAliases.put("JOU", "journeyintonyx/cig"); setsAliases.put("BNG", "bornofthegods/cig"); setsAliases.put("C13", "commander2013/cig"); setsAliases.put("THS", "theros/cig"); diff --git a/Mage.Client/src/main/resources/image.url.properties b/Mage.Client/src/main/resources/image.url.properties index c8f6539e6c4..759663bb906 100644 --- a/Mage.Client/src/main/resources/image.url.properties +++ b/Mage.Client/src/main/resources/image.url.properties @@ -63,6 +63,6 @@ ddc=dvd dd2=jvc ddd=gvl # Remove setname as soon as the images can be downloaded -ignore.urls=TOK,EMBLEM +ignore.urls=TOK,EMBLEM,JOU # sets ordered by release time (newest goes first) token.lookup.order=BNG,THS,DDL,M14,MMA,DGM,GTC,RTR,M13,AVR,DDI,DKA,ISD,M12,NPH,MBS,SOM,M11,ROE,PVC,WWK,ZEN,M10,GVL,ARB,DVD,CFX,JVC,ALA,EVE,SHM,EVG,MOR,LRW,10E,CLS,CHK \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/JourneyIntoNyx.java b/Mage.Sets/src/mage/sets/JourneyIntoNyx.java new file mode 100644 index 00000000000..c5252356ea3 --- /dev/null +++ b/Mage.Sets/src/mage/sets/JourneyIntoNyx.java @@ -0,0 +1,60 @@ +/* +* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. +* +* Redistribution and use in source and binary forms, with or without modification, are +* permitted provided that the following conditions are met: +* +* 1. Redistributions of source code must retain the above copyright notice, this list of +* conditions and the following disclaimer. +* +* 2. Redistributions in binary form must reproduce the above copyright notice, this list +* of conditions and the following disclaimer in the documentation and/or other materials +* provided with the distribution. +* +* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED +* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND +* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR +* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +* +* The views and conclusions contained in the software and documentation are those of the +* authors and should not be interpreted as representing official policies, either expressed +* or implied, of BetaSteward_at_googlemail.com. +*/ + +package mage.sets; + +import java.util.GregorianCalendar; +import mage.cards.ExpansionSet; +import mage.constants.SetType; + +/** + * + * @author LevelX2 + */ +public class JourneyIntoNyx extends ExpansionSet { + + private static final JourneyIntoNyx fINSTANCE = new JourneyIntoNyx(); + + public static JourneyIntoNyx getInstance() { + return fINSTANCE; + } + + private JourneyIntoNyx() { + super("Journey into Nyx", "JOU", "mage.sets.journeyintonyx", new GregorianCalendar(2014, 5, 2).getTime(), SetType.EXPANSION); + this.blockName = "Theros"; + this.parentSet = Theros.getInstance(); + this.hasBasicLands = false; + this.hasBoosters = true; + this.numBoosterLands = 0; + this.numBoosterCommon = 11; + this.numBoosterUncommon = 3; + this.numBoosterRare = 1; + this.ratioBoosterMythic = 8; + } + +} diff --git a/Utils/known-sets.txt b/Utils/known-sets.txt index 2e43ef5df2d..7f1527dbc7e 100644 --- a/Utils/known-sets.txt +++ b/Utils/known-sets.txt @@ -93,4 +93,5 @@ Dragon's Maze|dragonsmaze| Modern Masters|modernmasters| Theros|theros| Born of the Gods|bornofthegods| +Journey into Nyx|journeyintonyx| Portal Three Kingdoms|portalthreekingdoms \ No newline at end of file diff --git a/Utils/mtg-sets-data.txt b/Utils/mtg-sets-data.txt index 4b6b9e58618..05e9b151845 100644 --- a/Utils/mtg-sets-data.txt +++ b/Utils/mtg-sets-data.txt @@ -56,6 +56,7 @@ Planechase 2012 Edition|PC2| Ice Age|ICE| Innistrad|ISD| Invasion|INV| +Journey into Nyx|JOU| Judgment|JUD| Limited Edition Alpha|LEA| Limited Edition Beta|LEB|