From ca047718b6e0e9f36775fd1de4222b6138dfcb2a Mon Sep 17 00:00:00 2001 From: North Date: Wed, 12 Sep 2012 10:33:11 +0300 Subject: [PATCH] Added early sets --- .../plugins/card/dl/sources/GathererSets.java | 9 ++- Mage.Sets/src/mage/sets/Antiquities.java | 55 +++++++++++++++++++ Mage.Sets/src/mage/sets/ArabianNights.java | 55 +++++++++++++++++++ Mage.Sets/src/mage/sets/FallenEmpires.java | 55 +++++++++++++++++++ Mage.Sets/src/mage/sets/Homelands.java | 55 +++++++++++++++++++ Mage.Sets/src/mage/sets/Legends.java | 55 +++++++++++++++++++ Mage.Sets/src/mage/sets/Sets.java | 6 ++ Mage.Sets/src/mage/sets/TheDark.java | 55 +++++++++++++++++++ Utils/known-sets.txt | 6 ++ 9 files changed, 350 insertions(+), 1 deletion(-) create mode 100644 Mage.Sets/src/mage/sets/Antiquities.java create mode 100644 Mage.Sets/src/mage/sets/ArabianNights.java create mode 100644 Mage.Sets/src/mage/sets/FallenEmpires.java create mode 100644 Mage.Sets/src/mage/sets/Homelands.java create mode 100644 Mage.Sets/src/mage/sets/Legends.java create mode 100644 Mage.Sets/src/mage/sets/TheDark.java 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 2ea0b5cce8..a9cfe34c8c 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 @@ -15,12 +15,19 @@ public class GathererSets implements Iterable { private final static File DEFAULT_OUT_DIR = new File("plugins" + File.separator + "images" + SETS_PATH); private static File outDir = DEFAULT_OUT_DIR; - private static final String[] symbols = {"10E", "HOP", "TMP", "STH", "EXO", "INV", "PLS", "APC", "MRD", "DST", "5DN", "CHK", "BOK", "SOK", "RAV", "GPT", "DIS", "TSP", "TSB", "PLC", "FUT", "LRW", "MOR", "SHM", "EVE", "USG", "9ED", "8ED", "7ED", "6ED", "5ED", "4ED", "ODY", "TOR", "JUD", "ONS", "LGN", "SCG", "ULG", "USD", "MMQ", "NMS", "PCY", "MIR", "VIS", "WTH", "ALL", "ICE", "CSP"}; + private static final String[] symbols = {"10E", "HOP", "TMP", "STH", "EXO", "INV", "PLS", "APC", "MRD", "DST", "5DN", "CHK", "BOK", "SOK", "RAV", "GPT", "DIS", "TSP", "TSB", "PLC", "FUT", "LRW", "MOR", "SHM", "EVE", "USG", "9ED", "8ED", "7ED", "6ED", "5ED", "4ED", "ODY", "TOR", "JUD", "ONS", "LGN", "SCG", "ULG", "USD", "MMQ", "NMS", "PCY", "MIR", "VIS", "WTH", "ALL", "ICE", "CSP", "ARN", "ATQ", "LEG", "DRK", "FEM", "HML"}; private static final String[] withMythics = {"M10", "M11", "M12", "M13", "DDF", "ALA", "CFX", "ARB", "ZEN", "WWK", "ROE", "SOM", "MBS", "NPH", "ISD", "DKA", "AVR"}; private static final HashMap symbolsReplacements = new HashMap(); static { symbolsReplacements.put("CFX", "CON"); + symbolsReplacements.put("ARN", "AN"); + symbolsReplacements.put("ATQ", "AQ"); + symbolsReplacements.put("LEG", "LE"); + symbolsReplacements.put("DRK", "DK"); + symbolsReplacements.put("FEM", "FE"); + symbolsReplacements.put("HML", "HM"); + symbolsReplacements.put("ICE", "IA"); symbolsReplacements.put("ALL", "AL"); symbolsReplacements.put("APC", "AP"); symbolsReplacements.put("TMP", "TE"); diff --git a/Mage.Sets/src/mage/sets/Antiquities.java b/Mage.Sets/src/mage/sets/Antiquities.java new file mode 100644 index 0000000000..b68c844434 --- /dev/null +++ b/Mage.Sets/src/mage/sets/Antiquities.java @@ -0,0 +1,55 @@ +/* + * 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.Constants; +import mage.cards.ExpansionSet; + +/** + * + * @author North + */ +public class Antiquities extends ExpansionSet { + + private static final Antiquities fINSTANCE = new Antiquities(); + + public static Antiquities getInstance() { + return fINSTANCE; + } + + private Antiquities() { + super("Antiquities", "ATQ", "", "mage.sets.antiquities", new GregorianCalendar(1994, 2, 1).getTime(), Constants.SetType.EXPANSION); + this.hasBoosters = true; + this.numBoosterLands = 1; + this.numBoosterCommon = 10; + this.numBoosterUncommon = 3; + this.numBoosterRare = 1; + this.ratioBoosterMythic = 0; + } +} diff --git a/Mage.Sets/src/mage/sets/ArabianNights.java b/Mage.Sets/src/mage/sets/ArabianNights.java new file mode 100644 index 0000000000..231354fb6c --- /dev/null +++ b/Mage.Sets/src/mage/sets/ArabianNights.java @@ -0,0 +1,55 @@ +/* + * 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.Constants; +import mage.cards.ExpansionSet; + +/** + * + * @author North + */ +public class ArabianNights extends ExpansionSet { + + private static final ArabianNights fINSTANCE = new ArabianNights(); + + public static ArabianNights getInstance() { + return fINSTANCE; + } + + private ArabianNights() { + super("Arabian Nights", "ARN", "", "mage.sets.arabiannights", new GregorianCalendar(1993, 11, 1).getTime(), Constants.SetType.EXPANSION); + this.hasBoosters = true; + this.numBoosterLands = 1; + this.numBoosterCommon = 10; + this.numBoosterUncommon = 3; + this.numBoosterRare = 1; + this.ratioBoosterMythic = 0; + } +} diff --git a/Mage.Sets/src/mage/sets/FallenEmpires.java b/Mage.Sets/src/mage/sets/FallenEmpires.java new file mode 100644 index 0000000000..053f84923e --- /dev/null +++ b/Mage.Sets/src/mage/sets/FallenEmpires.java @@ -0,0 +1,55 @@ +/* + * 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.Constants; +import mage.cards.ExpansionSet; + +/** + * + * @author North + */ +public class FallenEmpires extends ExpansionSet { + + private static final FallenEmpires fINSTANCE = new FallenEmpires(); + + public static FallenEmpires getInstance() { + return fINSTANCE; + } + + private FallenEmpires() { + super("Fallen Empires", "FEM", "", "mage.sets.fallenempires", new GregorianCalendar(1994, 10, 1).getTime(), Constants.SetType.EXPANSION); + this.hasBoosters = true; + this.numBoosterLands = 1; + this.numBoosterCommon = 10; + this.numBoosterUncommon = 3; + this.numBoosterRare = 1; + this.ratioBoosterMythic = 0; + } +} diff --git a/Mage.Sets/src/mage/sets/Homelands.java b/Mage.Sets/src/mage/sets/Homelands.java new file mode 100644 index 0000000000..593de388e7 --- /dev/null +++ b/Mage.Sets/src/mage/sets/Homelands.java @@ -0,0 +1,55 @@ +/* + * 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.Constants; +import mage.cards.ExpansionSet; + +/** + * + * @author North + */ +public class Homelands extends ExpansionSet { + + private static final Homelands fINSTANCE = new Homelands(); + + public static Homelands getInstance() { + return fINSTANCE; + } + + private Homelands() { + super("Homelands", "HML", "", "mage.sets.homelands", new GregorianCalendar(1995, 9, 1).getTime(), Constants.SetType.EXPANSION); + this.hasBoosters = true; + this.numBoosterLands = 1; + this.numBoosterCommon = 10; + this.numBoosterUncommon = 3; + this.numBoosterRare = 1; + this.ratioBoosterMythic = 0; + } +} diff --git a/Mage.Sets/src/mage/sets/Legends.java b/Mage.Sets/src/mage/sets/Legends.java new file mode 100644 index 0000000000..e0fcd982fa --- /dev/null +++ b/Mage.Sets/src/mage/sets/Legends.java @@ -0,0 +1,55 @@ +/* + * 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.Constants; +import mage.cards.ExpansionSet; + +/** + * + * @author North + */ +public class Legends extends ExpansionSet { + + private static final Legends fINSTANCE = new Legends(); + + public static Legends getInstance() { + return fINSTANCE; + } + + private Legends() { + super("Legends", "LEG", "", "mage.sets.legends", new GregorianCalendar(1994, 5, 1).getTime(), Constants.SetType.EXPANSION); + this.hasBoosters = true; + this.numBoosterLands = 1; + this.numBoosterCommon = 10; + this.numBoosterUncommon = 3; + this.numBoosterRare = 1; + this.ratioBoosterMythic = 0; + } +} diff --git a/Mage.Sets/src/mage/sets/Sets.java b/Mage.Sets/src/mage/sets/Sets.java index f69375d7a3..48c0ab17bc 100644 --- a/Mage.Sets/src/mage/sets/Sets.java +++ b/Mage.Sets/src/mage/sets/Sets.java @@ -73,7 +73,9 @@ public class Sets extends HashMap { creatureTypes = new TreeSet(); this.addSet(AlaraReborn.getInstance()); this.addSet(Alliances.getInstance()); + this.addSet(Antiquities.getInstance()); this.addSet(Apocalypse.getInstance()); + this.addSet(ArabianNights.getInstance()); this.addSet(AvacynRestored.getInstance()); this.addSet(BetrayersOfKamigawa.getInstance()); this.addSet(ChampionsOfKamigawa.getInstance()); @@ -88,14 +90,17 @@ public class Sets extends HashMap { this.addSet(Exodus.getInstance()); this.addSet(FifthDawn.getInstance()); this.addSet(FifthEdition.getInstance()); + this.addSet(FallenEmpires.getInstance()); this.addSet(FourthEdition.getInstance()); this.addSet(FutureSight.getInstance()); this.addSet(Guildpact.getInstance()); this.addSet(Guru.getInstance()); + this.addSet(Homelands.getInstance()); this.addSet(IceAge.getInstance()); this.addSet(Innistrad.getInstance()); this.addSet(Invasion.getInstance()); this.addSet(Judgment.getInstance()); + this.addSet(Legends.getInstance()); this.addSet(Legions.getInstance()); this.addSet(Lorwyn.getInstance()); this.addSet(Magic2010.getInstance()); @@ -130,6 +135,7 @@ public class Sets extends HashMap { this.addSet(Stronghold.getInstance()); this.addSet(Tenth.getInstance()); this.addSet(Tempest.getInstance()); + this.addSet(TheDark.getInstance()); this.addSet(TimeSpiral.getInstance()); this.addSet(TimeSpiralTimeshifted.getInstance()); this.addSet(Torment.getInstance()); diff --git a/Mage.Sets/src/mage/sets/TheDark.java b/Mage.Sets/src/mage/sets/TheDark.java new file mode 100644 index 0000000000..d2a8220d50 --- /dev/null +++ b/Mage.Sets/src/mage/sets/TheDark.java @@ -0,0 +1,55 @@ +/* + * 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.Constants; +import mage.cards.ExpansionSet; + +/** + * + * @author North + */ +public class TheDark extends ExpansionSet { + + private static final TheDark fINSTANCE = new TheDark(); + + public static TheDark getInstance() { + return fINSTANCE; + } + + private TheDark() { + super("The Dark", "DRK", "", "mage.sets.thedark", new GregorianCalendar(1994, 7, 1).getTime(), Constants.SetType.EXPANSION); + this.hasBoosters = true; + this.numBoosterLands = 1; + this.numBoosterCommon = 10; + this.numBoosterUncommon = 3; + this.numBoosterRare = 1; + this.ratioBoosterMythic = 0; + } +} diff --git a/Utils/known-sets.txt b/Utils/known-sets.txt index 0f35e43402..c332fc24f2 100644 --- a/Utils/known-sets.txt +++ b/Utils/known-sets.txt @@ -11,6 +11,12 @@ Magic 2012|magic2012| Magic 2013|magic2013| Planechase|planechase| Duel Decks: Elspeth vs. Tezzeret|elspethvstezzeret| +Arabian Nights|arabiannights| +Antiquities|antiquities| +Legends|legends| +The Dark|thedark| +Fallen Empires|fallenempires| +Homelands|homelands| Ice Age|iceage| Alliances|alliances| Coldsnap|coldsnap|