From 4be9427bbd83c3afbe9a62b4e0b34b630e75b126 Mon Sep 17 00:00:00 2001 From: Susucre <34709007+Susucre@users.noreply.github.com> Date: Fri, 29 Mar 2024 22:25:09 +0100 Subject: [PATCH] [OTJ] Implement Neutralize the Guards --- .../src/mage/cards/n/NeutralizeTheGuards.java | 68 +++++++++++++++++++ .../mage/sets/OutlawsOfThunderJunction.java | 1 + 2 files changed, 69 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/n/NeutralizeTheGuards.java diff --git a/Mage.Sets/src/mage/cards/n/NeutralizeTheGuards.java b/Mage.Sets/src/mage/cards/n/NeutralizeTheGuards.java new file mode 100644 index 00000000000..a3c80c442ab --- /dev/null +++ b/Mage.Sets/src/mage/cards/n/NeutralizeTheGuards.java @@ -0,0 +1,68 @@ +package mage.cards.n; + +import mage.abilities.Ability; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.AddContinuousEffectToGame; +import mage.abilities.effects.common.continuous.BoostAllEffect; +import mage.abilities.effects.keyword.SurveilEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.permanent.ControllerIdPredicate; +import mage.game.Game; +import mage.target.common.TargetOpponent; + +import java.util.UUID; + +/** + * @author Susucr + */ +public final class NeutralizeTheGuards extends CardImpl { + + public NeutralizeTheGuards(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{B}"); + + // Creatures target opponent controls get -1/-1 until end of turn. Surveil 2. + this.getSpellAbility().addEffect(new NeutralizeTheGuardsEffect()); + this.getSpellAbility().addTarget(new TargetOpponent()); + this.getSpellAbility().addEffect(new SurveilEffect(2)); + } + + private NeutralizeTheGuards(final NeutralizeTheGuards card) { + super(card); + } + + @Override + public NeutralizeTheGuards copy() { + return new NeutralizeTheGuards(this); + } +} + +class NeutralizeTheGuardsEffect extends OneShotEffect { + + NeutralizeTheGuardsEffect() { + super(Outcome.Benefit); + staticText = "gain control of all creatures target opponent controls"; + } + + private NeutralizeTheGuardsEffect(final NeutralizeTheGuardsEffect effect) { + super(effect); + } + + @Override + public NeutralizeTheGuardsEffect copy() { + return new NeutralizeTheGuardsEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + FilterCreaturePermanent filter = new FilterCreaturePermanent(); + filter.add(new ControllerIdPredicate(source.getFirstTarget())); + return new AddContinuousEffectToGame( + new BoostAllEffect(-1, -1, Duration.EndOfTurn, filter, false) + ).apply(game, source); + } +} diff --git a/Mage.Sets/src/mage/sets/OutlawsOfThunderJunction.java b/Mage.Sets/src/mage/sets/OutlawsOfThunderJunction.java index 0639f20c4c2..df9ac9fd92f 100644 --- a/Mage.Sets/src/mage/sets/OutlawsOfThunderJunction.java +++ b/Mage.Sets/src/mage/sets/OutlawsOfThunderJunction.java @@ -92,6 +92,7 @@ public final class OutlawsOfThunderJunction extends ExpansionSet { cards.add(new SetCardInfo("Mine Raider", 135, Rarity.COMMON, mage.cards.m.MineRaider.class)); cards.add(new SetCardInfo("Miriam, Herd Whisperer", 221, Rarity.UNCOMMON, mage.cards.m.MiriamHerdWhisperer.class)); cards.add(new SetCardInfo("Mountain", 275, Rarity.LAND, mage.cards.basiclands.Mountain.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Neutralize the Guards", 95, Rarity.UNCOMMON, mage.cards.n.NeutralizeTheGuards.class)); cards.add(new SetCardInfo("Nimble Brigand", 58, Rarity.UNCOMMON, mage.cards.n.NimbleBrigand.class)); cards.add(new SetCardInfo("Oko, the Ringleader", 223, Rarity.MYTHIC, mage.cards.o.OkoTheRingleader.class)); cards.add(new SetCardInfo("Omenport Vigilante", 21, Rarity.UNCOMMON, mage.cards.o.OmenportVigilante.class));