diff --git a/Mage.Sets/src/mage/cards/t/ThornLieutenant.java b/Mage.Sets/src/mage/cards/t/ThornLieutenant.java new file mode 100644 index 00000000000..11ba8e88dc8 --- /dev/null +++ b/Mage.Sets/src/mage/cards/t/ThornLieutenant.java @@ -0,0 +1,53 @@ +package mage.cards.t; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.BecomesTargetTriggeredAbility; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.effects.common.continuous.BoostSourceEffect; +import mage.constants.SubType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.filter.StaticFilters; +import mage.game.permanent.token.ElfToken; + +/** + * + * @author TheElk801 + */ +public final class ThornLieutenant extends CardImpl { + + public ThornLieutenant(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G}"); + + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.WARRIOR); + this.power = new MageInt(2); + this.toughness = new MageInt(3); + + // Whenever Thorn Lieutenant becomes the target of a spell or ability an opponent controls, create a 1/1 green Elf Warrior creature token. + this.addAbility(new BecomesTargetTriggeredAbility( + new CreateTokenEffect(new ElfToken()), + StaticFilters.FILTER_SPELL_OR_ABILITY_OPPONENTS + )); + + // {5}{G}: Thorn Lieutenant gets +4/+4 until end of turn. + this.addAbility(new SimpleActivatedAbility( + new BoostSourceEffect(4, 4, Duration.EndOfTurn), + new ManaCostsImpl("{5}{G}") + )); + } + + public ThornLieutenant(final ThornLieutenant card) { + super(card); + } + + @Override + public ThornLieutenant copy() { + return new ThornLieutenant(this); + } +} diff --git a/Mage.Sets/src/mage/sets/CoreSet2019.java b/Mage.Sets/src/mage/sets/CoreSet2019.java index c10cb0ee9f9..0f636441b58 100644 --- a/Mage.Sets/src/mage/sets/CoreSet2019.java +++ b/Mage.Sets/src/mage/sets/CoreSet2019.java @@ -239,6 +239,7 @@ public final class CoreSet2019 extends ExpansionSet { cards.add(new SetCardInfo("Tezzeret's Gatebreaker", 289, Rarity.RARE, mage.cards.t.TezzeretsGatebreaker.class)); cards.add(new SetCardInfo("Tezzeret's Strider", 290, Rarity.UNCOMMON, mage.cards.t.TezzeretsStrider.class)); cards.add(new SetCardInfo("Tezzeret, Cruel Machinist", 286, Rarity.MYTHIC, mage.cards.t.TezzeretCruelMachinist.class)); + cards.add(new SetCardInfo("Thorn Lieutenant", 203, Rarity.RARE, mage.cards.t.ThornLieutenant.class)); cards.add(new SetCardInfo("Thornhide Wolves", 204, Rarity.COMMON, mage.cards.t.ThornhideWolves.class)); cards.add(new SetCardInfo("Thud", 163, Rarity.UNCOMMON, mage.cards.t.Thud.class)); cards.add(new SetCardInfo("Timber Gorge", 258, Rarity.COMMON, mage.cards.t.TimberGorge.class)); diff --git a/Mage/src/main/java/mage/abilities/common/BecomesTargetTriggeredAbility.java b/Mage/src/main/java/mage/abilities/common/BecomesTargetTriggeredAbility.java index 750dc8cd374..54263a11bc1 100644 --- a/Mage/src/main/java/mage/abilities/common/BecomesTargetTriggeredAbility.java +++ b/Mage/src/main/java/mage/abilities/common/BecomesTargetTriggeredAbility.java @@ -5,6 +5,7 @@ import mage.abilities.TriggeredAbilityImpl; import mage.abilities.effects.Effect; import mage.constants.Zone; import mage.filter.FilterStackObject; +import mage.filter.StaticFilters; import mage.game.Game; import mage.game.events.GameEvent; import mage.game.stack.StackObject; @@ -18,7 +19,7 @@ public class BecomesTargetTriggeredAbility extends TriggeredAbilityImpl { private final FilterStackObject filter; public BecomesTargetTriggeredAbility(Effect effect) { - this(effect, new FilterStackObject("a spell or ability")); + this(effect, StaticFilters.FILTER_SPELL_OR_ABILITY); } public BecomesTargetTriggeredAbility(Effect effect, FilterStackObject filter) { diff --git a/Mage/src/main/java/mage/filter/StaticFilters.java b/Mage/src/main/java/mage/filter/StaticFilters.java index 96828dbc587..0fcf903c4c3 100644 --- a/Mage/src/main/java/mage/filter/StaticFilters.java +++ b/Mage/src/main/java/mage/filter/StaticFilters.java @@ -388,6 +388,17 @@ public final class StaticFilters { static { FILTER_PERMANENTS_NON_LAND.setLockedFilter(true); } + public static final FilterStackObject FILTER_SPELL_OR_ABILITY_OPPONENTS = new FilterStackObject("spell or ability and opponent controls"); + + static { + FILTER_SPELL_OR_ABILITY_OPPONENTS.add(new ControllerPredicate(TargetController.OPPONENT)); + FILTER_SPELL_OR_ABILITY_OPPONENTS.setLockedFilter(true); + } + public static final FilterStackObject FILTER_SPELL_OR_ABILITY = new FilterStackObject(); + + static { + FILTER_SPELL_OR_ABILITY.setLockedFilter(true); + } public static final FilterCreatureSpell FILTER_SPELL_A_CREATURE = new FilterCreatureSpell("a creature spell");