From 109291a0249ca8198da4ae9ba29b9bfaaf8eed4c Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Fri, 20 Sep 2019 20:16:39 -0400 Subject: [PATCH] Implemented Barrow Witches --- Mage.Sets/src/mage/cards/b/BarrowWitches.java | 50 +++++++++++++++++++ Mage.Sets/src/mage/sets/ThroneOfEldraine.java | 1 + 2 files changed, 51 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/b/BarrowWitches.java diff --git a/Mage.Sets/src/mage/cards/b/BarrowWitches.java b/Mage.Sets/src/mage/cards/b/BarrowWitches.java new file mode 100644 index 0000000000..f442b28e5c --- /dev/null +++ b/Mage.Sets/src/mage/cards/b/BarrowWitches.java @@ -0,0 +1,50 @@ +package mage.cards.b; + +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.common.ReturnFromGraveyardToHandTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.filter.FilterCard; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.target.common.TargetCardInYourGraveyard; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class BarrowWitches extends CardImpl { + + private static final FilterCard filter = new FilterCard("Knight card from your graveyard"); + + static { + filter.add(new SubtypePredicate(SubType.KNIGHT)); + } + + public BarrowWitches(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{B}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WARLOCK); + this.power = new MageInt(3); + this.toughness = new MageInt(4); + + // When Barrow Witches enters the battlefield, return target Knight card from your graveyard to your hand. + Ability ability = new EntersBattlefieldTriggeredAbility(new ReturnFromGraveyardToHandTargetEffect()); + ability.addTarget(new TargetCardInYourGraveyard(filter)); + this.addAbility(ability); + } + + private BarrowWitches(final BarrowWitches card) { + super(card); + } + + @Override + public BarrowWitches copy() { + return new BarrowWitches(this); + } +} diff --git a/Mage.Sets/src/mage/sets/ThroneOfEldraine.java b/Mage.Sets/src/mage/sets/ThroneOfEldraine.java index 439527f9a9..873d8395b0 100644 --- a/Mage.Sets/src/mage/sets/ThroneOfEldraine.java +++ b/Mage.Sets/src/mage/sets/ThroneOfEldraine.java @@ -40,6 +40,7 @@ public final class ThroneOfEldraine extends ExpansionSet { cards.add(new SetCardInfo("Bake into a Pie", 76, Rarity.COMMON, mage.cards.b.BakeIntoAPie.class)); cards.add(new SetCardInfo("Banish into Fable", 325, Rarity.RARE, mage.cards.b.BanishIntoFable.class)); cards.add(new SetCardInfo("Barge In", 112, Rarity.COMMON, mage.cards.b.BargeIn.class)); + cards.add(new SetCardInfo("Barrow Witches", 77, Rarity.COMMON, mage.cards.b.BarrowWitches.class)); cards.add(new SetCardInfo("Beanstalk Giant", 149, Rarity.UNCOMMON, mage.cards.b.BeanstalkGiant.class)); cards.add(new SetCardInfo("Belle of the Brawl", 78, Rarity.UNCOMMON, mage.cards.b.BelleOfTheBrawl.class)); cards.add(new SetCardInfo("Beloved Princess", 7, Rarity.COMMON, mage.cards.b.BelovedPrincess.class));