From f46900aef910663fabc48133b4aa4b4a716ff849 Mon Sep 17 00:00:00 2001 From: PurpleCrowbar <26198472+PurpleCrowbar@users.noreply.github.com> Date: Wed, 13 Nov 2024 15:53:26 +0000 Subject: [PATCH] [DSK] Implement Leyline of Transformation --- .../mage/cards/l/LeylineOfTransformation.java | 51 +++++++++++++++++++ .../src/mage/sets/DuskmournHouseOfHorror.java | 2 + 2 files changed, 53 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/l/LeylineOfTransformation.java diff --git a/Mage.Sets/src/mage/cards/l/LeylineOfTransformation.java b/Mage.Sets/src/mage/cards/l/LeylineOfTransformation.java new file mode 100644 index 00000000000..5941831b177 --- /dev/null +++ b/Mage.Sets/src/mage/cards/l/LeylineOfTransformation.java @@ -0,0 +1,51 @@ +package mage.cards.l; + +import mage.abilities.common.AsEntersBattlefieldAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.ChooseCreatureTypeEffect; +import mage.abilities.effects.common.continuous.AddCreatureSubTypeAllMultiZoneEffect; +import mage.abilities.keyword.LeylineAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.filter.StaticFilters; +import mage.filter.common.FilterControlledCreatureSpell; +import mage.filter.common.FilterOwnedCreatureCard; + +import java.util.UUID; + +/** + * @author PurpleCrowbar + */ +public final class LeylineOfTransformation extends CardImpl { + + public static final FilterControlledCreatureSpell filterSpells = new FilterControlledCreatureSpell("creature spells you control"); + public static final FilterOwnedCreatureCard filterCards = new FilterOwnedCreatureCard("creature cards you own"); + + public LeylineOfTransformation(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{U}{U}"); + + // If Leyline of Transformation is in your opening hand, you may begin the game with it on the battlefield. + this.addAbility(LeylineAbility.getInstance()); + + // As Leyline of Transformation enters, choose a creature type. + this.addAbility(new AsEntersBattlefieldAbility(new ChooseCreatureTypeEffect(Outcome.Neutral))); + + // Creatures you control are the chosen type in addition to their other types. The same is true for creature spells you control and creature cards you own that aren't on the battlefield. + this.addAbility(new SimpleStaticAbility(new AddCreatureSubTypeAllMultiZoneEffect( + StaticFilters.FILTER_CONTROLLED_CREATURES, + filterSpells, + filterCards + ))); + } + + private LeylineOfTransformation(final LeylineOfTransformation card) { + super(card); + } + + @Override + public LeylineOfTransformation copy() { + return new LeylineOfTransformation(this); + } +} diff --git a/Mage.Sets/src/mage/sets/DuskmournHouseOfHorror.java b/Mage.Sets/src/mage/sets/DuskmournHouseOfHorror.java index 41f4788093d..60bfc60f548 100644 --- a/Mage.Sets/src/mage/sets/DuskmournHouseOfHorror.java +++ b/Mage.Sets/src/mage/sets/DuskmournHouseOfHorror.java @@ -136,6 +136,8 @@ public final class DuskmournHouseOfHorror extends ExpansionSet { cards.add(new SetCardInfo("Leyline of Mutation", 188, Rarity.RARE, mage.cards.l.LeylineOfMutation.class)); cards.add(new SetCardInfo("Leyline of Resonance", 143, Rarity.RARE, mage.cards.l.LeylineOfResonance.class)); cards.add(new SetCardInfo("Leyline of the Void", 106, Rarity.RARE, mage.cards.l.LeylineOfTheVoid.class)); + cards.add(new SetCardInfo("Leyline of Transformation", 63, Rarity.RARE, mage.cards.l.LeylineOfTransformation.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Leyline of Transformation", 372, Rarity.RARE, mage.cards.l.LeylineOfTransformation.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Lionheart Glimmer", 19, Rarity.UNCOMMON, mage.cards.l.LionheartGlimmer.class)); cards.add(new SetCardInfo("Live or Die", 107, Rarity.UNCOMMON, mage.cards.l.LiveOrDie.class)); cards.add(new SetCardInfo("Living Phone", 20, Rarity.COMMON, mage.cards.l.LivingPhone.class));