From 69de19704e3376fed5bab72f7262ef65dd2381fa Mon Sep 17 00:00:00 2001 From: Daniel Bomar Date: Sat, 20 Aug 2022 17:45:46 -0500 Subject: [PATCH] [DMU] Implemented Protect the Negotiators --- .../mage/cards/p/ProtectTheNegotiators.java | 50 +++++++++++++++++++ Mage.Sets/src/mage/sets/DominariaUnited.java | 1 + 2 files changed, 51 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/p/ProtectTheNegotiators.java diff --git a/Mage.Sets/src/mage/cards/p/ProtectTheNegotiators.java b/Mage.Sets/src/mage/cards/p/ProtectTheNegotiators.java new file mode 100644 index 00000000000..f1408b24d5f --- /dev/null +++ b/Mage.Sets/src/mage/cards/p/ProtectTheNegotiators.java @@ -0,0 +1,50 @@ +package mage.cards.p; + +import java.util.UUID; + +import mage.abilities.condition.common.KickedCondition; +import mage.abilities.decorator.ConditionalOneShotEffect; +import mage.abilities.dynamicvalue.common.CreaturesYouControlCount; +import mage.abilities.effects.common.CounterUnlessPaysEffect; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.keyword.KickerAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.game.permanent.token.SoldierToken; +import mage.target.TargetSpell; + +/** + * + * @author weirddan455 + */ +public final class ProtectTheNegotiators extends CardImpl { + + public ProtectTheNegotiators(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{U}"); + + // Kicker {W} + this.addAbility(new KickerAbility("{W}")); + + // If this spell was kicked, create a 1/1 white Soldier creature token. + this.getSpellAbility().addEffect(new ConditionalOneShotEffect( + new CreateTokenEffect(new SoldierToken()), + KickedCondition.ONCE, + "If this was spell was kicked, create a 1/1 white Soldier creature token." + )); + + // Counter target spell unless its controller pays {1} for each creature you control. + this.getSpellAbility().addEffect(new CounterUnlessPaysEffect(CreaturesYouControlCount.instance) + .setText("
Counter target spell unless its controller pays {1} for each creature you control.")); + this.getSpellAbility().addTarget(new TargetSpell()); + } + + private ProtectTheNegotiators(final ProtectTheNegotiators card) { + super(card); + } + + @Override + public ProtectTheNegotiators copy() { + return new ProtectTheNegotiators(this); + } +} diff --git a/Mage.Sets/src/mage/sets/DominariaUnited.java b/Mage.Sets/src/mage/sets/DominariaUnited.java index 1bdf0ceaeed..d625a04ba3a 100644 --- a/Mage.Sets/src/mage/sets/DominariaUnited.java +++ b/Mage.Sets/src/mage/sets/DominariaUnited.java @@ -52,6 +52,7 @@ public final class DominariaUnited extends ExpansionSet { cards.add(new SetCardInfo("Mountain", 271, Rarity.LAND, mage.cards.basiclands.Mountain.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Nishoba Brawler", 174, Rarity.UNCOMMON, mage.cards.n.NishobaBrawler.class)); cards.add(new SetCardInfo("Plains", 262, Rarity.LAND, mage.cards.basiclands.Plains.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Protect the Negotiators", 62, Rarity.COMMON, mage.cards.p.ProtectTheNegotiators.class)); cards.add(new SetCardInfo("Raff, Weatherlight Stalwart", 212, Rarity.UNCOMMON, mage.cards.r.RaffWeatherlightStalwart.class)); cards.add(new SetCardInfo("Resolute Reinforcements", 29, Rarity.UNCOMMON, mage.cards.r.ResoluteReinforcements.class)); cards.add(new SetCardInfo("Samite Herbalist", 31, Rarity.COMMON, mage.cards.s.SamiteHerbalist.class));