[M15] Added 6 black cards.

This commit is contained in:
LevelX2 2014-07-09 22:01:22 +02:00
parent 9167261223
commit a89b900998
8 changed files with 578 additions and 7 deletions

View file

@ -28,6 +28,7 @@
package mage.sets.championsofkamigawa; package mage.sets.championsofkamigawa;
import java.util.UUID; import java.util.UUID;
import mage.MageObject;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.Outcome; import mage.constants.Outcome;
import mage.constants.Rarity; import mage.constants.Rarity;
@ -88,6 +89,7 @@ class CranialExtractionEffect extends OneShotEffect {
public boolean apply(Game game, Ability source) { public boolean apply(Game game, Ability source) {
Player player = game.getPlayer(targetPointer.getFirst(game, source)); Player player = game.getPlayer(targetPointer.getFirst(game, source));
Player controller = game.getPlayer(source.getControllerId()); Player controller = game.getPlayer(source.getControllerId());
MageObject sourceObject = game.getObject(source.getSourceId());
if (player != null && controller != null) { if (player != null && controller != null) {
Choice cardChoice = new ChoiceImpl(); Choice cardChoice = new ChoiceImpl();
cardChoice.setChoices(CardRepository.instance.getNonLandNames()); cardChoice.setChoices(CardRepository.instance.getNonLandNames());
@ -100,24 +102,24 @@ class CranialExtractionEffect extends OneShotEffect {
} }
String cardName = cardChoice.getChoice(); String cardName = cardChoice.getChoice();
game.informPlayers("CranialExtraction, named card: [" + cardName + "]"); game.informPlayers(sourceObject.getLogName() + ", named card: [" + cardName + "]");
for (Card card: player.getGraveyard().getCards(game)) { for (Card card: player.getGraveyard().getCards(game)) {
if (card.getName().equals(cardName)) { if (card.getName().equals(cardName)) {
card.moveToExile(null, "", source.getId(), game); controller.moveCardToExileWithInfo(card, null, "", source.getSourceId(), game, Zone.GRAVEYARD);
} }
} }
for (Card card: player.getHand().getCards(game)) { for (Card card: player.getHand().getCards(game)) {
if (card.getName().equals(cardName)) { if (card.getName().equals(cardName)) {
card.moveToExile(null, "", source.getId(), game); controller.moveCardToExileWithInfo(card, null, "", source.getSourceId(), game, Zone.HAND);
} }
} }
for (Card card: player.getLibrary().getCards(game)) { for (Card card: player.getLibrary().getCards(game)) {
if (card.getName().equals(cardName)) { if (card.getName().equals(cardName)) {
card.moveToExile(null, "", source.getId(), game); controller.moveCardToExileWithInfo(card, null, "", source.getSourceId(), game, Zone.LIBRARY);
} }
} }
controller.lookAtCards("CranialExtraction Hand", player.getHand(), game); controller.lookAtCards(sourceObject.getLogName() + " Hand", player.getHand(), game);
controller.lookAtCards("CranialExtraction Library", new CardsImpl(Zone.PICK, player.getLibrary().getCards(game)), game); controller.lookAtCards(sourceObject.getLogName() + " Library", new CardsImpl(Zone.PICK, player.getLibrary().getCards(game)), game);
player.shuffleLibrary(game); player.shuffleLibrary(game);
} }
return true; return true;

View file

@ -0,0 +1,87 @@
/*
* 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.magic2015;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.common.DamageTargetEffect;
import mage.abilities.effects.common.continious.BoostSourceWhileControlsEffect;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Rarity;
import mage.constants.Zone;
import mage.filter.FilterPermanent;
import mage.filter.predicate.mageobject.SubtypePredicate;
import mage.target.common.TargetCreatureOrPlayer;
/**
*
* @author LevelX2
*/
public class NightfireGiant extends CardImpl {
private static final FilterPermanent filter = new FilterPermanent("a Mountain");
static {
filter.add(new SubtypePredicate("Mountain"));
}
public NightfireGiant(UUID ownerId) {
super(ownerId, 109, "Nightfire Giant", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{4}{B}");
this.expansionSetCode = "M15";
this.subtype.add("Zombie");
this.subtype.add("Giant");
this.color.setBlack(true);
this.power = new MageInt(4);
this.toughness = new MageInt(3);
// Nightfire Giant gets +1/+1 as long as you control a Mountain.
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostSourceWhileControlsEffect(filter, 1, 1)));
// {4}{R}: Nightfire Giant deals 2 damage to target creature or player.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(2), new ManaCostsImpl("{4}{R}"));
ability.addTarget(new TargetCreatureOrPlayer());
this.addAbility(ability);
}
public NightfireGiant(final NightfireGiant card) {
super(card);
}
@Override
public NightfireGiant copy() {
return new NightfireGiant(this);
}
}

View file

@ -78,7 +78,7 @@ public class ParagonOfFierceDefiance extends CardImpl {
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostControlledEffect(1, 1, Duration.WhileOnBattlefield, filterCreatures, true))); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostControlledEffect(1, 1, Duration.WhileOnBattlefield, filterCreatures, true)));
// {R}, {T}: Another target red creature you control gains haste until end of turn. // {R}, {T}: Another target red creature you control gains haste until end of turn.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.EndOfTurn), new ManaCostsImpl("R")); Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.EndOfTurn), new ManaCostsImpl("{R}"));
ability.addCost(new TapSourceCost()); ability.addCost(new TapSourceCost());
ability.addTarget(new TargetControlledCreaturePermanent(filterCreature)); ability.addTarget(new TargetControlledCreaturePermanent(filterCreature));
this.addAbility(ability); this.addAbility(ability);

