From 2256cf7230c8f217bf57a3180518a83124e69cc5 Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Wed, 11 Sep 2019 20:11:37 -0400 Subject: [PATCH] Implemented Insatiable Appetite --- .../src/mage/cards/i/InsatiableAppetite.java | 45 +++++++++++++++++++ Mage.Sets/src/mage/sets/ThroneOfEldraine.java | 1 + 2 files changed, 46 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/i/InsatiableAppetite.java diff --git a/Mage.Sets/src/mage/cards/i/InsatiableAppetite.java b/Mage.Sets/src/mage/cards/i/InsatiableAppetite.java new file mode 100644 index 0000000000..60bc2bfaad --- /dev/null +++ b/Mage.Sets/src/mage/cards/i/InsatiableAppetite.java @@ -0,0 +1,45 @@ +package mage.cards.i; + +import mage.abilities.costs.common.SacrificeTargetCost; +import mage.abilities.effects.common.DoIfCostPaid; +import mage.abilities.effects.common.continuous.BoostTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.SubType; +import mage.filter.common.FilterControlledPermanent; +import mage.target.common.TargetControlledPermanent; +import mage.target.common.TargetCreaturePermanent; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class InsatiableAppetite extends CardImpl { + + private static final FilterControlledPermanent filter = new FilterControlledPermanent(SubType.FOOD, "a Food"); + + public InsatiableAppetite(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{G}"); + + // You may sacrifice a Food. If you do, target creature gets +5/+5 until end of turn. Otherwise, that creature gets +3/+3 until end of turn. + this.getSpellAbility().addEffect(new DoIfCostPaid( + new BoostTargetEffect(5, 5, Duration.EndOfTurn), + new BoostTargetEffect(3, 3, Duration.EndOfTurn), + new SacrificeTargetCost(new TargetControlledPermanent(filter)) + ).setText("You may sacrifice a Food. If you do, target creature gets +5/+5 until end of turn. " + + "Otherwise, that creature gets +3/+3 until end of turn.")); + this.getSpellAbility().addTarget(new TargetCreaturePermanent()); + } + + private InsatiableAppetite(final InsatiableAppetite card) { + super(card); + } + + @Override + public InsatiableAppetite copy() { + return new InsatiableAppetite(this); + } +} diff --git a/Mage.Sets/src/mage/sets/ThroneOfEldraine.java b/Mage.Sets/src/mage/sets/ThroneOfEldraine.java index 2a371d44ca..5d7cf56b50 100644 --- a/Mage.Sets/src/mage/sets/ThroneOfEldraine.java +++ b/Mage.Sets/src/mage/sets/ThroneOfEldraine.java @@ -79,6 +79,7 @@ public final class ThroneOfEldraine extends ExpansionSet { cards.add(new SetCardInfo("Heraldic Banner", 222, Rarity.UNCOMMON, mage.cards.h.HeraldicBanner.class)); cards.add(new SetCardInfo("Hypnotic Sprite", 49, Rarity.UNCOMMON, mage.cards.h.HypnoticSprite.class)); cards.add(new SetCardInfo("Inquisitive Puppet", 223, Rarity.UNCOMMON, mage.cards.i.InquisitivePuppet.class)); + cards.add(new SetCardInfo("Insatiable Appetite", 162, Rarity.COMMON, mage.cards.i.InsatiableAppetite.class)); cards.add(new SetCardInfo("Inspiring Veteran", 194, Rarity.UNCOMMON, mage.cards.i.InspiringVeteran.class)); cards.add(new SetCardInfo("Joust", 129, Rarity.UNCOMMON, mage.cards.j.Joust.class)); cards.add(new SetCardInfo("Jousting Dummy", 224, Rarity.COMMON, mage.cards.j.JoustingDummy.class));