From b0c0ca351c4f892beb1986fa674aec8e2e153d0f Mon Sep 17 00:00:00 2001 From: drmDev Date: Sun, 10 Apr 2016 11:19:06 -0400 Subject: [PATCH] WeirdingWood fix. Gloom and VolcanicEruption impl --- .../src/mage/sets/fifthedition/Gloom.java | 52 +++++++ .../src/mage/sets/fourthedition/Gloom.java | 52 +++++++ .../sets/fourthedition/VolcanicEruption.java | 52 +++++++ .../src/mage/sets/limitedalpha/Gloom.java | 116 +++++++++++++++ .../sets/limitedalpha/VolcanicEruption.java | 52 +++++++ .../src/mage/sets/limitedbeta/Gloom.java | 52 +++++++ .../sets/limitedbeta/VolcanicEruption.java | 52 +++++++ .../src/mage/sets/masterseditioniv/Gloom.java | 54 +++++++ .../sets/mirrodinbesieged/BurntheImpure.java | 1 - .../mage/sets/ravnica/SuppressionField.java | 1 - .../src/mage/sets/revisededition/Gloom.java | 52 +++++++ .../sets/revisededition/VolcanicEruption.java | 52 +++++++ .../shadowsoverinnistrad/WeirdingWood.java | 4 +- Mage.Sets/src/mage/sets/tempest/Chill.java | 1 - .../src/mage/sets/unlimitededition/Gloom.java | 52 +++++++ .../unlimitededition/VolcanicEruption.java | 133 ++++++++++++++++++ 16 files changed, 773 insertions(+), 5 deletions(-) create mode 100644 Mage.Sets/src/mage/sets/fifthedition/Gloom.java create mode 100644 Mage.Sets/src/mage/sets/fourthedition/Gloom.java create mode 100644 Mage.Sets/src/mage/sets/fourthedition/VolcanicEruption.java create mode 100644 Mage.Sets/src/mage/sets/limitedalpha/Gloom.java create mode 100644 Mage.Sets/src/mage/sets/limitedalpha/VolcanicEruption.java create mode 100644 Mage.Sets/src/mage/sets/limitedbeta/Gloom.java create mode 100644 Mage.Sets/src/mage/sets/limitedbeta/VolcanicEruption.java create mode 100644 Mage.Sets/src/mage/sets/masterseditioniv/Gloom.java create mode 100644 Mage.Sets/src/mage/sets/revisededition/Gloom.java create mode 100644 Mage.Sets/src/mage/sets/revisededition/VolcanicEruption.java create mode 100644 Mage.Sets/src/mage/sets/unlimitededition/Gloom.java create mode 100644 Mage.Sets/src/mage/sets/unlimitededition/VolcanicEruption.java diff --git a/Mage.Sets/src/mage/sets/fifthedition/Gloom.java b/Mage.Sets/src/mage/sets/fifthedition/Gloom.java new file mode 100644 index 00000000000..34ebf73c44f --- /dev/null +++ b/Mage.Sets/src/mage/sets/fifthedition/Gloom.java @@ -0,0 +1,52 @@ +/* + * 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.fifthedition; + +import java.util.UUID; + +/** + * + * @author escplan9 (Derek Monturo - dmontur1 at gmail dot com) + */ +public class Gloom extends mage.sets.limitedalpha.Gloom { + + public Gloom(UUID ownerId) { + super(ownerId); + this.cardNumber = 27; + this.expansionSetCode = "5ED"; + } + + public Gloom(final Gloom card) { + super(card); + } + + @Override + public Gloom copy() { + return new Gloom(this); + } +} diff --git a/Mage.Sets/src/mage/sets/fourthedition/Gloom.java b/Mage.Sets/src/mage/sets/fourthedition/Gloom.java new file mode 100644 index 00000000000..9ee65a3cfd3 --- /dev/null +++ b/Mage.Sets/src/mage/sets/fourthedition/Gloom.java @@ -0,0 +1,52 @@ +/* + * 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.fourthedition; + +import java.util.UUID; + +/** + * + * @author escplan9 (Derek Monturo - dmontur1 at gmail dot com) + */ +public class Gloom extends mage.sets.limitedalpha.Gloom { + + public Gloom(UUID ownerId) { + super(ownerId); + this.cardNumber = 23; + this.expansionSetCode = "4ED"; + } + + public Gloom(final Gloom card) { + super(card); + } + + @Override + public Gloom copy() { + return new Gloom(this); + } +} diff --git a/Mage.Sets/src/mage/sets/fourthedition/VolcanicEruption.java b/Mage.Sets/src/mage/sets/fourthedition/VolcanicEruption.java new file mode 100644 index 00000000000..95f773407c8 --- /dev/null +++ b/Mage.Sets/src/mage/sets/fourthedition/VolcanicEruption.java @@ -0,0 +1,52 @@ +/* + * 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.fourthedition; + +import java.util.UUID; + +/** + * + * @author escplan9 (Derek Monturo - dmontur1 at gmail dot com) + */ +public class VolcanicEruption extends mage.sets.unlimitededition.VolcanicEruption { + + public VolcanicEruption(UUID ownerId) { + super(ownerId); + this.cardNumber = 112; + this.expansionSetCode = "4ED"; + } + + public VolcanicEruption(final VolcanicEruption card) { + super(card); + } + + @Override + public VolcanicEruption copy() { + return new VolcanicEruption(this); + } +} diff --git a/Mage.Sets/src/mage/sets/limitedalpha/Gloom.java b/Mage.Sets/src/mage/sets/limitedalpha/Gloom.java new file mode 100644 index 00000000000..1645f4d9ef9 --- /dev/null +++ b/Mage.Sets/src/mage/sets/limitedalpha/Gloom.java @@ -0,0 +1,116 @@ +/* + * 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.limitedalpha; + +import java.util.UUID; +import mage.MageObject; +import mage.ObjectColor; +import mage.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.cost.CostModificationEffectImpl; +import mage.abilities.effects.common.cost.SpellsCostIncreasementAllEffect; +import mage.cards.CardImpl; +import mage.constants.AbilityType; +import mage.constants.CardType; +import mage.constants.CostModificationType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.FilterCard; +import mage.filter.predicate.mageobject.ColorPredicate; +import mage.game.Game; +import mage.util.CardUtil; + +/** + * + * @author escplan9 (Derek Monturo - dmontur1 at gmail dot com) + */ +public class Gloom extends CardImpl { + + private static final FilterCard filter = new FilterCard("White spells"); + static { + filter.add(new ColorPredicate(ObjectColor.WHITE)); + } + + public Gloom(UUID ownerId) { + super(ownerId, 19, "Gloom", Rarity.UNCOMMON, new CardType[]{CardType.ENCHANTMENT}, "{2}{B}"); + this.expansionSetCode = "LEA"; + + // White spells cost {3} more to cast. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new SpellsCostIncreasementAllEffect(filter, 3))); + + // Activated abilities of white enchantments cost {3} more to activate. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GloomCostIncreaseEffect())); + } + + public Gloom(final Gloom card) { + super(card); + } + + @Override + public Gloom copy() { + return new Gloom(this); + } +} + +class GloomCostIncreaseEffect extends CostModificationEffectImpl { + + GloomCostIncreaseEffect() { + super(Duration.WhileOnBattlefield, Outcome.Benefit, CostModificationType.INCREASE_COST); + staticText = "Activated abilities of white enchantments cost {3} more to activate."; + } + + GloomCostIncreaseEffect(GloomCostIncreaseEffect effect) { + super(effect); + } + + @Override + public boolean apply(Game game, Ability source, Ability abilityToModify) { + CardUtil.increaseCost(abilityToModify, 3); + return true; + } + + @Override + public boolean applies(Ability abilityToModify, Ability source, Game game) { + boolean isWhiteEnchantment = false; + boolean isActivated = abilityToModify.getAbilityType().equals(AbilityType.ACTIVATED); + if (isActivated) { + MageObject permanent = game.getPermanent(abilityToModify.getSourceId()); + if (permanent != null) { + isWhiteEnchantment = permanent.getCardType().contains(CardType.ENCHANTMENT) && permanent.getColor(game).isWhite(); + } + } + return isActivated && isWhiteEnchantment; + } + + @Override + public GloomCostIncreaseEffect copy() { + return new GloomCostIncreaseEffect(this); + } +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/limitedalpha/VolcanicEruption.java b/Mage.Sets/src/mage/sets/limitedalpha/VolcanicEruption.java new file mode 100644 index 00000000000..cf4d8a6a71a --- /dev/null +++ b/Mage.Sets/src/mage/sets/limitedalpha/VolcanicEruption.java @@ -0,0 +1,52 @@ +/* + * 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.limitedalpha; + +import java.util.UUID; + +/** + * + * @author escplan9 (Derek Monturo - dmontur1 at gmail dot com) + */ +public class VolcanicEruption extends mage.sets.unlimitededition.VolcanicEruption { + + public VolcanicEruption(UUID ownerId) { + super(ownerId); + this.cardNumber = 89; + this.expansionSetCode = "LEA"; + } + + public VolcanicEruption(final VolcanicEruption card) { + super(card); + } + + @Override + public VolcanicEruption copy() { + return new VolcanicEruption(this); + } +} diff --git a/Mage.Sets/src/mage/sets/limitedbeta/Gloom.java b/Mage.Sets/src/mage/sets/limitedbeta/Gloom.java new file mode 100644 index 00000000000..688f1f9cf91 --- /dev/null +++ b/Mage.Sets/src/mage/sets/limitedbeta/Gloom.java @@ -0,0 +1,52 @@ +/* + * 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.limitedbeta; + +import java.util.UUID; + +/** + * + * @author escplan9 (Derek Monturo - dmontur1 at gmail dot com) + */ +public class Gloom extends mage.sets.limitedalpha.Gloom { + + public Gloom(UUID ownerId) { + super(ownerId); + this.cardNumber = 19; + this.expansionSetCode = "LEB"; + } + + public Gloom(final Gloom card) { + super(card); + } + + @Override + public Gloom copy() { + return new Gloom(this); + } +} diff --git a/Mage.Sets/src/mage/sets/limitedbeta/VolcanicEruption.java b/Mage.Sets/src/mage/sets/limitedbeta/VolcanicEruption.java new file mode 100644 index 00000000000..beff90bd679 --- /dev/null +++ b/Mage.Sets/src/mage/sets/limitedbeta/VolcanicEruption.java @@ -0,0 +1,52 @@ +/* + * 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.limitedbeta; + +import java.util.UUID; + +/** + * + * @author escplan9 (Derek Monturo - dmontur1 at gmail dot com) + */ +public class VolcanicEruption extends mage.sets.unlimitededition.VolcanicEruption { + + public VolcanicEruption(UUID ownerId) { + super(ownerId); + this.cardNumber = 89; + this.expansionSetCode = "LEB"; + } + + public VolcanicEruption(final VolcanicEruption card) { + super(card); + } + + @Override + public VolcanicEruption copy() { + return new VolcanicEruption(this); + } +} diff --git a/Mage.Sets/src/mage/sets/masterseditioniv/Gloom.java b/Mage.Sets/src/mage/sets/masterseditioniv/Gloom.java new file mode 100644 index 00000000000..fdf6fe1c3b4 --- /dev/null +++ b/Mage.Sets/src/mage/sets/masterseditioniv/Gloom.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.masterseditioniv; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author escplan9 (Derek Monturo - dmontur1 at gmail dot com) + */ +public class Gloom extends mage.sets.limitedalpha.Gloom { + + public Gloom(UUID ownerId) { + super(ownerId); + this.cardNumber = 83; + this.expansionSetCode = "ME4"; + this.rarity = Rarity.RARE; + } + + public Gloom(final Gloom card) { + super(card); + } + + @Override + public Gloom copy() { + return new Gloom(this); + } +} diff --git a/Mage.Sets/src/mage/sets/mirrodinbesieged/BurntheImpure.java b/Mage.Sets/src/mage/sets/mirrodinbesieged/BurntheImpure.java index b616ac0b8a7..1a7be514742 100644 --- a/Mage.Sets/src/mage/sets/mirrodinbesieged/BurntheImpure.java +++ b/Mage.Sets/src/mage/sets/mirrodinbesieged/BurntheImpure.java @@ -96,5 +96,4 @@ class BurntheImpureEffect extends OneShotEffect { } return false; } - } diff --git a/Mage.Sets/src/mage/sets/ravnica/SuppressionField.java b/Mage.Sets/src/mage/sets/ravnica/SuppressionField.java index ae8f16d7458..1a8cdd621f9 100644 --- a/Mage.Sets/src/mage/sets/ravnica/SuppressionField.java +++ b/Mage.Sets/src/mage/sets/ravnica/SuppressionField.java @@ -92,5 +92,4 @@ class SuppressionFieldCostReductionEffect extends CostModificationEffectImpl { public SuppressionFieldCostReductionEffect copy() { return new SuppressionFieldCostReductionEffect(this); } - } diff --git a/Mage.Sets/src/mage/sets/revisededition/Gloom.java b/Mage.Sets/src/mage/sets/revisededition/Gloom.java new file mode 100644 index 00000000000..e406453f3f8 --- /dev/null +++ b/Mage.Sets/src/mage/sets/revisededition/Gloom.java @@ -0,0 +1,52 @@ +/* + * 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.revisededition; + +import java.util.UUID; + +/** + * + * @author escplan9 (Derek Monturo - dmontur1 at gmail dot com) + */ +public class Gloom extends mage.sets.limitedalpha.Gloom { + + public Gloom(UUID ownerId) { + super(ownerId); + this.cardNumber = 21; + this.expansionSetCode = "3ED"; + } + + public Gloom(final Gloom card) { + super(card); + } + + @Override + public Gloom copy() { + return new Gloom(this); + } +} diff --git a/Mage.Sets/src/mage/sets/revisededition/VolcanicEruption.java b/Mage.Sets/src/mage/sets/revisededition/VolcanicEruption.java new file mode 100644 index 00000000000..e49007e9248 --- /dev/null +++ b/Mage.Sets/src/mage/sets/revisededition/VolcanicEruption.java @@ -0,0 +1,52 @@ +/* + * 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.revisededition; + +import java.util.UUID; + +/** + * + * @author escplan9 (Derek Monturo - dmontur1 at gmail dot com) + */ +public class VolcanicEruption extends mage.sets.unlimitededition.VolcanicEruption { + + public VolcanicEruption(UUID ownerId) { + super(ownerId); + this.cardNumber = 89; + this.expansionSetCode = "3ED"; + } + + public VolcanicEruption(final VolcanicEruption card) { + super(card); + } + + @Override + public VolcanicEruption copy() { + return new VolcanicEruption(this); + } +} diff --git a/Mage.Sets/src/mage/sets/shadowsoverinnistrad/WeirdingWood.java b/Mage.Sets/src/mage/sets/shadowsoverinnistrad/WeirdingWood.java index 0466580e5d2..3e216828c83 100644 --- a/Mage.Sets/src/mage/sets/shadowsoverinnistrad/WeirdingWood.java +++ b/Mage.Sets/src/mage/sets/shadowsoverinnistrad/WeirdingWood.java @@ -29,7 +29,7 @@ package mage.sets.shadowsoverinnistrad; import java.util.UUID; import mage.abilities.Ability; -import mage.abilities.common.AsEntersBattlefieldAbility; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.costs.common.TapSourceCost; import mage.abilities.effects.Effect; @@ -66,7 +66,7 @@ public class WeirdingWood extends CardImpl { this.addAbility(new EnchantAbility(auraTarget.getTargetName())); // When Weirding Wood enters the battlefield, investigate. - this.addAbility(new AsEntersBattlefieldAbility(new InvestigateEffect())); + this.addAbility(new EntersBattlefieldTriggeredAbility(new InvestigateEffect())); // Enchanted land has "{T}: Add two mana of any one color to your mana pool." Ability gainedAbility = new SimpleManaAbility(Zone.BATTLEFIELD, new AddManaOfAnyColorEffect(2), new TapSourceCost()); diff --git a/Mage.Sets/src/mage/sets/tempest/Chill.java b/Mage.Sets/src/mage/sets/tempest/Chill.java index 5fbd1413be9..c476efd3fab 100644 --- a/Mage.Sets/src/mage/sets/tempest/Chill.java +++ b/Mage.Sets/src/mage/sets/tempest/Chill.java @@ -53,7 +53,6 @@ public class Chill extends CardImpl { super(ownerId, 56, "Chill", Rarity.UNCOMMON, new CardType[]{CardType.ENCHANTMENT}, "{1}{U}"); this.expansionSetCode = "TMP"; - // Red spells cost {2} more to cast. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new SpellsCostIncreasementAllEffect(filter, 2))); } diff --git a/Mage.Sets/src/mage/sets/unlimitededition/Gloom.java b/Mage.Sets/src/mage/sets/unlimitededition/Gloom.java new file mode 100644 index 00000000000..72019addea5 --- /dev/null +++ b/Mage.Sets/src/mage/sets/unlimitededition/Gloom.java @@ -0,0 +1,52 @@ +/* + * 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.unlimitededition; + +import java.util.UUID; + +/** + * + * @author escplan9 (Derek Monturo - dmontur1 at gmail dot com) + */ +public class Gloom extends mage.sets.limitedalpha.Gloom { + + public Gloom(UUID ownerId) { + super(ownerId); + this.cardNumber = 19; + this.expansionSetCode = "2ED"; + } + + public Gloom(final Gloom card) { + super(card); + } + + @Override + public Gloom copy() { + return new Gloom(this); + } +} diff --git a/Mage.Sets/src/mage/sets/unlimitededition/VolcanicEruption.java b/Mage.Sets/src/mage/sets/unlimitededition/VolcanicEruption.java new file mode 100644 index 00000000000..075765b3b7c --- /dev/null +++ b/Mage.Sets/src/mage/sets/unlimitededition/VolcanicEruption.java @@ -0,0 +1,133 @@ +/* + * 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.unlimitededition; + +import java.util.List; +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.SpellAbility; +import mage.abilities.effects.OneShotEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.common.FilterLandPermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; +import mage.target.common.TargetLandPermanent; + +/** + * + * @author escplan9 (Derek Monturo - dmontur1 at gmail dot com) + */ +public class VolcanicEruption extends CardImpl { + + private static final FilterLandPermanent filter = new FilterLandPermanent("Mountain"); + + static{ + filter.add(new SubtypePredicate(("Mountain"))); + } + + public VolcanicEruption(UUID ownerId) { + super(ownerId, 89, "Volcanic Eruption", Rarity.RARE, new CardType[]{CardType.SORCERY}, "{X}{U}{U}{U}"); + this.expansionSetCode = "2ED"; + + // Destroy X target Mountains. Volcanic Eruption deals damage to each creature and each player equal to the number of Mountains put into a graveyard this way. + this.getSpellAbility().addTarget(new TargetLandPermanent(filter)); + this.getSpellAbility().addEffect(new VolcanicEruptionEffect()); + } + + @Override + public void adjustTargets(Ability ability, Game game) { + if (ability instanceof SpellAbility) { + ability.getTargets().clear(); + int xValue = ability.getManaCostsToPay().getX(); + ability.addTarget(new TargetLandPermanent(xValue, xValue, filter, false)); + } + } + + public VolcanicEruption(final VolcanicEruption card) { + super(card); + } + + @Override + public VolcanicEruption copy() { + return new VolcanicEruption(this); + } +} + +class VolcanicEruptionEffect extends OneShotEffect { + + public VolcanicEruptionEffect() { + super(Outcome.DestroyPermanent); + this.staticText = "Destroy X target Mountains. {this} deals damage to each creature and each player equal to the number of Mountains put into a graveyard this way."; + } + + public VolcanicEruptionEffect(final VolcanicEruptionEffect effect) { + super(effect); + } + + @Override + public VolcanicEruptionEffect copy() { + return new VolcanicEruptionEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + + int destroyedCount = 0; + for (UUID targetID : this.targetPointer.getTargets(game, source)) { + Permanent permanent = game.getPermanent(targetID); + if (permanent != null) { + if (permanent.destroy(source.getSourceId(), game, false)) { + if (game.getState().getZone(permanent.getId()) == Zone.GRAVEYARD) { + destroyedCount++; + } + } + } + } + + if (destroyedCount > 0) { + List permanents = game.getBattlefield().getActivePermanents(new FilterCreaturePermanent(), source.getControllerId(), game); + for (Permanent permanent: permanents) { + permanent.damage(destroyedCount, source.getSourceId(), game, false, true); + } + for (UUID playerId: game.getState().getPlayersInRange(source.getControllerId(), game)) { + Player player = game.getPlayer(playerId); + if (player != null) { + player.damage(destroyedCount, source.getSourceId(), game, false, true); + } + } + } + return true; + } +} \ No newline at end of file