From 98c343f22597ba388864ceed4f9edfc68abd6af3 Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Tue, 19 Jun 2018 16:19:58 -0400 Subject: [PATCH] Implemented Epicure of Blood --- .../src/mage/cards/a/ArchangelOfThune.java | 53 ++++--------------- .../src/mage/cards/e/EpicureOfBlood.java | 37 +++++++++++++ Mage.Sets/src/mage/sets/CoreSet2019.java | 1 + 3 files changed, 49 insertions(+), 42 deletions(-) create mode 100644 Mage.Sets/src/mage/cards/e/EpicureOfBlood.java diff --git a/Mage.Sets/src/mage/cards/a/ArchangelOfThune.java b/Mage.Sets/src/mage/cards/a/ArchangelOfThune.java index 7387ec98c3..c3f1bd3d29 100644 --- a/Mage.Sets/src/mage/cards/a/ArchangelOfThune.java +++ b/Mage.Sets/src/mage/cards/a/ArchangelOfThune.java @@ -1,9 +1,8 @@ - package mage.cards.a; import java.util.UUID; import mage.MageInt; -import mage.abilities.TriggeredAbilityImpl; +import mage.abilities.common.GainLifeControllerTriggeredAbility; import mage.abilities.effects.common.counter.AddCountersAllEffect; import mage.abilities.keyword.FlyingAbility; import mage.abilities.keyword.LifelinkAbility; @@ -11,12 +10,8 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; -import mage.constants.Zone; import mage.counters.CounterType; -import mage.filter.common.FilterControlledCreaturePermanent; -import mage.game.Game; -import mage.game.events.GameEvent; -import mage.game.events.GameEvent.EventType; +import mage.filter.StaticFilters; /** * @@ -25,7 +20,7 @@ import mage.game.events.GameEvent.EventType; public final class ArchangelOfThune extends CardImpl { public ArchangelOfThune(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}{W}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{W}{W}"); this.subtype.add(SubType.ANGEL); this.power = new MageInt(3); @@ -33,11 +28,17 @@ public final class ArchangelOfThune extends CardImpl { // Flying this.addAbility(FlyingAbility.getInstance()); + // Lifelink this.addAbility(LifelinkAbility.getInstance()); + // Whenever you gain life, put a +1/+1 counter on each creature you control. - this.addAbility(new ArchangelOfThuneAbility()); - + this.addAbility(new GainLifeControllerTriggeredAbility( + new AddCountersAllEffect( + CounterType.P1P1.createInstance(), + StaticFilters.FILTER_CONTROLLED_CREATURES + ), false + )); } public ArchangelOfThune(final ArchangelOfThune card) { @@ -49,35 +50,3 @@ public final class ArchangelOfThune extends CardImpl { return new ArchangelOfThune(this); } } - -class ArchangelOfThuneAbility extends TriggeredAbilityImpl { - - public ArchangelOfThuneAbility() { - super(Zone.BATTLEFIELD, new AddCountersAllEffect(CounterType.P1P1.createInstance(), new FilterControlledCreaturePermanent()), false); - } - - public ArchangelOfThuneAbility(final ArchangelOfThuneAbility ability) { - super(ability); - } - - @Override - public ArchangelOfThuneAbility copy() { - return new ArchangelOfThuneAbility(this); - } - - @Override - public boolean checkEventType(GameEvent event, Game game) { - return event.getType() == EventType.GAINED_LIFE; - } - - @Override - public boolean checkTrigger(GameEvent event, Game game) { - return event.getPlayerId().equals(controllerId); - } - - @Override - public String getRule() { - return "Whenever you gain life, put a +1/+1 counter on each creature you control."; - } - -} diff --git a/Mage.Sets/src/mage/cards/e/EpicureOfBlood.java b/Mage.Sets/src/mage/cards/e/EpicureOfBlood.java new file mode 100644 index 0000000000..e0e519fa93 --- /dev/null +++ b/Mage.Sets/src/mage/cards/e/EpicureOfBlood.java @@ -0,0 +1,37 @@ +package mage.cards.e; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.GainLifeControllerTriggeredAbility; +import mage.abilities.effects.common.LoseLifeOpponentsEffect; +import mage.constants.SubType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; + +/** + * + * @author TheElk801 + */ +public final class EpicureOfBlood extends CardImpl { + + public EpicureOfBlood(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{B}"); + + this.subtype.add(SubType.VAMPIRE); + this.power = new MageInt(4); + this.toughness = new MageInt(4); + + // Whenever you gain life, each opponent loses 1 life. + this.addAbility(new GainLifeControllerTriggeredAbility(new LoseLifeOpponentsEffect(1), false)); + } + + public EpicureOfBlood(final EpicureOfBlood card) { + super(card); + } + + @Override + public EpicureOfBlood copy() { + return new EpicureOfBlood(this); + } +} diff --git a/Mage.Sets/src/mage/sets/CoreSet2019.java b/Mage.Sets/src/mage/sets/CoreSet2019.java index 2e8bb8f3a2..acb02e35ca 100644 --- a/Mage.Sets/src/mage/sets/CoreSet2019.java +++ b/Mage.Sets/src/mage/sets/CoreSet2019.java @@ -73,6 +73,7 @@ public final class CoreSet2019 extends ExpansionSet { cards.add(new SetCardInfo("Electrify", 139, Rarity.COMMON, mage.cards.e.Electrify.class)); cards.add(new SetCardInfo("Elvish Clancaller", 179, Rarity.RARE, mage.cards.e.ElvishClancaller.class)); cards.add(new SetCardInfo("Elvish Rejuvenator", 180, Rarity.COMMON, mage.cards.e.ElvishRejuvenator.class)); + cards.add(new SetCardInfo("Epicure of Blood", 95, Rarity.COMMON, mage.cards.e.EpicureOfBlood.class)); cards.add(new SetCardInfo("Exclusion Mage", 55, Rarity.UNCOMMON, mage.cards.e.ExclusionMage.class)); cards.add(new SetCardInfo("Field Creeper", 234, Rarity.COMMON, mage.cards.f.FieldCreeper.class)); cards.add(new SetCardInfo("Fiery Finish", 140, Rarity.UNCOMMON, mage.cards.f.FieryFinish.class));