From 4dbcff03bd86b5ff242d60124f20842d638903ac Mon Sep 17 00:00:00 2001 From: theelk801 Date: Fri, 2 Jun 2023 18:01:17 -0400 Subject: [PATCH] [LTR] Implement Stern Scolding --- Mage.Sets/src/mage/cards/s/SternScolding.java | 48 +++++++++++++++++++ .../TheLordOfTheRingsTalesOfMiddleEarth.java | 1 + 2 files changed, 49 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/s/SternScolding.java diff --git a/Mage.Sets/src/mage/cards/s/SternScolding.java b/Mage.Sets/src/mage/cards/s/SternScolding.java new file mode 100644 index 0000000000..c84bbefe76 --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/SternScolding.java @@ -0,0 +1,48 @@ +package mage.cards.s; + +import mage.abilities.effects.common.CounterTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.ComparisonType; +import mage.filter.FilterSpell; +import mage.filter.common.FilterCreatureSpell; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.PowerPredicate; +import mage.filter.predicate.mageobject.ToughnessPredicate; +import mage.target.TargetSpell; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class SternScolding extends CardImpl { + + private static final FilterSpell filter + = new FilterCreatureSpell("creature spell with power or toughness 2 or less"); + + static { + filter.add(Predicates.or( + new PowerPredicate(ComparisonType.FEWER_THAN, 3), + new ToughnessPredicate(ComparisonType.FEWER_THAN, 3) + )); + } + + public SternScolding(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{U}"); + + // Counter target creature spell with power or toughness 2 or less. + this.getSpellAbility().addEffect(new CounterTargetEffect()); + this.getSpellAbility().addTarget(new TargetSpell(filter)); + } + + private SternScolding(final SternScolding card) { + super(card); + } + + @Override + public SternScolding copy() { + return new SternScolding(this); + } +} diff --git a/Mage.Sets/src/mage/sets/TheLordOfTheRingsTalesOfMiddleEarth.java b/Mage.Sets/src/mage/sets/TheLordOfTheRingsTalesOfMiddleEarth.java index cca3321b46..20b1691bd1 100644 --- a/Mage.Sets/src/mage/sets/TheLordOfTheRingsTalesOfMiddleEarth.java +++ b/Mage.Sets/src/mage/sets/TheLordOfTheRingsTalesOfMiddleEarth.java @@ -79,6 +79,7 @@ public final class TheLordOfTheRingsTalesOfMiddleEarth extends ExpansionSet { cards.add(new SetCardInfo("Shelob's Ambush", 108, Rarity.COMMON, mage.cards.s.ShelobsAmbush.class)); cards.add(new SetCardInfo("Shire Terrace", 261, Rarity.COMMON, mage.cards.s.ShireTerrace.class)); cards.add(new SetCardInfo("Snarling Warg", 109, Rarity.COMMON, mage.cards.s.SnarlingWarg.class)); + cards.add(new SetCardInfo("Stern Scolding", 71, Rarity.UNCOMMON, mage.cards.s.SternScolding.class)); cards.add(new SetCardInfo("Stew the Coneys", 189, Rarity.UNCOMMON, mage.cards.s.StewTheConeys.class)); cards.add(new SetCardInfo("Swamp", 266, Rarity.LAND, mage.cards.basiclands.Swamp.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Swarming of Moria", 150, Rarity.COMMON, mage.cards.s.SwarmingOfMoria.class));