diff --git a/Mage.Sets/src/mage/cards/t/ThrivingHeath.java b/Mage.Sets/src/mage/cards/t/ThrivingHeath.java new file mode 100644 index 00000000000..1368e8cb79e --- /dev/null +++ b/Mage.Sets/src/mage/cards/t/ThrivingHeath.java @@ -0,0 +1,45 @@ +package mage.cards.t; + +import mage.abilities.common.AsEntersBattlefieldAbility; +import mage.abilities.common.EntersBattlefieldTappedAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.effects.common.ChooseColorEffect; +import mage.abilities.effects.mana.AddManaChosenColorEffect; +import mage.abilities.mana.SimpleManaAbility; +import mage.abilities.mana.WhiteManaAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Zone; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class ThrivingHeath extends CardImpl { + + public ThrivingHeath(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.LAND}, ""); + + // Thriving Heath enters the battlefield tapped. + this.addAbility(new EntersBattlefieldTappedAbility()); + + // As Thriving Heath enters the battlefield, choose a color other than white. + this.addAbility(new AsEntersBattlefieldAbility(new ChooseColorEffect(Outcome.Neutral, "White"))); + + // {T}: Add {W} or one mana of the chosen color. + this.addAbility(new WhiteManaAbility()); + this.addAbility(new SimpleManaAbility(Zone.BATTLEFIELD, new AddManaChosenColorEffect(), new TapSourceCost())); + } + + private ThrivingHeath(final ThrivingHeath card) { + super(card); + } + + @Override + public ThrivingHeath copy() { + return new ThrivingHeath(this); + } +} diff --git a/Mage.Sets/src/mage/sets/Jumpstart.java b/Mage.Sets/src/mage/sets/Jumpstart.java index 6471d886687..b2bac91cafc 100644 --- a/Mage.Sets/src/mage/sets/Jumpstart.java +++ b/Mage.Sets/src/mage/sets/Jumpstart.java @@ -71,6 +71,7 @@ public final class Jumpstart extends ExpansionSet { cards.add(new SetCardInfo("Swarm of Bloodflies", 282, Rarity.UNCOMMON, mage.cards.s.SwarmOfBloodflies.class)); cards.add(new SetCardInfo("Tempting Witch", 283, Rarity.UNCOMMON, mage.cards.t.TemptingWitch.class)); cards.add(new SetCardInfo("Terramorphic Expanse", 78, Rarity.COMMON, mage.cards.t.TerramorphicExpanse.class)); + cards.add(new SetCardInfo("Thriving Heath", 35, Rarity.COMMON, mage.cards.t.ThrivingHeath.class)); cards.add(new SetCardInfo("Wailing Ghoul", 286, Rarity.COMMON, mage.cards.w.WailingGhoul.class)); cards.add(new SetCardInfo("Young Pyromancer", 372, Rarity.UNCOMMON, mage.cards.y.YoungPyromancer.class)); } diff --git a/Mage/src/main/java/mage/abilities/effects/common/ChooseColorEffect.java b/Mage/src/main/java/mage/abilities/effects/common/ChooseColorEffect.java index 50a1c928bf7..72f5fc686c1 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/ChooseColorEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/ChooseColorEffect.java @@ -12,18 +12,25 @@ import mage.players.Player; import mage.util.CardUtil; /** - * * @author Plopman */ public class ChooseColorEffect extends OneShotEffect { + private final String exceptColor; + public ChooseColorEffect(Outcome outcome) { + this(outcome, null); + } + + public ChooseColorEffect(Outcome outcome, String exceptColor) { super(outcome); - staticText = "choose a color"; + this.exceptColor = exceptColor; + staticText = "choose a color" + (exceptColor != null ? " other than " + exceptColor.toLowerCase() : ""); } public ChooseColorEffect(final ChooseColorEffect effect) { super(effect); + this.exceptColor = effect.exceptColor; } @Override @@ -34,17 +41,18 @@ public class ChooseColorEffect extends OneShotEffect { mageObject = game.getObject(source.getSourceId()); } ChoiceColor choice = new ChoiceColor(); - if (controller != null && mageObject != null && controller.choose(outcome, choice, game)) { - if (!game.isSimulation()) { - game.informPlayers(mageObject.getLogName() + ": " + controller.getLogName() + " has chosen " + choice.getChoice()); - } - game.getState().setValue(mageObject.getId() + "_color", choice.getColor()); - if (mageObject instanceof Permanent) { - ((Permanent) mageObject).addInfo("chosen color", CardUtil.addToolTipMarkTags("Chosen color: " + choice.getChoice()), game); - } - return true; + if (exceptColor != null) { + choice.removeColorFromChoices(exceptColor); } - return false; + if (controller == null || mageObject == null || !controller.choose(outcome, choice, game)) { + return false; + } + game.informPlayers(mageObject.getLogName() + ": " + controller.getLogName() + " has chosen " + choice.getChoice()); + game.getState().setValue(mageObject.getId() + "_color", choice.getColor()); + if (mageObject instanceof Permanent) { + ((Permanent) mageObject).addInfo("chosen color", CardUtil.addToolTipMarkTags("Chosen color: " + choice.getChoice()), game); + } + return true; } @Override