View file

@ -0,0 +1,95 @@
/*
* 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.magic2015;
import java.util.UUID;
import mage.MageInt;
import mage.ObjectColor;
import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.common.continious.BoostControlledEffect;
import mage.abilities.effects.common.continious.GainAbilityTargetEffect;
import mage.abilities.keyword.DeathtouchAbility;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Rarity;
import mage.constants.Zone;
import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.mageobject.ColorPredicate;
import mage.filter.predicate.permanent.AnotherPredicate;
import mage.target.common.TargetControlledCreaturePermanent;
/**
*
* @author LevelX2
*/
public class ParagonOfOpenGraves extends CardImpl {
private static final FilterCreaturePermanent filterCreatures = new FilterCreaturePermanent("black creatures");
private static final FilterControlledCreaturePermanent filterCreature = new FilterControlledCreaturePermanent("another target black creature you control");
static {
filterCreatures.add(new ColorPredicate(ObjectColor.BLACK));
filterCreature.add(new AnotherPredicate());
filterCreature.add(new ColorPredicate(ObjectColor.BLACK));
}
public ParagonOfOpenGraves(UUID ownerId) {
super(ownerId, 111, "Paragon of Open Graves", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{3}{B}");
this.expansionSetCode = "M15";
this.subtype.add("Skeleton");
this.subtype.add("Warrior");
this.color.setBlack(true);
this.power = new MageInt(2);
this.toughness = new MageInt(2);
// Other black creatures you control get +1/+1.
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostControlledEffect(1, 1, Duration.WhileOnBattlefield, filterCreatures, true)));
// {2}{B}, {T}: Another target black creature you control gains deathtouch until end of turn.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainAbilityTargetEffect(DeathtouchAbility.getInstance(), Duration.EndOfTurn), new ManaCostsImpl("{2}{B}"));
ability.addCost(new TapSourceCost());
ability.addTarget(new TargetControlledCreaturePermanent(filterCreature));
this.addAbility(ability);
}
public ParagonOfOpenGraves(final ParagonOfOpenGraves card) {
super(card);
}
@Override
public ParagonOfOpenGraves copy() {
return new ParagonOfOpenGraves(this);
}
}

View file

