From 6017f35517c1176755b801b7d445b7b8f6f6c05e Mon Sep 17 00:00:00 2001 From: theelk801 Date: Sat, 1 Apr 2023 10:20:59 -0400 Subject: [PATCH] [MOM] Implement Skyclave Aerialist / Skyclave Invader --- .../src/mage/cards/s/SkyclaveAerialist.java | 46 ++++++++++ .../src/mage/cards/s/SkyclaveInvader.java | 88 +++++++++++++++++++ .../src/mage/sets/MarchOfTheMachine.java | 2 + 3 files changed, 136 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/s/SkyclaveAerialist.java create mode 100644 Mage.Sets/src/mage/cards/s/SkyclaveInvader.java diff --git a/Mage.Sets/src/mage/cards/s/SkyclaveAerialist.java b/Mage.Sets/src/mage/cards/s/SkyclaveAerialist.java new file mode 100644 index 0000000000..07486d3175 --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/SkyclaveAerialist.java @@ -0,0 +1,46 @@ +package mage.cards.s; + +import mage.MageInt; +import mage.abilities.common.ActivateAsSorceryActivatedAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.TransformSourceEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.abilities.keyword.TransformAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class SkyclaveAerialist extends CardImpl { + + public SkyclaveAerialist(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{U}"); + + this.subtype.add(SubType.MERFOLK); + this.subtype.add(SubType.SCOUT); + this.power = new MageInt(2); + this.toughness = new MageInt(1); + this.secondSideCardClazz = mage.cards.s.SkyclaveInvader.class; + + // Flying + this.addAbility(FlyingAbility.getInstance()); + + // {4}{G/P}: Transform Skyclave Aerialist. Activate only as a sorcery. + this.addAbility(new TransformAbility()); + this.addAbility(new ActivateAsSorceryActivatedAbility(new TransformSourceEffect(), new ManaCostsImpl<>("{4}{G/P}"))); + } + + private SkyclaveAerialist(final SkyclaveAerialist card) { + super(card); + } + + @Override + public SkyclaveAerialist copy() { + return new SkyclaveAerialist(this); + } +} diff --git a/Mage.Sets/src/mage/cards/s/SkyclaveInvader.java b/Mage.Sets/src/mage/cards/s/SkyclaveInvader.java new file mode 100644 index 0000000000..dec33c9ee6 --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/SkyclaveInvader.java @@ -0,0 +1,88 @@ +package mage.cards.s; + +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.TransformIntoSourceTriggeredAbility; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.cards.CardsImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.SubType; +import mage.constants.Zone; +import mage.game.Game; +import mage.players.Player; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class SkyclaveInvader extends CardImpl { + + public SkyclaveInvader(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, ""); + + this.subtype.add(SubType.PHYREXIAN); + this.subtype.add(SubType.MERFOLK); + this.subtype.add(SubType.SCOUT); + this.power = new MageInt(2); + this.toughness = new MageInt(4); + this.color.setBlue(true); + this.color.setGreen(true); + this.nightCard = true; + + // Flying + this.addAbility(FlyingAbility.getInstance()); + + // When this creature transforms into Skyclave Invader, look at the top card of your library. If it's a land card, you may put it onto the battlefield. If you don't put the card onto the battlefield, put it into your hand. + this.addAbility(new TransformIntoSourceTriggeredAbility(new SkyclaveInvaderEffect())); + } + + private SkyclaveInvader(final SkyclaveInvader card) { + super(card); + } + + @Override + public SkyclaveInvader copy() { + return new SkyclaveInvader(this); + } +} + +class SkyclaveInvaderEffect extends OneShotEffect { + + SkyclaveInvaderEffect() { + super(Outcome.Benefit); + staticText = "look at the top card of your library. If it's a land card, you may put it onto the battlefield. " + + "If you don't put the card onto the battlefield, put it into your hand"; + } + + private SkyclaveInvaderEffect(final SkyclaveInvaderEffect effect) { + super(effect); + } + + @Override + public SkyclaveInvaderEffect copy() { + return new SkyclaveInvaderEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player player = game.getPlayer(source.getControllerId()); + if (player == null) { + return false; + } + Card card = player.getLibrary().getFromTop(game); + if (card == null) { + return false; + } + player.lookAtCards(source, null, new CardsImpl(card), game); + return player.moveCards(card, card.isLand(game) && player.chooseUse( + Outcome.PutCardInPlay, "Put " + card.getName() + " onto the battlefield or into your hand?", + null, "Battlefield", "Hand", source, game + ) ? Zone.BATTLEFIELD : Zone.HAND, source, game); + } +} diff --git a/Mage.Sets/src/mage/sets/MarchOfTheMachine.java b/Mage.Sets/src/mage/sets/MarchOfTheMachine.java index cd37f21260..73d5a244a7 100644 --- a/Mage.Sets/src/mage/sets/MarchOfTheMachine.java +++ b/Mage.Sets/src/mage/sets/MarchOfTheMachine.java @@ -66,6 +66,8 @@ public final class MarchOfTheMachine extends ExpansionSet { cards.add(new SetCardInfo("Scoured Barrens", 272, Rarity.COMMON, mage.cards.s.ScouredBarrens.class)); cards.add(new SetCardInfo("Seraph of New Capenna", 36, Rarity.UNCOMMON, mage.cards.s.SeraphOfNewCapenna.class)); cards.add(new SetCardInfo("Seraph of New Phyrexia", 36, Rarity.UNCOMMON, mage.cards.s.SeraphOfNewPhyrexia.class)); + cards.add(new SetCardInfo("Skyclave Aerialist", 78, Rarity.UNCOMMON, mage.cards.s.SkyclaveAerialist.class)); + cards.add(new SetCardInfo("Skyclave Invader", 78, Rarity.UNCOMMON, mage.cards.s.SkyclaveInvader.class)); cards.add(new SetCardInfo("Stoke the Flames", 166, Rarity.UNCOMMON, mage.cards.s.StokeTheFlames.class)); cards.add(new SetCardInfo("Storm the Seedcore", 206, Rarity.UNCOMMON, mage.cards.s.StormTheSeedcore.class)); cards.add(new SetCardInfo("Swamp", 279, Rarity.LAND, mage.cards.basiclands.Swamp.class, NON_FULL_USE_VARIOUS));