From 516497b446a058201051340486237132c65b65a6 Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Sat, 25 May 2019 09:13:45 -0400 Subject: [PATCH] Implemented Sling-Gang Lieutenant --- .../src/mage/cards/s/SlingGangLieutenant.java | 57 +++++++++++++++++++ Mage.Sets/src/mage/sets/ModernHorizons.java | 1 + 2 files changed, 58 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/s/SlingGangLieutenant.java diff --git a/Mage.Sets/src/mage/cards/s/SlingGangLieutenant.java b/Mage.Sets/src/mage/cards/s/SlingGangLieutenant.java new file mode 100644 index 0000000000..b42b73f0a3 --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/SlingGangLieutenant.java @@ -0,0 +1,57 @@ +package mage.cards.s; + +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.SacrificeTargetCost; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.effects.common.GainLifeEffect; +import mage.abilities.effects.common.LoseLifeTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.filter.common.FilterControlledPermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.game.permanent.token.GoblinToken; +import mage.target.common.TargetControlledPermanent; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class SlingGangLieutenant extends CardImpl { + + private static final FilterControlledPermanent filter = new FilterControlledPermanent("a Goblin"); + + static { + filter.add(new SubtypePredicate(SubType.GOBLIN)); + } + + public SlingGangLieutenant(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{B}"); + + this.subtype.add(SubType.GOBLIN); + + // When Sling-Gang Lieutenant enters the battlefield, create two 1/1 red Goblin creature tokens. + this.addAbility(new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new GoblinToken(), 2))); + + // Sacrifice a Goblin: Target player loses 1 life and you gain 1 life. + Ability ability = new SimpleActivatedAbility( + new LoseLifeTargetEffect(1), + new SacrificeTargetCost(new TargetControlledPermanent(filter)) + ); + ability.addEffect(new GainLifeEffect(1).concatBy("and")); + this.addAbility(ability); + } + + private SlingGangLieutenant(final SlingGangLieutenant card) { + super(card); + } + + @Override + public SlingGangLieutenant copy() { + return new SlingGangLieutenant(this); + } +} diff --git a/Mage.Sets/src/mage/sets/ModernHorizons.java b/Mage.Sets/src/mage/sets/ModernHorizons.java index 7c3c83651e..aab93bfa01 100644 --- a/Mage.Sets/src/mage/sets/ModernHorizons.java +++ b/Mage.Sets/src/mage/sets/ModernHorizons.java @@ -102,6 +102,7 @@ public final class ModernHorizons extends ExpansionSet { cards.add(new SetCardInfo("Serra the Benevolent", 26, Rarity.MYTHIC, mage.cards.s.SerraTheBenevolent.class)); cards.add(new SetCardInfo("Silent Clearing", 246, Rarity.RARE, mage.cards.s.SilentClearing.class)); cards.add(new SetCardInfo("Sisay, Weatherlight Captain", 29, Rarity.RARE, mage.cards.s.SisayWeatherlightCaptain.class)); + cards.add(new SetCardInfo("Sling-Gang Lieutenant", 108, Rarity.UNCOMMON, mage.cards.s.SlingGangLieutenant.class)); cards.add(new SetCardInfo("Snow-Covered Forest", 254, Rarity.COMMON, mage.cards.s.SnowCoveredForest.class)); cards.add(new SetCardInfo("Snow-Covered Island", 251, Rarity.COMMON, mage.cards.s.SnowCoveredIsland.class)); cards.add(new SetCardInfo("Snow-Covered Mountain", 253, Rarity.COMMON, mage.cards.s.SnowCoveredMountain.class));