@ -0,0 +1,108 @@
/*
* 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.magic2015;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
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;
import mage.target.common.TargetCardInGraveyard;
/**
*
* @author LevelX2
*/
public class RotfeasterMaggot extends CardImpl {
public RotfeasterMaggot(UUID ownerId) {
super(ownerId, 112, "Rotfeaster Maggot", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{4}{B}");
this.expansionSetCode = "M15";
this.subtype.add("Insect");
this.color.setBlack(true);
this.power = new MageInt(3);
this.toughness = new MageInt(5);
// When Rotfeaster Maggot enters the battlefield, exile target creature card from a graveyard. You gain life equal to that card's toughness.
Ability ability = new EntersBattlefieldTriggeredAbility(new RotfeasterMaggotExileEffect(), false);
ability.addTarget(new TargetCardInGraveyard(new FilterCreatureCard("creature card from a graveyard")));
this.addAbility(ability);
}
public RotfeasterMaggot(final RotfeasterMaggot card) {
super(card);
}
@Override
public RotfeasterMaggot copy() {
return new RotfeasterMaggot(this);
}
}
class RotfeasterMaggotExileEffect extends OneShotEffect {
public RotfeasterMaggotExileEffect() {
super(Outcome.GainLife);
this.staticText = "exile target creature card from a graveyard. You gain life equal to that card's toughness";
}
public RotfeasterMaggotExileEffect(final RotfeasterMaggotExileEffect effect) {
super(effect);
}
@Override
public RotfeasterMaggotExileEffect copy() {
return new RotfeasterMaggotExileEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
Player controller = game.getPlayer(source.getControllerId());
if (controller != null) {
Card targetCard = game.getCard(getTargetPointer().getFirst(game, source));
if (targetCard != null) {
if (game.getState().getZone(targetCard.getId()).equals(Zone.GRAVEYARD)) {
controller.moveCardToExileWithInfo(targetCard, null, "", source.getSourceId(), game, Zone.GRAVEYARD);
}
controller.gainLife(targetCard.getToughness().getValue(), game);
return true;
}
}
return false;
}
}

View file

@ -0,0 +1,70 @@
/*
* 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.magic2015;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.PayLifeCost;
import mage.abilities.effects.common.continious.GainAbilitySourceEffect;
import mage.abilities.keyword.FlyingAbility;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Rarity;
import mage.constants.Zone;
/**
*
* @author LevelX2
*/
public class ShadowcloakVampire extends CardImpl {
public ShadowcloakVampire(UUID ownerId) {
super(ownerId, 113, "Shadowcloak Vampire", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{4}{B}");
this.expansionSetCode = "M15";
this.subtype.add("Vampire");
this.color.setBlack(true);
this.power = new MageInt(4);
this.toughness = new MageInt(3);
// Pay 2 life: Shadowcloak Vampire gains flying until end of turn.
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD,
new GainAbilitySourceEffect(FlyingAbility.getInstance(), Duration.EndOfTurn),new PayLifeCost(2)));
}
public ShadowcloakVampire(final ShadowcloakVampire card) {
super(card);
}
@Override
public ShadowcloakVampire copy() {
return new ShadowcloakVampire(this);
}
}

View file

