From 96af5f803dbb91c519554e54efe33a2d0ebbc975 Mon Sep 17 00:00:00 2001 From: theelk801 Date: Sat, 27 Jan 2024 10:51:57 -0500 Subject: [PATCH] [MKM] Implement Neighborhood Guardian --- .../mage/cards/n/NeighborhoodGuardian.java | 51 +++++++++++++++++++ .../src/mage/sets/MurdersAtKarlovManor.java | 1 + 2 files changed, 52 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/n/NeighborhoodGuardian.java diff --git a/Mage.Sets/src/mage/cards/n/NeighborhoodGuardian.java b/Mage.Sets/src/mage/cards/n/NeighborhoodGuardian.java new file mode 100644 index 00000000000..16a31e13c5a --- /dev/null +++ b/Mage.Sets/src/mage/cards/n/NeighborhoodGuardian.java @@ -0,0 +1,51 @@ +package mage.cards.n; + +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldControlledTriggeredAbility; +import mage.abilities.effects.common.continuous.BoostTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.ComparisonType; +import mage.constants.SubType; +import mage.filter.FilterPermanent; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.PowerPredicate; +import mage.target.common.TargetControlledCreaturePermanent; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class NeighborhoodGuardian extends CardImpl { + + private static final FilterPermanent filter = new FilterCreaturePermanent("another creature with power 2 or less"); + + static { + filter.add(new PowerPredicate(ComparisonType.FEWER_THAN, 3)); + } + + public NeighborhoodGuardian(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{W}"); + + this.subtype.add(SubType.UNICORN); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Whenever another creature with power 2 or less enters the battlefield under your control, target creature you control gets +1/+1 until end of turn. + Ability ability = new EntersBattlefieldControlledTriggeredAbility(new BoostTargetEffect(1, 1), filter); + ability.addTarget(new TargetControlledCreaturePermanent()); + this.addAbility(ability); + } + + private NeighborhoodGuardian(final NeighborhoodGuardian card) { + super(card); + } + + @Override + public NeighborhoodGuardian copy() { + return new NeighborhoodGuardian(this); + } +} diff --git a/Mage.Sets/src/mage/sets/MurdersAtKarlovManor.java b/Mage.Sets/src/mage/sets/MurdersAtKarlovManor.java index c87a6d44097..175ba3c7492 100644 --- a/Mage.Sets/src/mage/sets/MurdersAtKarlovManor.java +++ b/Mage.Sets/src/mage/sets/MurdersAtKarlovManor.java @@ -130,6 +130,7 @@ public final class MurdersAtKarlovManor extends ExpansionSet { cards.add(new SetCardInfo("Mountain", 275, Rarity.LAND, mage.cards.basiclands.Mountain.class, FULL_ART_BFZ_VARIOUS)); cards.add(new SetCardInfo("Murder", 95, Rarity.COMMON, mage.cards.m.Murder.class)); cards.add(new SetCardInfo("Museum Nightwatch", 25, Rarity.COMMON, mage.cards.m.MuseumNightwatch.class)); + cards.add(new SetCardInfo("Neighborhood Guardian", 26, Rarity.UNCOMMON, mage.cards.n.NeighborhoodGuardian.class)); cards.add(new SetCardInfo("Nervous Gardener", 169, Rarity.COMMON, mage.cards.n.NervousGardener.class)); cards.add(new SetCardInfo("Nightdrinker Moroii", 96, Rarity.UNCOMMON, mage.cards.n.NightdrinkerMoroii.class)); cards.add(new SetCardInfo("No More Lies", 221, Rarity.UNCOMMON, mage.cards.n.NoMoreLies.class));