From dc3b2f424a8831b365c8f91052102e1f9cf1ac05 Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Fri, 5 Apr 2019 20:06:16 -0400 Subject: [PATCH] Implemented Cyclops Electromancer --- .../mage/cards/c/CyclopsElectromancer.java | 51 +++++++++++++++++++ Mage.Sets/src/mage/sets/WarOfTheSpark.java | 1 + 2 files changed, 52 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/c/CyclopsElectromancer.java diff --git a/Mage.Sets/src/mage/cards/c/CyclopsElectromancer.java b/Mage.Sets/src/mage/cards/c/CyclopsElectromancer.java new file mode 100644 index 0000000000..3031fc6245 --- /dev/null +++ b/Mage.Sets/src/mage/cards/c/CyclopsElectromancer.java @@ -0,0 +1,51 @@ +package mage.cards.c; + +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.dynamicvalue.DynamicValue; +import mage.abilities.dynamicvalue.common.CardsInControllerGraveyardCount; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.filter.StaticFilters; +import mage.target.common.TargetOpponentsCreaturePermanent; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class CyclopsElectromancer extends CardImpl { + + private static final DynamicValue xValue + = new CardsInControllerGraveyardCount(StaticFilters.FILTER_CARD_INSTANT_OR_SORCERY); + + public CyclopsElectromancer(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{R}"); + + this.subtype.add(SubType.CYCLOPS); + this.subtype.add(SubType.WIZARD); + this.power = new MageInt(4); + this.toughness = new MageInt(2); + + // When Cyclops Electromancer enters the battlefield, it deals X damage to target creature an opponent controls, where X is the number of instant and sorcery cards in your graveyard. + Ability ability = new EntersBattlefieldTriggeredAbility( + new DamageTargetEffect(xValue).setText("it deals X damage to target creature an opponent controls, " + + "where X is the number of instant and sorcery cards in your graveyard.") + ); + ability.addTarget(new TargetOpponentsCreaturePermanent()); + this.addAbility(ability); + } + + private CyclopsElectromancer(final CyclopsElectromancer card) { + super(card); + } + + @Override + public CyclopsElectromancer copy() { + return new CyclopsElectromancer(this); + } +} diff --git a/Mage.Sets/src/mage/sets/WarOfTheSpark.java b/Mage.Sets/src/mage/sets/WarOfTheSpark.java index 4039c1e9ff..237de48e26 100644 --- a/Mage.Sets/src/mage/sets/WarOfTheSpark.java +++ b/Mage.Sets/src/mage/sets/WarOfTheSpark.java @@ -40,6 +40,7 @@ public final class WarOfTheSpark extends ExpansionSet { cards.add(new SetCardInfo("Courage in Crisis", 158, Rarity.COMMON, mage.cards.c.CourageInCrisis.class)); cards.add(new SetCardInfo("Cruel Celebrant", 188, Rarity.UNCOMMON, mage.cards.c.CruelCelebrant.class)); cards.add(new SetCardInfo("Crush Dissent", 47, Rarity.COMMON, mage.cards.c.CrushDissent.class)); + cards.add(new SetCardInfo("Cyclops Electromancer", 122, Rarity.UNCOMMON, mage.cards.c.CyclopsElectromancer.class)); cards.add(new SetCardInfo("Davriel's Shadowfugue", 84, Rarity.COMMON, mage.cards.d.DavrielsShadowfugue.class)); cards.add(new SetCardInfo("Davriel, Rogue Shadowmage", 83, Rarity.UNCOMMON, mage.cards.d.DavrielRogueShadowmage.class)); cards.add(new SetCardInfo("Deathsprout", 189, Rarity.UNCOMMON, mage.cards.d.Deathsprout.class));