From 4fb54964333c2c7294d735302112dd405d6443cc Mon Sep 17 00:00:00 2001 From: theelk801 Date: Tue, 29 Oct 2024 12:33:00 -0400 Subject: [PATCH] [J25] Implement Starlight Snare --- .../src/mage/cards/s/StarlightSnare.java | 50 +++++++++++++++++++ .../src/mage/sets/FoundationsJumpstart.java | 1 + 2 files changed, 51 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/s/StarlightSnare.java diff --git a/Mage.Sets/src/mage/cards/s/StarlightSnare.java b/Mage.Sets/src/mage/cards/s/StarlightSnare.java new file mode 100644 index 000000000000..a00d6cf6426e --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/StarlightSnare.java @@ -0,0 +1,50 @@ +package mage.cards.s; + +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.AttachEffect; +import mage.abilities.effects.common.DontUntapInControllersUntapStepEnchantedEffect; +import mage.abilities.effects.common.TapEnchantedEffect; +import mage.abilities.keyword.EnchantAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.SubType; +import mage.target.TargetPermanent; +import mage.target.common.TargetCreaturePermanent; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class StarlightSnare extends CardImpl { + + public StarlightSnare(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{U}"); + + this.subtype.add(SubType.AURA); + + // Enchant creature + TargetPermanent auraTarget = new TargetCreaturePermanent(); + this.getSpellAbility().addTarget(auraTarget); + this.getSpellAbility().addEffect(new AttachEffect(Outcome.BoostCreature)); + this.addAbility(new EnchantAbility(auraTarget)); + + // When Starlight Snare enters, tap enchanted creature. + this.addAbility(new EntersBattlefieldTriggeredAbility(new TapEnchantedEffect())); + + // Enchanted creature doesn't untap during its controller's untap step. + this.addAbility(new SimpleStaticAbility(new DontUntapInControllersUntapStepEnchantedEffect())); + } + + private StarlightSnare(final StarlightSnare card) { + super(card); + } + + @Override + public StarlightSnare copy() { + return new StarlightSnare(this); + } +} diff --git a/Mage.Sets/src/mage/sets/FoundationsJumpstart.java b/Mage.Sets/src/mage/sets/FoundationsJumpstart.java index e9d58f6e9593..683d00b38fd3 100644 --- a/Mage.Sets/src/mage/sets/FoundationsJumpstart.java +++ b/Mage.Sets/src/mage/sets/FoundationsJumpstart.java @@ -32,6 +32,7 @@ private FoundationsJumpstart() { cards.add(new SetCardInfo("Saurian Symbiote", 23, Rarity.COMMON, mage.cards.s.SaurianSymbiote.class)); cards.add(new SetCardInfo("Shardless Outlander", 28, Rarity.COMMON, mage.cards.s.ShardlessOutlander.class)); cards.add(new SetCardInfo("Shroofus Sproutsire", 54, Rarity.RARE, mage.cards.s.ShroofusSproutsire.class)); + cards.add(new SetCardInfo("Starlight Snare", 9, Rarity.COMMON, mage.cards.s.StarlightSnare.class)); cards.add(new SetCardInfo("Starnheim Memento", 29, Rarity.UNCOMMON, mage.cards.s.StarnheimMemento.class)); cards.add(new SetCardInfo("Vilis, Broker of Blood", 70, Rarity.RARE, mage.cards.v.VilisBrokerOfBlood.class)); }