diff --git a/Mage.Sets/src/mage/sets/conflux/ExoticOrchard.java b/Mage.Sets/src/mage/sets/conflux/ExoticOrchard.java index 04e515f8ef..977c34b21c 100644 --- a/Mage.Sets/src/mage/sets/conflux/ExoticOrchard.java +++ b/Mage.Sets/src/mage/sets/conflux/ExoticOrchard.java @@ -28,10 +28,11 @@ package mage.sets.conflux; import java.util.UUID; -import mage.abilities.mana.AnyColorOpponentLandsProduceManaAbility; +import mage.abilities.mana.AnyColorLandsProduceManaAbility; import mage.cards.CardImpl; import mage.constants.CardType; import mage.constants.Rarity; +import mage.constants.TargetController; /** * @@ -44,7 +45,7 @@ public class ExoticOrchard extends CardImpl { this.expansionSetCode = "CON"; // {T}: Add to your mana pool one mana of any color that a land an opponent controls could produce. - this.addAbility(new AnyColorOpponentLandsProduceManaAbility()); + this.addAbility(new AnyColorLandsProduceManaAbility(TargetController.OPPONENT)); } public ExoticOrchard(final ExoticOrchard card) { diff --git a/Mage.Sets/src/mage/sets/fifthdawn/SylvokExplorer.java b/Mage.Sets/src/mage/sets/fifthdawn/SylvokExplorer.java index 0db79cfb65..22cb1c616c 100644 --- a/Mage.Sets/src/mage/sets/fifthdawn/SylvokExplorer.java +++ b/Mage.Sets/src/mage/sets/fifthdawn/SylvokExplorer.java @@ -29,10 +29,11 @@ package mage.sets.fifthdawn; import java.util.UUID; import mage.MageInt; -import mage.abilities.mana.AnyColorOpponentLandsProduceManaAbility; +import mage.abilities.mana.AnyColorLandsProduceManaAbility; import mage.cards.CardImpl; import mage.constants.CardType; import mage.constants.Rarity; +import mage.constants.TargetController; /** * @@ -50,7 +51,7 @@ public class SylvokExplorer extends CardImpl { this.toughness = new MageInt(1); // {T}: Add to your mana pool one mana of any color that a land an opponent controls could produce. - this.addAbility(new AnyColorOpponentLandsProduceManaAbility()); + this.addAbility(new AnyColorLandsProduceManaAbility(TargetController.OPPONENT)); } public SylvokExplorer(final SylvokExplorer card) { diff --git a/Mage.Sets/src/mage/sets/judgment/HarvesterDruid.java b/Mage.Sets/src/mage/sets/judgment/HarvesterDruid.java new file mode 100644 index 0000000000..e14b8b0a19 --- /dev/null +++ b/Mage.Sets/src/mage/sets/judgment/HarvesterDruid.java @@ -0,0 +1,64 @@ +/* + * 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.judgment; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.mana.AnyColorLandsProduceManaAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.TargetController; + +/** + * + * @author LoneFox + */ +public class HarvesterDruid extends CardImpl { + + public HarvesterDruid(UUID ownerId) { + super(ownerId, 120, "Harvester Druid", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{1}{G}"); + this.expansionSetCode = "JUD"; + this.subtype.add("Human"); + this.subtype.add("Druid"); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // {tap}: Add to your mana pool one mana of any color that a land you control could produce. + this.addAbility(new AnyColorLandsProduceManaAbility(TargetController.YOU)); + } + + public HarvesterDruid(final HarvesterDruid card) { + super(card); + } + + @Override + public HarvesterDruid copy() { + return new HarvesterDruid(this); + } +} diff --git a/Mage.Sets/src/mage/sets/ninthedition/FellwarStone.java b/Mage.Sets/src/mage/sets/ninthedition/FellwarStone.java index b9c37a37bc..c74123bb22 100644 --- a/Mage.Sets/src/mage/sets/ninthedition/FellwarStone.java +++ b/Mage.Sets/src/mage/sets/ninthedition/FellwarStone.java @@ -28,10 +28,11 @@ package mage.sets.ninthedition; import java.util.UUID; -import mage.abilities.mana.AnyColorOpponentLandsProduceManaAbility; +import mage.abilities.mana.AnyColorLandsProduceManaAbility; import mage.cards.CardImpl; import mage.constants.CardType; import mage.constants.Rarity; +import mage.constants.TargetController; /** * @@ -44,7 +45,7 @@ public class FellwarStone extends CardImpl { this.expansionSetCode = "9ED"; // {T}: Add to your mana pool one mana of any color that a land an opponent controls could produce. - this.addAbility(new AnyColorOpponentLandsProduceManaAbility()); + this.addAbility(new AnyColorLandsProduceManaAbility(TargetController.OPPONENT)); } public FellwarStone(final FellwarStone card) { diff --git a/Mage.Sets/src/mage/sets/planeshift/QuirionExplorer.java b/Mage.Sets/src/mage/sets/planeshift/QuirionExplorer.java index bccab7725a..680949940a 100644 --- a/Mage.Sets/src/mage/sets/planeshift/QuirionExplorer.java +++ b/Mage.Sets/src/mage/sets/planeshift/QuirionExplorer.java @@ -29,10 +29,11 @@ package mage.sets.planeshift; import java.util.UUID; import mage.MageInt; -import mage.abilities.mana.AnyColorOpponentLandsProduceManaAbility; +import mage.abilities.mana.AnyColorLandsProduceManaAbility; import mage.cards.CardImpl; import mage.constants.CardType; import mage.constants.Rarity; +import mage.constants.TargetController; /** * @@ -50,7 +51,7 @@ public class QuirionExplorer extends CardImpl { this.toughness = new MageInt(1); // {T}: Add to your mana pool one mana of any color that a land an opponent controls could produce. - this.addAbility(new AnyColorOpponentLandsProduceManaAbility()); + this.addAbility(new AnyColorLandsProduceManaAbility(TargetController.OPPONENT)); } public QuirionExplorer(final QuirionExplorer card) { diff --git a/Mage/src/main/java/mage/abilities/mana/AnyColorOpponentLandsProduceManaAbility.java b/Mage/src/main/java/mage/abilities/mana/AnyColorLandsProduceManaAbility.java similarity index 81% rename from Mage/src/main/java/mage/abilities/mana/AnyColorOpponentLandsProduceManaAbility.java rename to Mage/src/main/java/mage/abilities/mana/AnyColorLandsProduceManaAbility.java index 1deea82442..745ace74af 100644 --- a/Mage/src/main/java/mage/abilities/mana/AnyColorOpponentLandsProduceManaAbility.java +++ b/Mage/src/main/java/mage/abilities/mana/AnyColorLandsProduceManaAbility.java @@ -51,41 +51,42 @@ import mage.players.Player; * @author LevelX2 */ -public class AnyColorOpponentLandsProduceManaAbility extends ManaAbility { +public class AnyColorLandsProduceManaAbility extends ManaAbility { - public AnyColorOpponentLandsProduceManaAbility() { - super(Zone.BATTLEFIELD, new AnyColorOpponentLandsProduceManaEffect(),new TapSourceCost()); + public AnyColorLandsProduceManaAbility(TargetController targetController) { + super(Zone.BATTLEFIELD, new AnyColorLandsProduceManaEffect(targetController), new TapSourceCost()); } - public AnyColorOpponentLandsProduceManaAbility(final AnyColorOpponentLandsProduceManaAbility ability) { + public AnyColorLandsProduceManaAbility(final AnyColorLandsProduceManaAbility ability) { super(ability); } @Override - public AnyColorOpponentLandsProduceManaAbility copy() { - return new AnyColorOpponentLandsProduceManaAbility(this); + public AnyColorLandsProduceManaAbility copy() { + return new AnyColorLandsProduceManaAbility(this); } @Override public List getNetMana(Game game) { - return ((AnyColorOpponentLandsProduceManaEffect)getEffects().get(0)).getNetMana(game, this); + return ((AnyColorLandsProduceManaEffect)getEffects().get(0)).getNetMana(game, this); } } -class AnyColorOpponentLandsProduceManaEffect extends ManaEffect { +class AnyColorLandsProduceManaEffect extends ManaEffect { - private static final FilterPermanent filter = new FilterLandPermanent(); - static { - filter.add(new ControllerPredicate(TargetController.OPPONENT)); - } + private final FilterPermanent filter; - public AnyColorOpponentLandsProduceManaEffect() { + public AnyColorLandsProduceManaEffect(TargetController targetController) { super(); - staticText = "Add to your mana pool one mana of any color that a land an opponent controls could produce"; + filter = new FilterLandPermanent(); + filter.add(new ControllerPredicate(targetController)); + String text = targetController == TargetController.OPPONENT ? "an opponent controls" : "you control"; + staticText = "Add to your mana pool one mana of any color that a land " + text + " could produce"; } - public AnyColorOpponentLandsProduceManaEffect(final AnyColorOpponentLandsProduceManaEffect effect) { + public AnyColorLandsProduceManaEffect(final AnyColorLandsProduceManaEffect effect) { super(effect); + this.filter = effect.filter.copy(); } @Override @@ -140,7 +141,7 @@ class AnyColorOpponentLandsProduceManaEffect extends ManaEffect { case "White": mana.setWhite(1); break; - } + } checkToFirePossibleEvents(mana, game, source); player.getManaPool().addMana(mana, game, source); } @@ -194,7 +195,7 @@ class AnyColorOpponentLandsProduceManaEffect extends ManaEffect { } @Override - public AnyColorOpponentLandsProduceManaEffect copy() { - return new AnyColorOpponentLandsProduceManaEffect(this); + public AnyColorLandsProduceManaEffect copy() { + return new AnyColorLandsProduceManaEffect(this); } -} \ No newline at end of file +}