diff --git a/Mage.Sets/src/mage/cards/s/Sunfall.java b/Mage.Sets/src/mage/cards/s/Sunfall.java new file mode 100644 index 00000000000..d1fd881dff9 --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/Sunfall.java @@ -0,0 +1,70 @@ +package mage.cards.s; + +import mage.abilities.Ability; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.keyword.IncubateEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.cards.Cards; +import mage.cards.CardsImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Zone; +import mage.filter.StaticFilters; +import mage.game.Game; +import mage.players.Player; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class Sunfall extends CardImpl { + + public Sunfall(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{3}{W}{W}"); + + // Exile all creatures. Incubate X, where X is the number of creatures exiled this way. + this.getSpellAbility().addEffect(new SunfallEffect()); + } + + private Sunfall(final Sunfall card) { + super(card); + } + + @Override + public Sunfall copy() { + return new Sunfall(this); + } +} + +class SunfallEffect extends OneShotEffect { + + SunfallEffect() { + super(Outcome.Benefit); + staticText = "exile all creatures. Incubate X, where X is the number of creatures exiled this way"; + } + + private SunfallEffect(final SunfallEffect effect) { + super(effect); + } + + @Override + public SunfallEffect copy() { + return new SunfallEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player player = game.getPlayer(source.getControllerId()); + if (player == null) { + return false; + } + Cards cards = new CardsImpl(game.getBattlefield().getActivePermanents( + StaticFilters.FILTER_PERMANENT_CREATURE, source.getControllerId(), source, game + )); + player.moveCards(cards, Zone.EXILED, source, game); + new IncubateEffect(cards.size()).apply(game, source); + return true; + } +} diff --git a/Mage.Sets/src/mage/sets/MarchOfTheMachine.java b/Mage.Sets/src/mage/sets/MarchOfTheMachine.java index 5398e964314..8cd1265c6c1 100644 --- a/Mage.Sets/src/mage/sets/MarchOfTheMachine.java +++ b/Mage.Sets/src/mage/sets/MarchOfTheMachine.java @@ -106,6 +106,7 @@ public final class MarchOfTheMachine extends ExpansionSet { 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("Sunfall", 40, Rarity.RARE, mage.cards.s.Sunfall.class)); cards.add(new SetCardInfo("Swamp", 279, Rarity.LAND, mage.cards.basiclands.Swamp.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Swiftwater Cliffs", 273, Rarity.COMMON, mage.cards.s.SwiftwaterCliffs.class)); cards.add(new SetCardInfo("Thornwood Falls", 274, Rarity.COMMON, mage.cards.t.ThornwoodFalls.class));