From d71f48c2ce448e84fd5c0c8cef27ed6da7139fbc Mon Sep 17 00:00:00 2001 From: BetaSteward Date: Sun, 14 Nov 2010 19:52:44 +0000 Subject: [PATCH] Planechase is back --- Mage.Sets/src/mage/sets/AlaraReborn.java | 5 +- Mage.Sets/src/mage/sets/Conflux.java | 5 +- Mage.Sets/src/mage/sets/Magic2010.java | 4 +- Mage.Sets/src/mage/sets/Magic2011.java | 4 +- Mage.Sets/src/mage/sets/Planechase.java | 51 ++++++++++++++++++ Mage.Sets/src/mage/sets/RiseOfTheEldrazi.java | 5 +- Mage.Sets/src/mage/sets/Sets.java | 1 + Mage.Sets/src/mage/sets/ShardsOfAlara.java | 4 +- Mage.Sets/src/mage/sets/Tenth.java | 4 +- Mage.Sets/src/mage/sets/Worldwake.java | 5 +- Mage.Sets/src/mage/sets/Zendikar.java | 4 +- .../src/mage/sets/planechase/Gravedigger.java | 54 +++++++++++++++++++ .../mage/sets/planechase/OblivionRing.java | 54 +++++++++++++++++++ .../src/mage/sets/planechase/SoulWarden.java | 54 +++++++++++++++++++ .../sets/planechase/TerramorphicExpanse.java | 54 +++++++++++++++++++ Mage/src/mage/Constants.java | 17 ++++++ Mage/src/mage/cards/ExpansionSet.java | 37 +++++++++---- 17 files changed, 342 insertions(+), 20 deletions(-) create mode 100644 Mage.Sets/src/mage/sets/Planechase.java create mode 100644 Mage.Sets/src/mage/sets/planechase/Gravedigger.java create mode 100644 Mage.Sets/src/mage/sets/planechase/OblivionRing.java create mode 100644 Mage.Sets/src/mage/sets/planechase/SoulWarden.java create mode 100644 Mage.Sets/src/mage/sets/planechase/TerramorphicExpanse.java diff --git a/Mage.Sets/src/mage/sets/AlaraReborn.java b/Mage.Sets/src/mage/sets/AlaraReborn.java index 828edebc30b..6f1c017ae2d 100644 --- a/Mage.Sets/src/mage/sets/AlaraReborn.java +++ b/Mage.Sets/src/mage/sets/AlaraReborn.java @@ -29,6 +29,7 @@ package mage.sets; import java.util.GregorianCalendar; +import mage.Constants.SetType; import mage.cards.ExpansionSet; /** @@ -44,8 +45,10 @@ public class AlaraReborn extends ExpansionSet { } private AlaraReborn() { - super("Alara Reborn", "ARB", "seticon_mtgarb", "mage.sets.alarareborn", new GregorianCalendar(2009, 3, 25).getTime(), false); + super("Alara Reborn", "ARB", "seticon_mtgarb", "mage.sets.alarareborn", new GregorianCalendar(2009, 3, 25).getTime(), SetType.EXPANSION); this.blockName = "Shards of Alara"; + this.parentSet = ShardsOfAlara.getInstance(); + this.hasBoosters = true; this.numBoosterLands = 1; this.numBoosterCommon = 10; this.numBoosterUncommon = 3; diff --git a/Mage.Sets/src/mage/sets/Conflux.java b/Mage.Sets/src/mage/sets/Conflux.java index aa82bf5991d..b8d59c524c0 100644 --- a/Mage.Sets/src/mage/sets/Conflux.java +++ b/Mage.Sets/src/mage/sets/Conflux.java @@ -29,6 +29,7 @@ package mage.sets; import java.util.GregorianCalendar; +import mage.Constants.SetType; import mage.cards.ExpansionSet; /** @@ -44,8 +45,10 @@ public class Conflux extends ExpansionSet { } private Conflux() { - super("Conflux", "CON", "seticon_conflux", "mage.sets.conflux", new GregorianCalendar(2009, 0, 31).getTime(), false); + super("Conflux", "CON", "seticon_conflux", "mage.sets.conflux", new GregorianCalendar(2009, 0, 31).getTime(), SetType.EXPANSION); this.blockName = "Shards of Alara"; + this.parentSet = ShardsOfAlara.getInstance(); + this.hasBoosters = true; this.numBoosterLands = 1; this.numBoosterCommon = 10; this.numBoosterUncommon = 3; diff --git a/Mage.Sets/src/mage/sets/Magic2010.java b/Mage.Sets/src/mage/sets/Magic2010.java index fc097d99b1b..e0190e9a0e1 100644 --- a/Mage.Sets/src/mage/sets/Magic2010.java +++ b/Mage.Sets/src/mage/sets/Magic2010.java @@ -29,6 +29,7 @@ package mage.sets; import java.util.GregorianCalendar; +import mage.Constants.SetType; import mage.cards.ExpansionSet; /** @@ -44,7 +45,8 @@ public class Magic2010 extends ExpansionSet { } private Magic2010() { - super("Magic 2010", "M10", "seticon_M10", "mage.sets.magic2010", new GregorianCalendar(2009, 6, 17).getTime(), true); + super("Magic 2010", "M10", "seticon_M10", "mage.sets.magic2010", new GregorianCalendar(2009, 6, 17).getTime(), SetType.CORE); + this.hasBoosters = true; this.numBoosterLands = 1; this.numBoosterCommon = 10; this.numBoosterUncommon = 3; diff --git a/Mage.Sets/src/mage/sets/Magic2011.java b/Mage.Sets/src/mage/sets/Magic2011.java index 759d808de7a..2968b1cad49 100644 --- a/Mage.Sets/src/mage/sets/Magic2011.java +++ b/Mage.Sets/src/mage/sets/Magic2011.java @@ -29,6 +29,7 @@ package mage.sets; import java.util.GregorianCalendar; +import mage.Constants.SetType; import mage.cards.ExpansionSet; /** @@ -44,7 +45,8 @@ public class Magic2011 extends ExpansionSet { } private Magic2011() { - super("Magic 2011", "M11", "seticon_M11", "mage.sets.magic2011", new GregorianCalendar(2010, 6, 16).getTime(), true); + super("Magic 2011", "M11", "seticon_M11", "mage.sets.magic2011", new GregorianCalendar(2010, 6, 16).getTime(), SetType.CORE); + this.hasBoosters = true; this.numBoosterLands = 1; this.numBoosterCommon = 10; this.numBoosterUncommon = 3; diff --git a/Mage.Sets/src/mage/sets/Planechase.java b/Mage.Sets/src/mage/sets/Planechase.java new file mode 100644 index 00000000000..26e4386c85a --- /dev/null +++ b/Mage.Sets/src/mage/sets/Planechase.java @@ -0,0 +1,51 @@ +/* +* 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.SetType; +import mage.cards.ExpansionSet; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class Planechase extends ExpansionSet { + + private static final Planechase fINSTANCE = new Planechase(); + + public static Planechase getInstance() { + return fINSTANCE; + } + + private Planechase() { + super("Planechase", "HOP", "", "mage.sets.planechase", new GregorianCalendar(2009, 8, 4).getTime(), SetType.REPRINT); + } + +} diff --git a/Mage.Sets/src/mage/sets/RiseOfTheEldrazi.java b/Mage.Sets/src/mage/sets/RiseOfTheEldrazi.java index e84509d6eae..9fc84233e54 100644 --- a/Mage.Sets/src/mage/sets/RiseOfTheEldrazi.java +++ b/Mage.Sets/src/mage/sets/RiseOfTheEldrazi.java @@ -29,6 +29,7 @@ package mage.sets; import java.util.GregorianCalendar; +import mage.Constants.SetType; import mage.cards.ExpansionSet; /** @@ -44,8 +45,10 @@ public class RiseOfTheEldrazi extends ExpansionSet { } private RiseOfTheEldrazi() { - super("Rise of the Eldrazi", "ROE", "seticon_ROE", "mage.sets.riseoftheeldrazi", new GregorianCalendar(2010, 3, 17).getTime(), false); + super("Rise of the Eldrazi", "ROE", "seticon_ROE", "mage.sets.riseoftheeldrazi", new GregorianCalendar(2010, 3, 17).getTime(), SetType.EXPANSION); this.blockName = "Zendikar"; + this.parentSet = Zendikar.getInstance(); + this.hasBoosters = true; this.numBoosterLands = 1; this.numBoosterCommon = 10; this.numBoosterUncommon = 3; diff --git a/Mage.Sets/src/mage/sets/Sets.java b/Mage.Sets/src/mage/sets/Sets.java index 169df9518a9..41cc4ccd00d 100644 --- a/Mage.Sets/src/mage/sets/Sets.java +++ b/Mage.Sets/src/mage/sets/Sets.java @@ -53,6 +53,7 @@ public class Sets extends HashMap { this.addSet(Conflux.getInstance()); this.addSet(Magic2010.getInstance()); this.addSet(Magic2011.getInstance()); + this.addSet(Planechase.getInstance()); this.addSet(RiseOfTheEldrazi.getInstance()); this.addSet(ShardsOfAlara.getInstance()); this.addSet(Tenth.getInstance()); diff --git a/Mage.Sets/src/mage/sets/ShardsOfAlara.java b/Mage.Sets/src/mage/sets/ShardsOfAlara.java index 9cbb40b938b..b3ac621fd0c 100644 --- a/Mage.Sets/src/mage/sets/ShardsOfAlara.java +++ b/Mage.Sets/src/mage/sets/ShardsOfAlara.java @@ -29,6 +29,7 @@ package mage.sets; import java.util.GregorianCalendar; +import mage.Constants.SetType; import mage.cards.ExpansionSet; /** @@ -44,8 +45,9 @@ public class ShardsOfAlara extends ExpansionSet { } private ShardsOfAlara() { - super("Shards of Alara", "ALA", "seticon_mtgala", "mage.sets.shardsofalara", new GregorianCalendar(2008, 8, 27).getTime(), false); + super("Shards of Alara", "ALA", "seticon_mtgala", "mage.sets.shardsofalara", new GregorianCalendar(2008, 8, 27).getTime(), SetType.EXPANSION); this.blockName = "Shards of Alara"; + this.hasBoosters = true; this.numBoosterLands = 1; this.numBoosterCommon = 10; this.numBoosterUncommon = 3; diff --git a/Mage.Sets/src/mage/sets/Tenth.java b/Mage.Sets/src/mage/sets/Tenth.java index 1c140c772a9..7b080cb6baf 100644 --- a/Mage.Sets/src/mage/sets/Tenth.java +++ b/Mage.Sets/src/mage/sets/Tenth.java @@ -29,6 +29,7 @@ package mage.sets; import java.util.GregorianCalendar; +import mage.Constants.SetType; import mage.cards.ExpansionSet; /** @@ -44,7 +45,8 @@ public class Tenth extends ExpansionSet { } private Tenth() { - super("Tenth Edition", "10E", "exp_symbol_mtg10e", "mage.sets.tenth", new GregorianCalendar(2007, 6, 14).getTime(), true); + super("Tenth Edition", "10E", "exp_symbol_mtg10e", "mage.sets.tenth", new GregorianCalendar(2007, 6, 14).getTime(), SetType.CORE); + this.hasBoosters = true; this.numBoosterLands = 1; this.numBoosterCommon = 10; this.numBoosterUncommon = 3; diff --git a/Mage.Sets/src/mage/sets/Worldwake.java b/Mage.Sets/src/mage/sets/Worldwake.java index 9a90e2e404b..b3eb03bdf4c 100644 --- a/Mage.Sets/src/mage/sets/Worldwake.java +++ b/Mage.Sets/src/mage/sets/Worldwake.java @@ -29,6 +29,7 @@ package mage.sets; import java.util.GregorianCalendar; +import mage.Constants.SetType; import mage.cards.ExpansionSet; /** @@ -44,8 +45,10 @@ public class Worldwake extends ExpansionSet { } private Worldwake() { - super("Worldwake", "WWK", "seticon_WWK", "mage.sets.worldwake", new GregorianCalendar(2010, 0, 30).getTime(), false); + super("Worldwake", "WWK", "seticon_WWK", "mage.sets.worldwake", new GregorianCalendar(2010, 0, 30).getTime(), SetType.EXPANSION); this.blockName = "Zendikar"; + this.parentSet = Zendikar.getInstance(); + this.hasBoosters = true; this.numBoosterLands = 1; this.numBoosterCommon = 10; this.numBoosterUncommon = 3; diff --git a/Mage.Sets/src/mage/sets/Zendikar.java b/Mage.Sets/src/mage/sets/Zendikar.java index 5e5f82cf7ee..63ac0f82504 100644 --- a/Mage.Sets/src/mage/sets/Zendikar.java +++ b/Mage.Sets/src/mage/sets/Zendikar.java @@ -29,6 +29,7 @@ package mage.sets; import java.util.GregorianCalendar; +import mage.Constants.SetType; import mage.cards.ExpansionSet; /** @@ -44,8 +45,9 @@ public class Zendikar extends ExpansionSet { } private Zendikar() { - super("Zendikar", "ZEN", "seticon_ZEN", "mage.sets.zendikar", new GregorianCalendar(2009, 8, 26).getTime(), false); + super("Zendikar", "ZEN", "seticon_ZEN", "mage.sets.zendikar", new GregorianCalendar(2009, 8, 26).getTime(), SetType.EXPANSION); this.blockName = "Zendikar"; + this.hasBoosters = true; this.numBoosterLands = 1; this.numBoosterCommon = 10; this.numBoosterUncommon = 3; diff --git a/Mage.Sets/src/mage/sets/planechase/Gravedigger.java b/Mage.Sets/src/mage/sets/planechase/Gravedigger.java new file mode 100644 index 00000000000..115ca0d3a76 --- /dev/null +++ b/Mage.Sets/src/mage/sets/planechase/Gravedigger.java @@ -0,0 +1,54 @@ +/* + * 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.planechase; + +import java.util.UUID; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class Gravedigger extends mage.sets.tenth.Gravedigger { + + public Gravedigger(UUID ownerId) { + super(ownerId); + this.cardNumber = 29; + this.expansionSetCode = "HOP"; + } + + public Gravedigger(final Gravedigger card) { + super(card); + } + + @Override + public Gravedigger copy() { + return new Gravedigger(this); + } + +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/planechase/OblivionRing.java b/Mage.Sets/src/mage/sets/planechase/OblivionRing.java new file mode 100644 index 00000000000..bbeb1025d2f --- /dev/null +++ b/Mage.Sets/src/mage/sets/planechase/OblivionRing.java @@ -0,0 +1,54 @@ +/* +* 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.planechase; + +import java.util.UUID; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class OblivionRing extends mage.sets.shardsofalara.OblivionRing { + + public OblivionRing(UUID ownerId) { + super(ownerId); + this.cardNumber = 4; + this.expansionSetCode = "HOP"; + } + + public OblivionRing(final OblivionRing card) { + super(card); + } + + @Override + public OblivionRing copy() { + return new OblivionRing(this); + } + +} diff --git a/Mage.Sets/src/mage/sets/planechase/SoulWarden.java b/Mage.Sets/src/mage/sets/planechase/SoulWarden.java new file mode 100644 index 00000000000..b847899c5a0 --- /dev/null +++ b/Mage.Sets/src/mage/sets/planechase/SoulWarden.java @@ -0,0 +1,54 @@ +/* +* 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.planechase; + +import java.util.UUID; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class SoulWarden extends mage.sets.magic2010.SoulWarden { + + public SoulWarden(UUID ownerId) { + super(ownerId); + this.cardNumber = 7; + this.expansionSetCode = "HOP"; + } + + public SoulWarden(final SoulWarden card) { + super(card); + } + + @Override + public SoulWarden copy() { + return new SoulWarden(this); + } + +} diff --git a/Mage.Sets/src/mage/sets/planechase/TerramorphicExpanse.java b/Mage.Sets/src/mage/sets/planechase/TerramorphicExpanse.java new file mode 100644 index 00000000000..5ddb6eb6188 --- /dev/null +++ b/Mage.Sets/src/mage/sets/planechase/TerramorphicExpanse.java @@ -0,0 +1,54 @@ +/* + * 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.planechase; + +import java.util.UUID; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class TerramorphicExpanse extends mage.sets.tenth.TerramorphicExpanse { + + public TerramorphicExpanse(UUID ownerId) { + super(ownerId); + this.cardNumber = 139; + this.expansionSetCode = "HOP"; + } + + public TerramorphicExpanse(final TerramorphicExpanse card) { + super(card); + } + + @Override + public TerramorphicExpanse copy() { + return new TerramorphicExpanse(this); + } + +} \ No newline at end of file diff --git a/Mage/src/mage/Constants.java b/Mage/src/mage/Constants.java index b68e90ec4da..6a9b3dae018 100644 --- a/Mage/src/mage/Constants.java +++ b/Mage/src/mage/Constants.java @@ -352,6 +352,23 @@ public final class Constants { } } + public enum SetType { + CORE("Core"), + EXPANSION("Expansion"), + REPRINT("Reprint"); + + private String text; + + SetType(String text) { + this.text = text; + } + + @Override + public String toString() { + return text; + } + } + public static final List PlaneswalkerTypes = new ArrayList() {{add("Ajani"); add("Bolas"); add("Chandra"); add("Elspeth");add("Garruk"); add("Jace"); add("Liliana"); add("Nissa"); add("Sarkhan"); add("Sorin"); add("Tezzeret");}}; diff --git a/Mage/src/mage/cards/ExpansionSet.java b/Mage/src/mage/cards/ExpansionSet.java index 8b3b05dc861..83f5bdd1adc 100644 --- a/Mage/src/mage/cards/ExpansionSet.java +++ b/Mage/src/mage/cards/ExpansionSet.java @@ -48,6 +48,7 @@ import java.util.jar.JarFile; import java.util.logging.Level; import java.util.logging.Logger; import mage.Constants.Rarity; +import mage.Constants.SetType; import mage.util.Logging; /** @@ -66,22 +67,23 @@ public abstract class ExpansionSet implements Serializable { protected Date releaseDate; protected ExpansionSet parentSet; protected List cards; - protected boolean core; + protected SetType setType; protected Map> rarities; protected String blockName; + protected boolean hasBoosters = false; protected int numBoosterLands; protected int numBoosterCommon; protected int numBoosterUncommon; protected int numBoosterRare; protected int ratioBoosterMythic; - public ExpansionSet(String name, String code, String symbolCode, String packageName, Date releaseDate, boolean core) { + public ExpansionSet(String name, String code, String symbolCode, String packageName, Date releaseDate, SetType setType) { this.name = name; this.code = code; this.symbolCode = symbolCode; this.releaseDate = releaseDate; - this.core = core; + this.setType = setType; this.cards = getCardClassesForPackage(packageName); this.rarities = getCardsByRarity(); } @@ -106,8 +108,8 @@ public abstract class ExpansionSet implements Serializable { return releaseDate; } - public boolean isCore() { - return core; + public SetType getSetType() { + return setType; } public Card createCard(Class clazz) { @@ -196,30 +198,43 @@ public abstract class ExpansionSet implements Serializable { public List createBooster() { List booster = new ArrayList(); + if (!hasBoosters) + return booster; + if (parentSet != null) { - parentSet.getRandom(Rarity.LAND); + for (int i = 0; i < numBoosterLands; i++) { + addToBooster(booster, parentSet, Rarity.LAND); + } } else { - booster.add(getRandom(Rarity.LAND)); + for (int i = 0; i < numBoosterLands; i++) { + addToBooster(booster, this, Rarity.LAND); + } } for (int i = 0; i < numBoosterCommon; i++) { - booster.add(getRandom(Rarity.COMMON)); + addToBooster(booster, this, Rarity.COMMON); } for (int i = 0; i < numBoosterUncommon; i++) { - booster.add(getRandom(Rarity.UNCOMMON)); + addToBooster(booster, this, Rarity.UNCOMMON); } for (int i = 0; i < numBoosterRare; i++) { if (rnd.nextInt(ratioBoosterMythic) == 1) { - booster.add(getRandom(Rarity.MYTHIC)); + addToBooster(booster, this, Rarity.MYTHIC); } else { - booster.add(getRandom(Rarity.RARE)); + addToBooster(booster, this, Rarity.RARE); } } return booster; } + protected void addToBooster(List booster, ExpansionSet set, Rarity rarity) { + Card card = set.getRandom(rarity); + if (card != null) + booster.add(card); + } + protected Card getRandom(Rarity rarity) { if (!rarities.containsKey(rarity)) return null;