From 79c85efe1b0ff9334a4353913f65d3caee3dae92 Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Sat, 11 Sep 2021 12:48:21 -0400 Subject: [PATCH] [MID] Implemented Ambitious Farmhand / Seasoned Cathar --- .../src/mage/cards/a/AmbitiousFarmhand.java | 63 +++++++++++++++++++ .../src/mage/cards/s/SeasonedCathar.java | 40 ++++++++++++ .../src/mage/sets/InnistradMidnightHunt.java | 2 + 3 files changed, 105 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/a/AmbitiousFarmhand.java create mode 100644 Mage.Sets/src/mage/cards/s/SeasonedCathar.java diff --git a/Mage.Sets/src/mage/cards/a/AmbitiousFarmhand.java b/Mage.Sets/src/mage/cards/a/AmbitiousFarmhand.java new file mode 100644 index 0000000000..9070dbea35 --- /dev/null +++ b/Mage.Sets/src/mage/cards/a/AmbitiousFarmhand.java @@ -0,0 +1,63 @@ +package mage.cards.a; + +import mage.MageInt; +import mage.abilities.common.ActivateIfConditionActivatedAbility; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.condition.common.CovenCondition; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.TransformSourceEffect; +import mage.abilities.effects.common.search.SearchLibraryPutInHandEffect; +import mage.abilities.hint.common.CovenHint; +import mage.abilities.keyword.TransformAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.*; +import mage.filter.FilterCard; +import mage.target.common.TargetCardInLibrary; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class AmbitiousFarmhand extends CardImpl { + + private static final FilterCard filter = new FilterCard("basic Plains card"); + + static { + filter.add(SuperType.BASIC.getPredicate()); + filter.add(SubType.PLAINS.getPredicate()); + } + + public AmbitiousFarmhand(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{W}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.PEASANT); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + this.transformable = true; + this.secondSideCardClazz = mage.cards.s.SeasonedCathar.class; + + // When Ambitious Farmhand enters the battlefield, you may search your library for a basic Plains card, reveal it, put it into your hand, then shuffle. + this.addAbility(new EntersBattlefieldTriggeredAbility( + new SearchLibraryPutInHandEffect(new TargetCardInLibrary(filter)), true + )); + + // Coven—{1}{W}{W}: Transform Ambitious Farmhand. Activate only if you control three or more creatures with different powers. + this.addAbility(new TransformAbility()); + this.addAbility(new ActivateIfConditionActivatedAbility( + Zone.BATTLEFIELD, new TransformSourceEffect(true), + new ManaCostsImpl<>("{1}{W}{W}"), CovenCondition.instance + ).setAbilityWord(AbilityWord.COVEN).addHint(CovenHint.instance)); + } + + private AmbitiousFarmhand(final AmbitiousFarmhand card) { + super(card); + } + + @Override + public AmbitiousFarmhand copy() { + return new AmbitiousFarmhand(this); + } +} diff --git a/Mage.Sets/src/mage/cards/s/SeasonedCathar.java b/Mage.Sets/src/mage/cards/s/SeasonedCathar.java new file mode 100644 index 0000000000..85d9b7e587 --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/SeasonedCathar.java @@ -0,0 +1,40 @@ +package mage.cards.s; + +import mage.MageInt; +import mage.abilities.keyword.LifelinkAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class SeasonedCathar extends CardImpl { + + public SeasonedCathar(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, ""); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.KNIGHT); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + this.color.setWhite(true); + this.transformable = true; + this.nightCard = true; + + // Lifelink + this.addAbility(LifelinkAbility.getInstance()); + } + + private SeasonedCathar(final SeasonedCathar card) { + super(card); + } + + @Override + public SeasonedCathar copy() { + return new SeasonedCathar(this); + } +} diff --git a/Mage.Sets/src/mage/sets/InnistradMidnightHunt.java b/Mage.Sets/src/mage/sets/InnistradMidnightHunt.java index 62a8c59f90..558863fcbc 100644 --- a/Mage.Sets/src/mage/sets/InnistradMidnightHunt.java +++ b/Mage.Sets/src/mage/sets/InnistradMidnightHunt.java @@ -32,6 +32,7 @@ public final class InnistradMidnightHunt extends ExpansionSet { this.numBoosterDoubleFaced = 1; cards.add(new SetCardInfo("Abandon the Post", 127, Rarity.COMMON, mage.cards.a.AbandonThePost.class)); + cards.add(new SetCardInfo("Ambitious Farmhand", 2, Rarity.UNCOMMON, mage.cards.a.AmbitiousFarmhand.class)); cards.add(new SetCardInfo("Angelfire Ignition", 209, Rarity.RARE, mage.cards.a.AngelfireIgnition.class)); cards.add(new SetCardInfo("Arcane Infusion", 210, Rarity.UNCOMMON, mage.cards.a.ArcaneInfusion.class)); cards.add(new SetCardInfo("Archive Haunt", 68, Rarity.UNCOMMON, mage.cards.a.ArchiveHaunt.class)); @@ -199,6 +200,7 @@ public final class InnistradMidnightHunt extends ExpansionSet { cards.add(new SetCardInfo("Sacred Fire", 239, Rarity.UNCOMMON, mage.cards.s.SacredFire.class)); cards.add(new SetCardInfo("Saryth, the Viper's Fang", 197, Rarity.RARE, mage.cards.s.SarythTheVipersFang.class)); cards.add(new SetCardInfo("Seafaring Werewolf", 80, Rarity.RARE, mage.cards.s.SeafaringWerewolf.class)); + cards.add(new SetCardInfo("Seasoned Cathar", 2, Rarity.UNCOMMON, mage.cards.s.SeasonedCathar.class)); cards.add(new SetCardInfo("Secrets of the Key", 73, Rarity.COMMON, mage.cards.s.SecretsOfTheKey.class)); cards.add(new SetCardInfo("Shadowbeast Sighting", 198, Rarity.COMMON, mage.cards.s.ShadowbeastSighting.class)); cards.add(new SetCardInfo("Shady Traveler", 120, Rarity.COMMON, mage.cards.s.ShadyTraveler.class));