From 226628bb1bb87aa1eccb6e07edb90d042eb0caee Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Tue, 18 Dec 2018 19:56:04 -0500 Subject: [PATCH] Implemented Rafter Demon --- Mage.Sets/src/mage/cards/r/RafterDemon.java | 53 +++++++++++++++++++ .../src/mage/sets/RavnicaAllegiance.java | 1 + 2 files changed, 54 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/r/RafterDemon.java diff --git a/Mage.Sets/src/mage/cards/r/RafterDemon.java b/Mage.Sets/src/mage/cards/r/RafterDemon.java new file mode 100644 index 0000000000..10e7f1afef --- /dev/null +++ b/Mage.Sets/src/mage/cards/r/RafterDemon.java @@ -0,0 +1,53 @@ +package mage.cards.r; + +import mage.MageInt; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.condition.common.SpectacleCondition; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; +import mage.abilities.dynamicvalue.common.StaticValue; +import mage.abilities.effects.common.discard.DiscardEachPlayerEffect; +import mage.abilities.keyword.SpectacleAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.TargetController; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class RafterDemon extends CardImpl { + + public RafterDemon(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{B}{R}"); + + this.subtype.add(SubType.DEMON); + this.power = new MageInt(4); + this.toughness = new MageInt(2); + + // Spectacle {3}{B}{R} + this.addAbility(new SpectacleAbility(this, new ManaCostsImpl("{3}{B}{R}"))); + + // When Rafter Demon enters the battlefield, if its spectacle cost was paid, each opponent discards a card. + this.addAbility(new ConditionalInterveningIfTriggeredAbility( + new EntersBattlefieldTriggeredAbility(new DiscardEachPlayerEffect( + new StaticValue(1), false, TargetController.OPPONENT + )), SpectacleCondition.instance, + "When {this} enters the battlefield, " + + "if its spectacle cost was paid, " + + "each opponent discards a card." + )); + } + + public RafterDemon(final RafterDemon card) { + super(card); + } + + @Override + public RafterDemon copy() { + return new RafterDemon(this); + } +} diff --git a/Mage.Sets/src/mage/sets/RavnicaAllegiance.java b/Mage.Sets/src/mage/sets/RavnicaAllegiance.java index 70a4afac9f..299c61e350 100644 --- a/Mage.Sets/src/mage/sets/RavnicaAllegiance.java +++ b/Mage.Sets/src/mage/sets/RavnicaAllegiance.java @@ -35,6 +35,7 @@ public final class RavnicaAllegiance extends ExpansionSet { cards.add(new SetCardInfo("Growth Spiral", 178, Rarity.COMMON, mage.cards.g.GrowthSpiral.class)); cards.add(new SetCardInfo("Imperious Oligarch", 184, Rarity.COMMON, mage.cards.i.ImperiousOligarch.class)); cards.add(new SetCardInfo("Mortify", 192, Rarity.UNCOMMON, mage.cards.m.Mortify.class)); + cards.add(new SetCardInfo("Rafter Demon", 196, Rarity.COMMON, mage.cards.r.RafterDemon.class)); cards.add(new SetCardInfo("Rix Maadi Reveler", 109, Rarity.RARE, mage.cards.r.RixMaadiReveler.class)); cards.add(new SetCardInfo("The Haunt of Hightower", 273, Rarity.MYTHIC, mage.cards.t.TheHauntOfHightower.class)); }