@ -0,0 +1,83 @@
/*
* 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.magic2015;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.ExileSourceFromGraveCost;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.common.ReturnFromGraveyardToHandTargetEffect;
import mage.abilities.keyword.DeathtouchAbility;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Rarity;
import mage.constants.Zone;
import mage.filter.common.FilterCreatureCard;
import mage.target.common.TargetCardInYourGraveyard;
/**
*
* @author LevelX2
*/
public class SoulOfInnistrad extends CardImpl {
public SoulOfInnistrad(UUID ownerId) {
super(ownerId, 115, "Soul of Innistrad", Rarity.MYTHIC, new CardType[]{CardType.CREATURE}, "{4}{B}{B}");
this.expansionSetCode = "M15";
this.subtype.add("Avatar");
this.color.setBlack(true);
this.power = new MageInt(6);
this.toughness = new MageInt(6);
// Deathtouch
this.addAbility(DeathtouchAbility.getInstance());
// {3}{B}{B}: Return up to three target creature cards from your graveyard to your hand.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ReturnFromGraveyardToHandTargetEffect(), new ManaCostsImpl("{3}{B}{B}"));
ability.addTarget(new TargetCardInYourGraveyard(0, 3, new FilterCreatureCard("creature cards from your graveyard")));
this.addAbility(ability);
// {3}{B}{B}, Exile Soul of Innistrad from your graveyard: Return up to three target creature cards from your graveyard to your hand.
ability = new SimpleActivatedAbility(Zone.GRAVEYARD, new ReturnFromGraveyardToHandTargetEffect(), new ManaCostsImpl("{3}{B}{B}"));
ability.addCost(new ExileSourceFromGraveCost());
ability.addTarget(new TargetCardInYourGraveyard(0, 3, new FilterCreatureCard("creature cards from your graveyard")));
this.addAbility(ability);
}
public SoulOfInnistrad(final SoulOfInnistrad card) {
super(card);
}
@Override
public SoulOfInnistrad copy() {
return new SoulOfInnistrad(this);
}
}

View file

@ -0,0 +1,126 @@
/*
* 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.magic2015;
import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.Mode;
import mage.abilities.effects.common.search.SearchTargetGraveyardHandLibraryForCardNameAndExileEffect;
import mage.abilities.keyword.ConvokeAbility;
import mage.cards.Card;
import mage.cards.CardImpl;
import mage.cards.repository.CardRepository;
import mage.choices.Choice;
import mage.choices.ChoiceImpl;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.Rarity;
import mage.game.Game;
import mage.players.Player;
import mage.target.TargetPlayer;
/**
*
* @author LevelX2
*/
public class StainTheMind extends CardImpl {
public StainTheMind(UUID ownerId) {
super(ownerId, 117, "Stain the Mind", Rarity.RARE, new CardType[]{CardType.SORCERY}, "{4}{B}");
this.expansionSetCode = "M15";
this.color.setBlack(true);
// Convoke
this.addAbility(new ConvokeAbility());
// Name a nonland card. Search target player's graveyard, hand, and library for any number of card's with that name and exile them. Then that player shuffles his or her library.
this.getSpellAbility().addEffect(new StainTheMindEffect());
this.getSpellAbility().addTarget(new TargetPlayer());
}
public StainTheMind(final StainTheMind card) {
super(card);
}
@Override
public StainTheMind copy() {
return new StainTheMind(this);
}
}
class StainTheMindEffect extends SearchTargetGraveyardHandLibraryForCardNameAndExileEffect {
public StainTheMindEffect() {
super(true, "target player's","any number of cards with that name");
}
public StainTheMindEffect(final StainTheMindEffect effect) {
super(effect);
}
@Override
public boolean apply(Game game, Ability source) {
Player player = game.getPlayer(targetPointer.getFirst(game, source));
Player controller = game.getPlayer(source.getControllerId());
if (player != null && controller != null) {
Choice cardChoice = new ChoiceImpl();
cardChoice.setChoices(CardRepository.instance.getNonLandNames());
cardChoice.clearChoice();
cardChoice.setMessage("Name a nonland card");
while (!controller.choose(Outcome.Exile, cardChoice, game)) {
if (!controller.isInGame()) {
return false;
}
}
String cardName;
cardName = cardChoice.getChoice();
Card card = game.getCard(source.getSourceId());
if (card != null) {
game.informPlayers(card.getName()+"named card: [" + cardName + "]");
}
super.applySearchAndExile(game, source, cardName, player.getId());
}
return true;
}
@Override
public StainTheMindEffect copy() {
return new StainTheMindEffect(this);
}
@Override
public String getText(Mode mode) {
StringBuilder sb = new StringBuilder();
sb.append("Name a nonland card. ");
sb.append(super.getText(mode));
return sb.toString();
}
}