From c45bc1e884080be170cd81a18cd6cfadaf538bc5 Mon Sep 17 00:00:00 2001 From: Vivian Greenslade Date: Wed, 30 Aug 2023 21:18:40 -0230 Subject: [PATCH] [WOC] Implement Malleable Impostor (#11074) --- .../src/mage/cards/m/MalleableImpostor.java | 66 +++++++++++++++++++ .../mage/sets/WildsOfEldraineCommander.java | 1 + 2 files changed, 67 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/m/MalleableImpostor.java diff --git a/Mage.Sets/src/mage/cards/m/MalleableImpostor.java b/Mage.Sets/src/mage/cards/m/MalleableImpostor.java new file mode 100644 index 00000000000..5a729211544 --- /dev/null +++ b/Mage.Sets/src/mage/cards/m/MalleableImpostor.java @@ -0,0 +1,66 @@ +package mage.cards.m; + +import java.util.UUID; +import mage.MageInt; +import mage.MageObject; +import mage.constants.SubType; +import mage.filter.StaticFilters; +import mage.game.Game; +import mage.util.functions.CopyApplier; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldAbility; +import mage.abilities.effects.common.CopyPermanentEffect; +import mage.abilities.keyword.FlashAbility; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; + +/** + * + * @author Xanderhall + */ +public final class MalleableImpostor extends CardImpl { + + public MalleableImpostor(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{U}"); + + this.subtype.add(SubType.FAERIE); + this.subtype.add(SubType.SHAPESHIFTER); + this.power = new MageInt(0); + this.toughness = new MageInt(0); + + // Flash, Flying + this.addAbility(FlashAbility.getInstance()); + this.addAbility(FlyingAbility.getInstance()); + + // You may have Malleable Impostor enter the battlefield as a copy of a creature an opponent controls, except it's a Faerie Shapeshifter in addition to its other types and it has flying. + this.addAbility(new EntersBattlefieldAbility( + new CopyPermanentEffect(StaticFilters.FILTER_OPPONENTS_PERMANENT_A_CREATURE, new MalleableImpostorCopyApplier()), + true, null, + "you may have {this} enter the battlefield as a copy of a creature an opponent controls, "+ + "except it's a Faerie Shapeshifter in addition to its other types and it has flying.", "" + )); + + } + + private MalleableImpostor(final MalleableImpostor card) { + super(card); + } + + @Override + public MalleableImpostor copy() { + return new MalleableImpostor(this); + } +} + +class MalleableImpostorCopyApplier extends CopyApplier { + + @Override + public boolean apply(Game game, MageObject blueprint, Ability source, UUID targetObjectId) { + blueprint.addSubType(SubType.FAERIE, SubType.SHAPESHIFTER); + blueprint.getAbilities().add(FlyingAbility.getInstance()); + return true; + } + +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/WildsOfEldraineCommander.java b/Mage.Sets/src/mage/sets/WildsOfEldraineCommander.java index eb4f4a8e95b..a8e7e0662ab 100644 --- a/Mage.Sets/src/mage/sets/WildsOfEldraineCommander.java +++ b/Mage.Sets/src/mage/sets/WildsOfEldraineCommander.java @@ -81,6 +81,7 @@ public final class WildsOfEldraineCommander extends ExpansionSet { cards.add(new SetCardInfo("Kor Spiritdancer", 69, Rarity.RARE, mage.cards.k.KorSpiritdancer.class)); cards.add(new SetCardInfo("Krosan Verge", 163, Rarity.UNCOMMON, mage.cards.k.KrosanVerge.class)); cards.add(new SetCardInfo("Loamcrafter Faun", 19, Rarity.RARE, mage.cards.l.LoamcrafterFaun.class)); + cards.add(new SetCardInfo("Malleable Impostor", 10, Rarity.RARE, mage.cards.m.MalleableImpostor.class)); cards.add(new SetCardInfo("Mantle of the Ancients", 70, Rarity.RARE, mage.cards.m.MantleOfTheAncients.class)); cards.add(new SetCardInfo("Midnight Clock", 99, Rarity.RARE, mage.cards.m.MidnightClock.class)); cards.add(new SetCardInfo("Mind Stone", 148, Rarity.COMMON, mage.cards.m.MindStone.class));