From 7f1ec579d1dcef8f1f04762fa269e3708fb32200 Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Wed, 20 Apr 2022 21:56:25 -0400 Subject: [PATCH] [NCC] Implemented Killer Service --- Mage.Sets/src/mage/cards/k/KillerService.java | 61 +++++++++++++++++++ .../src/mage/sets/NewCapennaCommander.java | 1 + 2 files changed, 62 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/k/KillerService.java diff --git a/Mage.Sets/src/mage/cards/k/KillerService.java b/Mage.Sets/src/mage/cards/k/KillerService.java new file mode 100644 index 00000000000..67a36e251ba --- /dev/null +++ b/Mage.Sets/src/mage/cards/k/KillerService.java @@ -0,0 +1,61 @@ +package mage.cards.k; + +import mage.abilities.common.BeginningOfEndStepTriggeredAbility; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.costs.CompositeCost; +import mage.abilities.costs.common.SacrificeTargetCost; +import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.dynamicvalue.common.OpponentsCount; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.effects.common.DoIfCostPaid; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.TargetController; +import mage.filter.common.FilterControlledPermanent; +import mage.filter.predicate.permanent.TokenPredicate; +import mage.game.permanent.token.FoodToken; +import mage.game.permanent.token.RhinoWarriorToken; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class KillerService extends CardImpl { + + private static final FilterControlledPermanent filter = new FilterControlledPermanent("a token"); + + static { + filter.add(TokenPredicate.TRUE); + } + + public KillerService(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{G}"); + + // When Killer Service enters the battlefield, create a number of Food tokens equal to the number of opponents you have. + this.addAbility(new EntersBattlefieldTriggeredAbility( + new CreateTokenEffect(new FoodToken(), OpponentsCount.instance) + )); + + // At the beginning of your end step, you may pay {2} and sacrifice a token. If you do, create a 4/4 green Rhino Warrior creature token. + this.addAbility(new BeginningOfEndStepTriggeredAbility( + new DoIfCostPaid( + new CreateTokenEffect(new RhinoWarriorToken()), + new CompositeCost( + new GenericManaCost(2), new SacrificeTargetCost(filter), + "pay {2} and sacrifice a token" + ) + ), TargetController.YOU, false + )); + } + + private KillerService(final KillerService card) { + super(card); + } + + @Override + public KillerService copy() { + return new KillerService(this); + } +} diff --git a/Mage.Sets/src/mage/sets/NewCapennaCommander.java b/Mage.Sets/src/mage/sets/NewCapennaCommander.java index c1a97645a30..8fbac392172 100644 --- a/Mage.Sets/src/mage/sets/NewCapennaCommander.java +++ b/Mage.Sets/src/mage/sets/NewCapennaCommander.java @@ -161,6 +161,7 @@ public final class NewCapennaCommander extends ExpansionSet { cards.add(new SetCardInfo("Kazuul, Tyrant of the Cliffs", 270, Rarity.RARE, mage.cards.k.KazuulTyrantOfTheCliffs.class)); cards.add(new SetCardInfo("Kess, Dissident Mage", 344, Rarity.MYTHIC, mage.cards.k.KessDissidentMage.class)); cards.add(new SetCardInfo("Kessig Wolf Run", 411, Rarity.RARE, mage.cards.k.KessigWolfRun.class)); + cards.add(new SetCardInfo("Killer Service", 61, Rarity.RARE, mage.cards.k.KillerService.class)); cards.add(new SetCardInfo("Kitt Kanto, Mayhem Diva", 4, Rarity.MYTHIC, mage.cards.k.KittKantoMayhemDiva.class)); cards.add(new SetCardInfo("Kodama's Reach", 298, Rarity.COMMON, mage.cards.k.KodamasReach.class)); cards.add(new SetCardInfo("Kresh the Bloodbraided", 345, Rarity.MYTHIC, mage.cards.k.KreshTheBloodbraided.class));