From 1eae61a75224ff736a08fec71e46087cb8827ed0 Mon Sep 17 00:00:00 2001 From: drmDev Date: Sat, 9 Apr 2016 07:35:33 -0400 Subject: [PATCH] Millikin and EmptytheCatacombs implemented --- .../src/mage/sets/alarareborn/Soulquake.java | 11 +-- Mage.Sets/src/mage/sets/odyssey/Millikin.java | 66 +++++++++++++ .../mage/sets/ravnica/EmptyTheCatacombs.java | 97 +++++++++++++++++++ 3 files changed, 166 insertions(+), 8 deletions(-) create mode 100644 Mage.Sets/src/mage/sets/odyssey/Millikin.java create mode 100644 Mage.Sets/src/mage/sets/ravnica/EmptyTheCatacombs.java diff --git a/Mage.Sets/src/mage/sets/alarareborn/Soulquake.java b/Mage.Sets/src/mage/sets/alarareborn/Soulquake.java index 4998f03024..6447524d2f 100644 --- a/Mage.Sets/src/mage/sets/alarareborn/Soulquake.java +++ b/Mage.Sets/src/mage/sets/alarareborn/Soulquake.java @@ -28,14 +28,13 @@ package mage.sets.alarareborn; import java.util.UUID; - -import mage.constants.CardType; -import mage.constants.Outcome; -import mage.constants.Rarity; import mage.abilities.Ability; import mage.abilities.effects.OneShotEffect; import mage.cards.Card; import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; import mage.constants.Zone; import mage.filter.common.FilterCreatureCard; import mage.filter.common.FilterCreaturePermanent; @@ -53,12 +52,8 @@ public class Soulquake extends CardImpl { super(ownerId, 30, "Soulquake", Rarity.RARE, new CardType[]{CardType.SORCERY}, "{3}{U}{U}{B}{B}"); this.expansionSetCode = "ARB"; - - - // Return all creatures on the battlefield and all creature cards in graveyards to their owners' hands. this.getSpellAbility().addEffect(new SoulquakeEffect()); - } public Soulquake(final Soulquake card) { diff --git a/Mage.Sets/src/mage/sets/odyssey/Millikin.java b/Mage.Sets/src/mage/sets/odyssey/Millikin.java new file mode 100644 index 0000000000..dba766c5fa --- /dev/null +++ b/Mage.Sets/src/mage/sets/odyssey/Millikin.java @@ -0,0 +1,66 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.odyssey; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.costs.common.PutTopCardOfYourLibraryToGraveyardCost; +import mage.abilities.mana.ColorlessManaAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; + +/** + * + * @author escplan9 (Derek Monturo - dmontur1 at gmail dot com) + */ +public class Millikin extends CardImpl { + + public Millikin(UUID ownerId) { + super(ownerId, 302, "Millikin", Rarity.UNCOMMON, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{2}"); + this.expansionSetCode = "ODY"; + this.subtype.add("Construct"); + this.power = new MageInt(0); + this.toughness = new MageInt(1); + + // {tap}, Put the top card of your library into your graveyard: Add {C} to your mana pool. + ColorlessManaAbility ability = new ColorlessManaAbility(); + ability.addCost(new PutTopCardOfYourLibraryToGraveyardCost()); + ability.setUndoPossible(false); + this.addAbility(ability); + } + + public Millikin(final Millikin card) { + super(card); + } + + @Override + public Millikin copy() { + return new Millikin(this); + } +} diff --git a/Mage.Sets/src/mage/sets/ravnica/EmptyTheCatacombs.java b/Mage.Sets/src/mage/sets/ravnica/EmptyTheCatacombs.java new file mode 100644 index 0000000000..3cdb208fc0 --- /dev/null +++ b/Mage.Sets/src/mage/sets/ravnica/EmptyTheCatacombs.java @@ -0,0 +1,97 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.ravnica; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.effects.OneShotEffect; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.common.FilterCreatureCard; +import mage.game.Game; +import mage.players.Player; + +/** + * + * @author escplan9 (Derek Monturo - dmontur1 at gmail dot com) + */ +public class EmptyTheCatacombs extends CardImpl { + + public EmptyTheCatacombs(UUID ownerId) { + super(ownerId, 86, "Empty the Catacombs", Rarity.RARE, new CardType[]{CardType.SORCERY}, "{3}{B}"); + this.expansionSetCode = "RAV"; + + // Each player returns all creature cards from his or her graveyard to his or her hand. + this.getSpellAbility().addEffect(new EmptyTheCatacombsEffect()); + } + + public EmptyTheCatacombs(final EmptyTheCatacombs card) { + super(card); + } + + @Override + public EmptyTheCatacombs copy() { + return new EmptyTheCatacombs(this); + } +} + +class EmptyTheCatacombsEffect extends OneShotEffect { + + private static final FilterCreatureCard filter = new FilterCreatureCard("creature"); + + public EmptyTheCatacombsEffect() { + super(Outcome.ReturnToHand); + staticText = "Each player returns all creature cards from his or her graveyard to his or her hand"; + } + + public EmptyTheCatacombsEffect(final EmptyTheCatacombsEffect effect) { + super(effect); + } + + @Override + public EmptyTheCatacombsEffect copy() { + return new EmptyTheCatacombsEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + for (UUID playerId : game.getState().getPlayersInRange(source.getControllerId(), game)) { + Player player = game.getPlayer(playerId); + if (player != null) { + for (Card card : player.getGraveyard().getCards(filter, game)) { + card.moveToZone(Zone.HAND, source.getSourceId(), game, true); + } + } + } + return true; + } +} \ No newline at end of file