Millikin and EmptytheCatacombs implemented

This commit is contained in:
drmDev 2016-04-09 07:35:33 -04:00
parent 86528ede16
commit 1eae61a752
3 changed files with 166 additions and 8 deletions

View file

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

View file

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

View file

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