mirror of
https://github.com/correl/mage.git
synced 2024-12-25 11:11:16 +00:00
[EMN] Added some blue cards.
This commit is contained in:
parent
e01a594ef8
commit
753e7dfb2c
9 changed files with 515 additions and 87 deletions
75
Mage.Sets/src/mage/sets/eldritchmoon/AdvancedStitchwing.java
Normal file
75
Mage.Sets/src/mage/sets/eldritchmoon/AdvancedStitchwing.java
Normal file
|
@ -0,0 +1,75 @@
|
|||
/*
|
||||
* 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.eldritchmoon;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.common.DiscardTargetCost;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.common.ReturnSourceFromGraveyardToBattlefieldEffect;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.target.common.TargetCardInHand;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public class AdvancedStitchwing extends CardImpl {
|
||||
|
||||
public AdvancedStitchwing(UUID ownerId) {
|
||||
super(ownerId, 49, "Advanced Stitchwing", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{3}{U}{U}");
|
||||
this.expansionSetCode = "EMN";
|
||||
this.subtype.add("Zombie");
|
||||
this.subtype.add("Horror");
|
||||
this.power = new MageInt(3);
|
||||
this.toughness = new MageInt(4);
|
||||
|
||||
// Flying
|
||||
this.addAbility(FlyingAbility.getInstance());
|
||||
// {2}{U}, Discard two cards: Return Advanced Stitchwing from your graveyard to the battlefield tapped.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.GRAVEYARD, new ReturnSourceFromGraveyardToBattlefieldEffect(true), new ManaCostsImpl("{2}{U}"));
|
||||
ability.addCost(new DiscardTargetCost(new TargetCardInHand(2, new FilterCard("two cards"))));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
public AdvancedStitchwing(final AdvancedStitchwing card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AdvancedStitchwing copy() {
|
||||
return new AdvancedStitchwing(this);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,146 @@
|
|||
/*
|
||||
* 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.eldritchmoon;
|
||||
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
import mage.MageObject;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.Cards;
|
||||
import mage.cards.CardsImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
import mage.target.TargetCard;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public class CoaxFromTheBlindEternities extends CardImpl {
|
||||
|
||||
public CoaxFromTheBlindEternities(UUID ownerId) {
|
||||
super(ownerId, 51, "Coax from the Blind Eternities", Rarity.RARE, new CardType[]{CardType.SORCERY}, "{2}{U}");
|
||||
this.expansionSetCode = "EMN";
|
||||
|
||||
// You may choose an Eldrazi card you own from outside the game or in exile, reveal that card, and put it into your hand.
|
||||
this.getSpellAbility().addEffect(new CoaxFromTheBlindEternitiesEffect());
|
||||
}
|
||||
|
||||
public CoaxFromTheBlindEternities(final CoaxFromTheBlindEternities card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CoaxFromTheBlindEternities copy() {
|
||||
return new CoaxFromTheBlindEternities(this);
|
||||
}
|
||||
}
|
||||
|
||||
class CoaxFromTheBlindEternitiesEffect extends OneShotEffect {
|
||||
|
||||
private static final String choiceText = "Choose a Eldrazi card you own from outside the game (sideboard), and put it into your hand?";
|
||||
|
||||
private static final FilterCard filter = new FilterCard("Eldrazi card");
|
||||
|
||||
static {
|
||||
filter.add(new SubtypePredicate("Eldrazi"));
|
||||
}
|
||||
|
||||
public CoaxFromTheBlindEternitiesEffect() {
|
||||
super(Outcome.Benefit);
|
||||
this.staticText = "You may choose an Eldrazi card you own from outside the game or in exile, reveal that card, and put it into your hand";
|
||||
}
|
||||
|
||||
public CoaxFromTheBlindEternitiesEffect(final CoaxFromTheBlindEternitiesEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CoaxFromTheBlindEternitiesEffect copy() {
|
||||
return new CoaxFromTheBlindEternitiesEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
MageObject sourceObject = source.getSourceObject(game);
|
||||
if (controller != null && sourceObject != null) {
|
||||
Cards cards = controller.getSideboard();
|
||||
Card card = null;
|
||||
if (!cards.isEmpty()) {
|
||||
if (controller.chooseUse(Outcome.Benefit, choiceText, source, game)) {
|
||||
Set<Card> filtered = cards.getCards(filter, game);
|
||||
if (filtered.isEmpty()) {
|
||||
game.informPlayer(controller, "You have no " + filter.getMessage() + " outside the game (your sideboard).");
|
||||
} else {
|
||||
Cards filteredCards = new CardsImpl();
|
||||
for (Card sideboardCard : filtered) {
|
||||
filteredCards.add(sideboardCard.getId());
|
||||
}
|
||||
TargetCard target = new TargetCard(Zone.OUTSIDE, filter);
|
||||
target.setNotTarget(true);
|
||||
if (controller.choose(outcome, filteredCards, target, game)) {
|
||||
card = controller.getSideboard().get(target.getFirstTarget(), game);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// Choose a card from exile
|
||||
Cards filteredCards = new CardsImpl();
|
||||
for (Card exileCard : game.getExile().getAllCards(game)) {
|
||||
if (exileCard.getOwnerId().equals(source.getControllerId()) && exileCard.hasSubtype("Eldrazi")) {
|
||||
filteredCards.add(exileCard);
|
||||
}
|
||||
}
|
||||
if (filteredCards.isEmpty()) {
|
||||
game.informPlayer(controller, "You have no Eldrazi cards in the exile zone.");
|
||||
} else {
|
||||
TargetCard target = new TargetCard(Zone.EXILED, filter);
|
||||
target.setNotTarget(true);
|
||||
if (controller.choose(Outcome.Benefit, filteredCards, target, game)) {
|
||||
card = game.getCard(target.getFirstTarget());
|
||||
}
|
||||
}
|
||||
if (card != null) {
|
||||
card.moveToZone(Zone.HAND, source.getSourceId(), game, false);
|
||||
controller.revealCards(sourceObject.getIdName(), new CardsImpl(card), game);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
64
Mage.Sets/src/mage/sets/eldritchmoon/ContingencyPlan.java
Normal file
64
Mage.Sets/src/mage/sets/eldritchmoon/ContingencyPlan.java
Normal file
|
@ -0,0 +1,64 @@
|
|||
/*
|
||||
* 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.eldritchmoon;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.dynamicvalue.common.StaticValue;
|
||||
import mage.abilities.effects.common.LookLibraryAndPickControllerEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.FilterCard;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public class ContingencyPlan extends CardImpl {
|
||||
|
||||
public ContingencyPlan(UUID ownerId) {
|
||||
super(ownerId, 52, "Contingency Plan", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{1}{U}");
|
||||
this.expansionSetCode = "EMN";
|
||||
this.supertype.add("SOrcery");
|
||||
|
||||
// Look at the top five cards of your library. Put any number of them into your graveyard and the rest back on top of your library in any order.
|
||||
this.getSpellAbility().addEffect(new LookLibraryAndPickControllerEffect(new StaticValue(5), false, new StaticValue(5),
|
||||
new FilterCard("cards"), Zone.LIBRARY, true, false, true, Zone.GRAVEYARD, false));
|
||||
|
||||
}
|
||||
|
||||
public ContingencyPlan(final ContingencyPlan card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ContingencyPlan copy() {
|
||||
return new ContingencyPlan(this);
|
||||
}
|
||||
}
|
68
Mage.Sets/src/mage/sets/eldritchmoon/Displace.java
Normal file
68
Mage.Sets/src/mage/sets/eldritchmoon/Displace.java
Normal file
|
@ -0,0 +1,68 @@
|
|||
/*
|
||||
* 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.eldritchmoon;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.ExileTargetForSourceEffect;
|
||||
import mage.abilities.effects.common.ReturnToBattlefieldUnderYourControlTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public class Displace extends CardImpl {
|
||||
|
||||
public Displace(UUID ownerId) {
|
||||
super(ownerId, 55, "Displace", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{2}{U}");
|
||||
this.expansionSetCode = "EMN";
|
||||
|
||||
// Exile up to two target creatures you control, then return those cards to the battlefield under their owner's control.
|
||||
this.getSpellAbility().addTarget(new TargetControlledCreaturePermanent(0, 2, new FilterControlledCreaturePermanent("creatures you control"), false));
|
||||
Effect effect = new ExileTargetForSourceEffect();
|
||||
effect.setText("Exile up to two target creatures you control");
|
||||
this.getSpellAbility().addEffect(effect);
|
||||
effect = new ReturnToBattlefieldUnderYourControlTargetEffect(true);
|
||||
effect.setText(", then return those cards to the battlefield under their owner's control");
|
||||
this.getSpellAbility().addEffect(effect);
|
||||
}
|
||||
|
||||
public Displace(final Displace card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Displace copy() {
|
||||
return new Displace(this);
|
||||
}
|
||||
}
|
63
Mage.Sets/src/mage/sets/eldritchmoon/DragUnder.java
Normal file
63
Mage.Sets/src/mage/sets/eldritchmoon/DragUnder.java
Normal file
|
@ -0,0 +1,63 @@
|
|||
/*
|
||||
* 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.eldritchmoon;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
||||
import mage.abilities.effects.common.ReturnToHandTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public class DragUnder extends CardImpl {
|
||||
|
||||
public DragUnder(UUID ownerId) {
|
||||
super(ownerId, 57, "Drag Under", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{2}{U}");
|
||||
this.expansionSetCode = "EMN";
|
||||
|
||||
// Return target creature to its owner's hand.
|
||||
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
|
||||
this.getSpellAbility().addEffect(new ReturnToHandTargetEffect());
|
||||
// Draw a card.
|
||||
this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(1));
|
||||
}
|
||||
|
||||
public DragUnder(final DragUnder card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DragUnder copy() {
|
||||
return new DragUnder(this);
|
||||
}
|
||||
}
|
63
Mage.Sets/src/mage/sets/eldritchmoon/EnlightenedManiac.java
Normal file
63
Mage.Sets/src/mage/sets/eldritchmoon/EnlightenedManiac.java
Normal file
|
@ -0,0 +1,63 @@
|
|||
/*
|
||||
* 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.eldritchmoon;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.effects.common.CreateTokenEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public class EnlightenedManiac extends CardImpl {
|
||||
|
||||
public EnlightenedManiac(UUID ownerId) {
|
||||
super(ownerId, 58, "Enlightened Maniac", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{3}{U}");
|
||||
this.expansionSetCode = "EMN";
|
||||
this.subtype.add("Human");
|
||||
this.power = new MageInt(0);
|
||||
this.toughness = new MageInt(2);
|
||||
|
||||
// When Enlightened Maniac enters the battlefield, put a 3/2 colorless Eldrazi Horror creature token onto the battlefield.
|
||||
this.addAbility(new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new EldraziHorrorToken()), false));
|
||||
}
|
||||
|
||||
public EnlightenedManiac(final EnlightenedManiac card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnlightenedManiac copy() {
|
||||
return new EnlightenedManiac(this);
|
||||
}
|
||||
}
|
|
@ -28,20 +28,13 @@
|
|||
package mage.sets.khansoftarkir;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageObject;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.dynamicvalue.common.StaticValue;
|
||||
import mage.abilities.effects.common.LookLibraryAndPickControllerEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.Cards;
|
||||
import mage.cards.CardsImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
import mage.target.TargetCard;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -53,9 +46,9 @@ public class TaigamsScheming extends CardImpl {
|
|||
super(ownerId, 57, "Taigam's Scheming", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{1}{U}");
|
||||
this.expansionSetCode = "KTK";
|
||||
|
||||
|
||||
// Look at the top five cards of your library. Put any number of them into your graveyard and the rest back on top of your library in any order
|
||||
this.getSpellAbility().addEffect(new TaigamsSchemingEffect());
|
||||
this.getSpellAbility().addEffect(new LookLibraryAndPickControllerEffect(new StaticValue(5), false, new StaticValue(5),
|
||||
new FilterCard("cards"), Zone.LIBRARY, true, false, true, Zone.GRAVEYARD, false));
|
||||
}
|
||||
|
||||
public TaigamsScheming(final TaigamsScheming card) {
|
||||
|
@ -67,51 +60,3 @@ public class TaigamsScheming extends CardImpl {
|
|||
return new TaigamsScheming(this);
|
||||
}
|
||||
}
|
||||
|
||||
class TaigamsSchemingEffect extends OneShotEffect {
|
||||
|
||||
public TaigamsSchemingEffect() {
|
||||
super(Outcome.Benefit);
|
||||
this.staticText = "Look at the top five cards of your library. Put any number of them into your graveyard and the rest back on top of your library in any order";
|
||||
}
|
||||
|
||||
public TaigamsSchemingEffect(final TaigamsSchemingEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TaigamsSchemingEffect copy() {
|
||||
return new TaigamsSchemingEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
MageObject sourceObject = game.getObject(source.getSourceId());
|
||||
if (controller != null && sourceObject != null) {
|
||||
boolean topCardRevealed = controller.isTopCardRevealed();
|
||||
controller.setTopCardRevealed(false);
|
||||
// get cards from top
|
||||
Cards cards = new CardsImpl();
|
||||
cards.addAll(controller.getLibrary().getTopCards(game, 5));
|
||||
if (!cards.isEmpty()) {
|
||||
controller.lookAtCards(sourceObject.getName(), cards, game);
|
||||
// pick cards going to graveyard
|
||||
TargetCard target = new TargetCard(0,cards.size(), Zone.LIBRARY, new FilterCard("cards to put into your graveyard"));
|
||||
if (controller.choose(Outcome.Detriment, cards, target, game)) {
|
||||
Cards cardsToGraveyard = new CardsImpl();
|
||||
cards.removeAll(target.getTargets());
|
||||
cardsToGraveyard.addAll(target.getTargets());
|
||||
controller.moveCards(cardsToGraveyard, Zone.LIBRARY, Zone.GRAVEYARD, source, game);
|
||||
}
|
||||
// The rest goes back to library in any order
|
||||
if (cards.size() > 0) {
|
||||
controller.putCardsOnTopOfLibrary(cards, game, source, true);
|
||||
}
|
||||
}
|
||||
controller.setTopCardRevealed(topCardRevealed);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -193,42 +193,40 @@ public class LookLibraryAndPickControllerEffect extends LookLibraryControllerEff
|
|||
if (revealPickedCards) {
|
||||
sb.append(". You may reveal ");
|
||||
sb.append(filter.getMessage()).append(" from among them and put it into your ");
|
||||
} else if (targetPickedCards.equals(Zone.BATTLEFIELD)) {
|
||||
sb.append(". You ");
|
||||
if (optional) {
|
||||
sb.append("may ");
|
||||
}
|
||||
sb.append("put ").append(filter.getMessage()).append(" from among them onto the ");
|
||||
} else {
|
||||
if (targetPickedCards.equals(Zone.BATTLEFIELD)) {
|
||||
sb.append(". You ");
|
||||
if (optional) {
|
||||
sb.append("may ");
|
||||
}
|
||||
sb.append("put ").append(filter.getMessage()).append(" from among them onto the ");
|
||||
} else {
|
||||
sb.append(". Put ");
|
||||
if (numberToPick.calculate(null, null, this) > 1) {
|
||||
if (upTo) {
|
||||
if (numberToPick.calculate(null, null, this) == (numberOfCards.calculate(null, null, this))) {
|
||||
sb.append("any number");
|
||||
} else {
|
||||
sb.append("up to ").append(CardUtil.numberToText(numberToPick.calculate(null, null, this)));
|
||||
}
|
||||
sb.append(". Put ");
|
||||
if (numberToPick.calculate(null, null, this) > 1) {
|
||||
if (upTo) {
|
||||
if (numberToPick.calculate(null, null, this) == (numberOfCards.calculate(null, null, this))) {
|
||||
sb.append("any number");
|
||||
} else {
|
||||
sb.append(CardUtil.numberToText(numberToPick.calculate(null, null, this)));
|
||||
sb.append("up to ").append(CardUtil.numberToText(numberToPick.calculate(null, null, this)));
|
||||
}
|
||||
} else {
|
||||
sb.append("one");
|
||||
sb.append(CardUtil.numberToText(numberToPick.calculate(null, null, this)));
|
||||
}
|
||||
|
||||
sb.append(" of them into your ");
|
||||
} else {
|
||||
sb.append("one");
|
||||
}
|
||||
|
||||
sb.append(" of them into your ");
|
||||
}
|
||||
sb.append(targetPickedCards.toString().toLowerCase());
|
||||
|
||||
if (targetZoneLookedCards == Zone.LIBRARY) {
|
||||
sb.append(". Put the rest ");
|
||||
if (putOnTop) {
|
||||
sb.append("back ");
|
||||
sb.append("back on top");
|
||||
} else {
|
||||
sb.append("on the bottom of your library ");
|
||||
sb.append("on the bottom");
|
||||
}
|
||||
sb.append("in any order");
|
||||
sb.append(" of your library in any order");
|
||||
} else if (targetZoneLookedCards == Zone.GRAVEYARD) {
|
||||
sb.append(" and the other into your graveyard");
|
||||
}
|
||||
|
|
|
@ -31,6 +31,8 @@ import java.util.UUID;
|
|||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.Cards;
|
||||
import mage.cards.CardsImpl;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Zone;
|
||||
import mage.game.ExileZone;
|
||||
|
@ -75,20 +77,24 @@ public class ReturnToBattlefieldUnderYourControlTargetEffect extends OneShotEffe
|
|||
public boolean apply(Game game, Ability source) {
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
if (controller != null) {
|
||||
Card card = null;
|
||||
Cards cardsToBattlefield = new CardsImpl();
|
||||
if (fromExileZone) {
|
||||
UUID exilZoneId = CardUtil.getExileZoneId(game, source.getSourceId(), source.getSourceObjectZoneChangeCounter());
|
||||
if (exilZoneId != null) {
|
||||
ExileZone exileZone = game.getExile().getExileZone(exilZoneId);
|
||||
if (exileZone != null && getTargetPointer().getFirst(game, source) != null) {
|
||||
card = exileZone.get(getTargetPointer().getFirst(game, source), game);
|
||||
if (exileZone != null) {
|
||||
for (Card card : exileZone.getCards(game)) {
|
||||
if (getTargetPointer().getTargets(game, source).contains(card.getId())) {
|
||||
cardsToBattlefield.add(card);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
card = game.getCard(getTargetPointer().getFirst(game, source));
|
||||
cardsToBattlefield.addAll(getTargetPointer().getTargets(game, source));
|
||||
}
|
||||
if (card != null) {
|
||||
controller.moveCards(card, Zone.BATTLEFIELD, source, game);
|
||||
if (!cardsToBattlefield.isEmpty()) {
|
||||
controller.moveCards(cardsToBattlefield, Zone.BATTLEFIELD, source, game);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue