[WOC] Implement Malleable Impostor (#11074)

This commit is contained in:
Vivian Greenslade 2023-08-30 21:18:40 -02:30 committed by GitHub
parent a7a4299c7f
commit c45bc1e884
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 67 additions and 0 deletions

View file

@ -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;
}
}

View file

@ -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));