From 92bddc1565ff498651084eb0273c5f6871b8678c Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Fri, 22 Jan 2021 13:17:48 -0500 Subject: [PATCH] [KHC] Implemented Ruthless Winnower --- .../src/mage/cards/r/RuthlessWinnower.java | 49 +++++++++++++++++++ .../src/mage/sets/KaldheimCommander.java | 1 + 2 files changed, 50 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/r/RuthlessWinnower.java diff --git a/Mage.Sets/src/mage/cards/r/RuthlessWinnower.java b/Mage.Sets/src/mage/cards/r/RuthlessWinnower.java new file mode 100644 index 0000000000..d8a4c8f2bb --- /dev/null +++ b/Mage.Sets/src/mage/cards/r/RuthlessWinnower.java @@ -0,0 +1,49 @@ +package mage.cards.r; + +import mage.MageInt; +import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; +import mage.abilities.effects.common.SacrificeEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.TargetController; +import mage.filter.FilterPermanent; +import mage.filter.predicate.Predicates; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class RuthlessWinnower extends CardImpl { + + private static final FilterPermanent filter = new FilterPermanent("a non-Elf creature"); + + static { + filter.add(Predicates.not(SubType.ELF.getPredicate())); + } + + public RuthlessWinnower(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{B}{B}"); + + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.ROGUE); + this.power = new MageInt(4); + this.toughness = new MageInt(4); + + // At the beginning of each player's upkeep, that player sacrifices a non-Elf creature. + this.addAbility(new BeginningOfUpkeepTriggeredAbility( + new SacrificeEffect(filter, 1, "that player"), TargetController.ANY, false + )); + } + + private RuthlessWinnower(final RuthlessWinnower card) { + super(card); + } + + @Override + public RuthlessWinnower copy() { + return new RuthlessWinnower(this); + } +} diff --git a/Mage.Sets/src/mage/sets/KaldheimCommander.java b/Mage.Sets/src/mage/sets/KaldheimCommander.java index 39ccf2795d..34b93b7c39 100644 --- a/Mage.Sets/src/mage/sets/KaldheimCommander.java +++ b/Mage.Sets/src/mage/sets/KaldheimCommander.java @@ -36,6 +36,7 @@ public final class KaldheimCommander extends ExpansionSet { cards.add(new SetCardInfo("Elderfang Venom", 15, Rarity.RARE, mage.cards.e.ElderfangVenom.class)); cards.add(new SetCardInfo("Inspired Sphinx", 40, Rarity.MYTHIC, mage.cards.i.InspiredSphinx.class)); cards.add(new SetCardInfo("Lathril, Blade of the Elves", 1, Rarity.MYTHIC, mage.cards.l.LathrilBladeOfTheElves.class)); + cards.add(new SetCardInfo("Ruthless Winnower", 10, Rarity.RARE, mage.cards.r.RuthlessWinnower.class)); cards.add(new SetCardInfo("Spectral Deluge", 7, Rarity.RARE, mage.cards.s.SpectralDeluge.class)); cards.removeIf(setCardInfo -> unfinished.contains(setCardInfo.getName())); // remove when mechanic is fully implemented