From 6dbc6e193cac3d69b8c58cd29eee8a796fc39130 Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Fri, 11 Jan 2019 23:35:33 -0500 Subject: [PATCH] Implemented Undercity Scavenger --- .../src/mage/cards/u/UndercityScavenger.java | 55 +++++++++++++++++++ .../src/mage/sets/RavnicaAllegiance.java | 1 + 2 files changed, 56 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/u/UndercityScavenger.java diff --git a/Mage.Sets/src/mage/cards/u/UndercityScavenger.java b/Mage.Sets/src/mage/cards/u/UndercityScavenger.java new file mode 100644 index 0000000000..e04ca55d23 --- /dev/null +++ b/Mage.Sets/src/mage/cards/u/UndercityScavenger.java @@ -0,0 +1,55 @@ +package mage.cards.u; + +import mage.MageInt; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.costs.common.SacrificeTargetCost; +import mage.abilities.effects.common.DoIfCostPaid; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.abilities.effects.keyword.ScryEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.counters.CounterType; +import mage.filter.common.FilterControlledCreaturePermanent; +import mage.filter.common.FilterControlledPermanent; +import mage.filter.predicate.permanent.AnotherPredicate; +import mage.target.common.TargetControlledPermanent; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class UndercityScavenger extends CardImpl { + + private static final FilterControlledPermanent filter = new FilterControlledCreaturePermanent("another creature"); + + static { + filter.add(new AnotherPredicate()); + } + + public UndercityScavenger(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{B}"); + + this.subtype.add(SubType.OGRE); + this.subtype.add(SubType.WARRIOR); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // When Undercity Scavenger enters the battlefield, you may sacrifice another creature. If you do, put two +1/+1 counters on Undercity Scavenger, then scry 2. + this.addAbility(new EntersBattlefieldTriggeredAbility(new DoIfCostPaid( + new AddCountersSourceEffect(CounterType.P1P1.createInstance()), + new SacrificeTargetCost(new TargetControlledPermanent(filter)) + ).addEffect(new ScryEffect(2).concatBy(", then")))); + } + + private UndercityScavenger(final UndercityScavenger card) { + super(card); + } + + @Override + public UndercityScavenger copy() { + return new UndercityScavenger(this); + } +} diff --git a/Mage.Sets/src/mage/sets/RavnicaAllegiance.java b/Mage.Sets/src/mage/sets/RavnicaAllegiance.java index 7ef12c0398..b834ce66ba 100644 --- a/Mage.Sets/src/mage/sets/RavnicaAllegiance.java +++ b/Mage.Sets/src/mage/sets/RavnicaAllegiance.java @@ -284,6 +284,7 @@ public final class RavnicaAllegiance extends ExpansionSet { cards.add(new SetCardInfo("Trollbred Guardian", 148, Rarity.UNCOMMON, mage.cards.t.TrollbredGuardian.class)); cards.add(new SetCardInfo("Twilight Panther", 28, Rarity.COMMON, mage.cards.t.TwilightPanther.class)); cards.add(new SetCardInfo("Unbreakable Formation", 29, Rarity.RARE, mage.cards.u.UnbreakableFormation.class)); + cards.add(new SetCardInfo("Undercity Scavenger", 88, Rarity.COMMON, mage.cards.u.UndercityScavenger.class)); cards.add(new SetCardInfo("Verity Circle", 58, Rarity.RARE, mage.cards.v.VerityCircle.class)); cards.add(new SetCardInfo("Vindictive Vampire", 90, Rarity.UNCOMMON, mage.cards.v.VindictiveVampire.class)); cards.add(new SetCardInfo("Vizkopa Vampire", 220, Rarity.COMMON, mage.cards.v.VizkopaVampire.class));