From 35ac0e2cadf2df1dbfe7215a89f736af73b3af30 Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Tue, 18 Sep 2018 19:33:41 -0400 Subject: [PATCH] Implemented Electrostatic Field --- .../src/mage/cards/e/ElectrostaticField.java | 46 +++++++++++++++++++ Mage.Sets/src/mage/sets/GuildsOfRavnica.java | 1 + 2 files changed, 47 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/e/ElectrostaticField.java diff --git a/Mage.Sets/src/mage/cards/e/ElectrostaticField.java b/Mage.Sets/src/mage/cards/e/ElectrostaticField.java new file mode 100644 index 0000000000..39347660ea --- /dev/null +++ b/Mage.Sets/src/mage/cards/e/ElectrostaticField.java @@ -0,0 +1,46 @@ +package mage.cards.e; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SpellCastControllerTriggeredAbility; +import mage.abilities.effects.common.DamagePlayersEffect; +import mage.constants.SubType; +import mage.abilities.keyword.DefenderAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.TargetController; +import mage.filter.StaticFilters; + +/** + * + * @author TheElk801 + */ +public final class ElectrostaticField extends CardImpl { + + public ElectrostaticField(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{R}"); + + this.subtype.add(SubType.WALL); + this.power = new MageInt(0); + this.toughness = new MageInt(4); + + // Defender + this.addAbility(DefenderAbility.getInstance()); + + // When you cast an instant or sorcery spell, Electrostatic Field deals 1 damage to each opponent. + this.addAbility(new SpellCastControllerTriggeredAbility( + new DamagePlayersEffect(1, TargetController.OPPONENT), + StaticFilters.FILTER_SPELL_AN_INSTANT_OR_SORCERY, false + )); + } + + public ElectrostaticField(final ElectrostaticField card) { + super(card); + } + + @Override + public ElectrostaticField copy() { + return new ElectrostaticField(this); + } +} diff --git a/Mage.Sets/src/mage/sets/GuildsOfRavnica.java b/Mage.Sets/src/mage/sets/GuildsOfRavnica.java index dec4c9668d..a3777dc0de 100644 --- a/Mage.Sets/src/mage/sets/GuildsOfRavnica.java +++ b/Mage.Sets/src/mage/sets/GuildsOfRavnica.java @@ -73,6 +73,7 @@ public final class GuildsOfRavnica extends ExpansionSet { cards.add(new SetCardInfo("Doom Whisperer", 69, Rarity.MYTHIC, mage.cards.d.DoomWhisperer.class)); cards.add(new SetCardInfo("Dream Eater", 38, Rarity.MYTHIC, mage.cards.d.DreamEater.class)); cards.add(new SetCardInfo("Drowned Secrets", 39, Rarity.RARE, mage.cards.d.DrownedSecrets.class)); + cards.add(new SetCardInfo("Electrostatic Field", 97, Rarity.COMMON, mage.cards.e.ElectrostaticField.class)); cards.add(new SetCardInfo("Emmara, Soul of the Accord", 168, Rarity.RARE, mage.cards.e.EmmaraSoulOfTheAccord.class)); cards.add(new SetCardInfo("Enhanced Surveillance", 40, Rarity.UNCOMMON, mage.cards.e.EnhancedSurveillance.class)); cards.add(new SetCardInfo("Erratic Cyclops", 98, Rarity.RARE, mage.cards.e.ErraticCyclops.class));