From bcc72d4686a2b20c16242c631546708b861661b2 Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Tue, 17 Sep 2019 17:16:19 -0400 Subject: [PATCH] Implemented Castle Embereth --- .../src/mage/cards/c/CastleEmbereth.java | 61 +++++++++++++++++++ Mage.Sets/src/mage/sets/ThroneOfEldraine.java | 1 + 2 files changed, 62 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/c/CastleEmbereth.java diff --git a/Mage.Sets/src/mage/cards/c/CastleEmbereth.java b/Mage.Sets/src/mage/cards/c/CastleEmbereth.java new file mode 100644 index 0000000000..53ef68f844 --- /dev/null +++ b/Mage.Sets/src/mage/cards/c/CastleEmbereth.java @@ -0,0 +1,61 @@ +package mage.cards.c; + +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldAbility; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.condition.Condition; +import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.decorator.ConditionalOneShotEffect; +import mage.abilities.effects.common.TapSourceEffect; +import mage.abilities.effects.common.continuous.BoostControlledEffect; +import mage.abilities.mana.RedManaAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.ComparisonType; +import mage.constants.Duration; +import mage.constants.SubType; +import mage.filter.FilterPermanent; +import mage.filter.common.FilterControlledPermanent; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class CastleEmbereth extends CardImpl { + + private static final FilterPermanent filter = new FilterControlledPermanent(SubType.MOUNTAIN); + private static final Condition condition + = new PermanentsOnTheBattlefieldCondition(filter, ComparisonType.EQUAL_TO, 0); + + public CastleEmbereth(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.LAND}, ""); + + // Castle Embereth enters the battlefield tapped unless you control a Mountain. + this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect( + new TapSourceEffect(), condition + ), "tapped unless you control an Mountain")); + + // {T}: Add {R}. + this.addAbility(new RedManaAbility()); + + // {1}{R}{R}, {T}: Creatures you control get +1/+0 until end of turn. + Ability ability = new SimpleActivatedAbility( + new BoostControlledEffect(1, 0, Duration.EndOfTurn), new ManaCostsImpl("{1}{R}{R}") + ); + ability.addCost(new TapSourceCost()); + this.addAbility(ability); + } + + private CastleEmbereth(final CastleEmbereth card) { + super(card); + } + + @Override + public CastleEmbereth copy() { + return new CastleEmbereth(this); + } +} diff --git a/Mage.Sets/src/mage/sets/ThroneOfEldraine.java b/Mage.Sets/src/mage/sets/ThroneOfEldraine.java index 60b39a9418..27262353e6 100644 --- a/Mage.Sets/src/mage/sets/ThroneOfEldraine.java +++ b/Mage.Sets/src/mage/sets/ThroneOfEldraine.java @@ -49,6 +49,7 @@ public final class ThroneOfEldraine extends ExpansionSet { cards.add(new SetCardInfo("Bramblefort Fink", 311, Rarity.UNCOMMON, mage.cards.b.BramblefortFink.class)); cards.add(new SetCardInfo("Brimstone Trebuchet", 116, Rarity.COMMON, mage.cards.b.BrimstoneTrebuchet.class)); cards.add(new SetCardInfo("Burning-Yard Trainer", 117, Rarity.UNCOMMON, mage.cards.b.BurningYardTrainer.class)); + cards.add(new SetCardInfo("Castle Embereth", 239, Rarity.RARE, mage.cards.c.CastleEmbereth.class)); cards.add(new SetCardInfo("Castle Vantress", 242, Rarity.RARE, mage.cards.c.CastleVantress.class)); cards.add(new SetCardInfo("Cauldron Familiar", 81, Rarity.UNCOMMON, mage.cards.c.CauldronFamiliar.class)); cards.add(new SetCardInfo("Charming Prince", 8, Rarity.RARE, mage.cards.c.CharmingPrince.class));