From 33ac32f5c46661a9d7e86dfb7b2fc264ce31d357 Mon Sep 17 00:00:00 2001 From: fireshoes Date: Thu, 30 Jun 2016 14:47:59 -0500 Subject: [PATCH] [EMN] Added additional 6/30 spoilers to mtg-cards-data.txt. Added some more cards. --- .../src/main/resources/card-pictures-tok.txt | 7 + .../src/main/resources/image.url.properties | 2 +- .../sets/eldritchmoon/EldritchEvolution.java | 126 +++++++++++++++ .../sets/eldritchmoon/EternalScourge.java | 144 ++++++++++++++++++ .../eldritchmoon/GeierReachSanitarium.java | 72 +++++++++ .../sets/eldritchmoon/GrappleWithThePast.java | 113 ++++++++++++++ .../sets/eldritchmoon/HarmlessOffering.java | 101 ++++++++++++ .../sets/eldritchmoon/LupinePrototype.java | 111 ++++++++++++++ .../src/mage/sets/eldritchmoon/Murder.java | 54 +++++++ .../sets/eldritchmoon/StromkirkCondemned.java | 76 +++++++++ .../sets/eldritchmoon/WharfInfiltrator.java | 134 ++++++++++++++++ .../sets/eldritchmoon/WhispersOfEmrakul.java | 72 +++++++++ .../mage/sets/newphyrexia/BirthingPod.java | 6 +- Utils/mtg-cards-data.txt | 9 +- 14 files changed, 1022 insertions(+), 5 deletions(-) create mode 100644 Mage.Sets/src/mage/sets/eldritchmoon/EldritchEvolution.java create mode 100644 Mage.Sets/src/mage/sets/eldritchmoon/EternalScourge.java create mode 100644 Mage.Sets/src/mage/sets/eldritchmoon/GeierReachSanitarium.java create mode 100644 Mage.Sets/src/mage/sets/eldritchmoon/GrappleWithThePast.java create mode 100644 Mage.Sets/src/mage/sets/eldritchmoon/HarmlessOffering.java create mode 100644 Mage.Sets/src/mage/sets/eldritchmoon/LupinePrototype.java create mode 100644 Mage.Sets/src/mage/sets/eldritchmoon/Murder.java create mode 100644 Mage.Sets/src/mage/sets/eldritchmoon/StromkirkCondemned.java create mode 100644 Mage.Sets/src/mage/sets/eldritchmoon/WharfInfiltrator.java create mode 100644 Mage.Sets/src/mage/sets/eldritchmoon/WhispersOfEmrakul.java diff --git a/Mage.Client/src/main/resources/card-pictures-tok.txt b/Mage.Client/src/main/resources/card-pictures-tok.txt index ef4e43c4f7a..58adc888964 100644 --- a/Mage.Client/src/main/resources/card-pictures-tok.txt +++ b/Mage.Client/src/main/resources/card-pictures-tok.txt @@ -1,3 +1,10 @@ +|Generate|TOK:SOI|Eldrazi Horror|| +|Generate|TOK:SOI|Human|| +|Generate|TOK:SOI|Human Wizard|| +|Generate|TOK:SOI|Spirit|| +|Generate|TOK:SOI|Zombie|1| +|Generate|TOK:SOI|Zombie|2| + |Generate|TOK:SOI|Angel|| |Generate|TOK:SOI|Clue|1| |Generate|TOK:SOI|Clue|2| diff --git a/Mage.Client/src/main/resources/image.url.properties b/Mage.Client/src/main/resources/image.url.properties index 624d3560b2f..04519c58167 100644 --- a/Mage.Client/src/main/resources/image.url.properties +++ b/Mage.Client/src/main/resources/image.url.properties @@ -64,6 +64,6 @@ ddd=gvl unh=uh dde=pvc # Remove setname as soon as the images can be downloaded -ignore.urls=TOK,AER,PCA,C16,V16,KLD,DDR,CN2,EMN +ignore.urls=TOK,AER,PCA,C16,V16,KLD,DDR,CN2 # sets ordered by release time (newest goes first) token.lookup.order=AER,PCA,C16,V16,KLD,DDR,CN2,EMN,EMA,SOI,DDQ,CP,CMA,ARENA,SUS,APAC,EURO,UGIN,C15,OGW,EXP,DDP,BFZ,FVD,FVE,FVL,FVR,V12,V13,V14,V15,TPR,MPRP,DD3,DDO,ORI,MM2,PTC,DTK,FRF,KTK,M15,VMA,CNS,JOU,BNG,THS,DDL,M14,MMA,DGM,GTC,RTR,M13,AVR,DDI,DKA,ISD,M12,NPH,MBS,SOM,M11,ROE,DDE,WWK,ZEN,M10,GVL,ARB,DVD,CFX,JVC,ALA,EVE,SHM,EVG,MOR,LRW,10E,CLS,CHK,GRC \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/eldritchmoon/EldritchEvolution.java b/Mage.Sets/src/mage/sets/eldritchmoon/EldritchEvolution.java new file mode 100644 index 00000000000..cbd6a39a47d --- /dev/null +++ b/Mage.Sets/src/mage/sets/eldritchmoon/EldritchEvolution.java @@ -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.eldritchmoon; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.costs.Cost; +import mage.abilities.costs.common.SacrificeTargetCost; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.ExileSpellEffect; +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.Filter; +import mage.filter.FilterCard; +import mage.filter.predicate.mageobject.CardTypePredicate; +import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; +import mage.target.common.TargetCardInLibrary; +import mage.target.common.TargetControlledCreaturePermanent; + +/** + * + * @author fireshoes + */ +public class EldritchEvolution extends CardImpl { + + public EldritchEvolution(UUID ownerId) { + super(ownerId, 155, "Eldritch Evolution", Rarity.RARE, new CardType[]{CardType.SORCERY}, "{1}{G}{G}"); + this.expansionSetCode = "EMN"; + + // As an additional cost to cast Eldritch Evolution, sacrifice a creature. + this.getSpellAbility().addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent())); + + // Search your library for a creature card with converted mana cost X or less, where X is 2 plus the sacrificed creature's converted mana cost. + // Put that card onto the battlefield, then shuffle your library. Exile Eldritch Evolution. + this.getSpellAbility().addEffect(new EldritchEvolutionEffect()); + this.getSpellAbility().addEffect(ExileSpellEffect.getInstance()); + } + + public EldritchEvolution(final EldritchEvolution card) { + super(card); + } + + @Override + public EldritchEvolution copy() { + return new EldritchEvolution(this); + } +} + +class EldritchEvolutionEffect extends OneShotEffect { + + EldritchEvolutionEffect() { + super(Outcome.Benefit); + staticText = "Search your library for a creature card with converted mana cost X or less, where X is 2 plus the sacrificed creature's converted mana cost. Put that card " + + "onto the battlefield, then shuffle your library"; + } + + EldritchEvolutionEffect(final EldritchEvolutionEffect effect) { + super(effect); + } + + @Override + public boolean apply(Game game, Ability source) { + Permanent sacrificedPermanent = null; + for (Cost cost : source.getCosts()) { + if (cost instanceof SacrificeTargetCost) { + SacrificeTargetCost sacrificeCost = (SacrificeTargetCost) cost; + if (sacrificeCost.getPermanents().size() > 0) { + sacrificedPermanent = sacrificeCost.getPermanents().get(0); + } + break; + } + } + Player controller = game.getPlayer(source.getControllerId()); + if (sacrificedPermanent != null && controller != null) { + int newConvertedCost = sacrificedPermanent.getConvertedManaCost() + 2; + FilterCard filter = new FilterCard("creature card with converted mana cost " + newConvertedCost + "or less"); + filter.add(new ConvertedManaCostPredicate(Filter.ComparisonType.LessThan, newConvertedCost+1)); + filter.add(new CardTypePredicate(CardType.CREATURE)); + TargetCardInLibrary target = new TargetCardInLibrary(filter); + if (controller.searchLibrary(target, game)) { + Card card = controller.getLibrary().getCard(target.getFirstTarget(), game); + controller.moveCards(card, Zone.BATTLEFIELD, source, game); + } + controller.shuffleLibrary(source, game); + return true; + } + return false; + } + + @Override + public EldritchEvolutionEffect copy() { + return new EldritchEvolutionEffect(this); + } +} diff --git a/Mage.Sets/src/mage/sets/eldritchmoon/EternalScourge.java b/Mage.Sets/src/mage/sets/eldritchmoon/EternalScourge.java new file mode 100644 index 00000000000..9a3ab333606 --- /dev/null +++ b/Mage.Sets/src/mage/sets/eldritchmoon/EternalScourge.java @@ -0,0 +1,144 @@ +/* + * 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.TriggeredAbilityImpl; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.AsThoughEffectImpl; +import mage.abilities.effects.common.ExileSourceEffect; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.constants.AsThoughEffectType; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.game.events.GameEvent.EventType; + +/** + * + * @author fireshoes + */ +public class EternalScourge extends CardImpl { + + public EternalScourge(UUID ownerId) { + super(ownerId, 7, "Eternal Scourge", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{3}"); + this.expansionSetCode = "EMN"; + this.subtype.add("Eldrazi"); + this.subtype.add("Horror"); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // You may cast Eternal Scourge from exile. + this.addAbility(new SimpleStaticAbility(Zone.EXILED, new EternalScourgePlayEffect())); + + // When Eternal Scourge becomes the target of a spell or ability an opponent controls, exile it. + this.addAbility(new EternalScourgeAbility()); + } + + public EternalScourge(final EternalScourge card) { + super(card); + } + + @Override + public EternalScourge copy() { + return new EternalScourge(this); + } +} + +class EternalScourgePlayEffect extends AsThoughEffectImpl { + + public EternalScourgePlayEffect() { + super(AsThoughEffectType.PLAY_FROM_NOT_OWN_HAND_ZONE, Duration.EndOfGame, Outcome.Benefit); + staticText = "You may cast {this} from exile"; + } + + public EternalScourgePlayEffect(final EternalScourgePlayEffect effect) { + super(effect); + } + + @Override + public boolean apply(Game game, Ability source) { + return true; + } + + @Override + public EternalScourgePlayEffect copy() { + return new EternalScourgePlayEffect(this); + } + + @Override + public boolean applies(UUID sourceId, Ability source, UUID affectedControllerId, Game game) { + if (sourceId.equals(source.getSourceId())) { + Card card = game.getCard(source.getSourceId()); + if (card != null && card.getOwnerId().equals(source.getControllerId()) && game.getState().getZone(source.getSourceId()) == Zone.EXILED) { + return true; + } + } + return false; + } +} +class EternalScourgeAbility extends TriggeredAbilityImpl { + + public EternalScourgeAbility() { + super(Zone.BATTLEFIELD, new ExileSourceEffect(), false); + } + + public EternalScourgeAbility(final EternalScourgeAbility ability) { + super(ability); + } + + @Override + public EternalScourgeAbility copy() { + return new EternalScourgeAbility(this); + } + + @Override + public boolean checkEventType(GameEvent event, Game game) { + return event.getType() == EventType.TARGETED; + } + + @Override + public boolean checkTrigger(GameEvent event, Game game) { + if (event.getTargetId().equals(this.getSourceId()) && game.getOpponents(this.controllerId).contains(event.getPlayerId())) { + return true; + } + return false; + } + + @Override + public String getRule() { + return "Whenever {this} becomes the target of a spell or ability an opponent controls, exile it."; + } +} diff --git a/Mage.Sets/src/mage/sets/eldritchmoon/GeierReachSanitarium.java b/Mage.Sets/src/mage/sets/eldritchmoon/GeierReachSanitarium.java new file mode 100644 index 00000000000..84e493f7388 --- /dev/null +++ b/Mage.Sets/src/mage/sets/eldritchmoon/GeierReachSanitarium.java @@ -0,0 +1,72 @@ +/* + * 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.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.effects.common.DrawCardAllEffect; +import mage.abilities.effects.common.discard.DiscardEachPlayerEffect; +import mage.abilities.mana.ColorlessManaAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; + +/** + * + * @author fireshoes + */ +public class GeierReachSanitarium extends CardImpl { + + public GeierReachSanitarium(UUID ownerId) { + super(ownerId, 203, "Geier Reach Sanitarium", Rarity.RARE, new CardType[]{CardType.LAND}, ""); + this.expansionSetCode = "EMN"; + this.supertype.add("Legendary"); + + // {T}: Add {C} to your mana pool. + this.addAbility(new ColorlessManaAbility()); + + // {2}, {T}: Each player draws a card, then discards a card. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DrawCardAllEffect(1), new GenericManaCost(2)); + ability.addEffect(new DiscardEachPlayerEffect()); + ability.addCost(new TapSourceCost()); + this.addAbility(ability); + } + + public GeierReachSanitarium(final GeierReachSanitarium card) { + super(card); + } + + @Override + public GeierReachSanitarium copy() { + return new GeierReachSanitarium(this); + } +} diff --git a/Mage.Sets/src/mage/sets/eldritchmoon/GrappleWithThePast.java b/Mage.Sets/src/mage/sets/eldritchmoon/GrappleWithThePast.java new file mode 100644 index 00000000000..6611af15349 --- /dev/null +++ b/Mage.Sets/src/mage/sets/eldritchmoon/GrappleWithThePast.java @@ -0,0 +1,113 @@ +/* + * 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.Ability; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.PutTopCardOfLibraryIntoGraveControllerEffect; +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.FilterCard; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.CardTypePredicate; +import mage.game.Game; +import mage.players.Player; +import mage.target.common.TargetCardInYourGraveyard; + +/** + * + * @author fireshoes + */ +public class GrappleWithThePast extends CardImpl { + + public GrappleWithThePast(UUID ownerId) { + super(ownerId, 160, "Grapple with the Past", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{1}{G}"); + this.expansionSetCode = "EMN"; + + // Put the top three cards of your library into your graveyard, then you may return a creature or land card from your graveyard to your hand. + getSpellAbility().addEffect(new PutTopCardOfLibraryIntoGraveControllerEffect(3)); + getSpellAbility().addEffect(new GrappleWithThePastEffect()); + } + + public GrappleWithThePast(final GrappleWithThePast card) { + super(card); + } + + @Override + public GrappleWithThePast copy() { + return new GrappleWithThePast(this); + } +} + +class GrappleWithThePastEffect extends OneShotEffect { + + private static final FilterCard filter = new FilterCard("creature or land card from your graveyard"); + + static { + filter.add(Predicates.or(new CardTypePredicate(CardType.CREATURE), + new CardTypePredicate(CardType.LAND))); + } + + public GrappleWithThePastEffect() { + super(Outcome.ReturnToHand); + this.staticText = ", then you may return a creature or land card from your graveyard to your hand"; + } + + public GrappleWithThePastEffect(final GrappleWithThePastEffect effect) { + super(effect); + } + + @Override + public GrappleWithThePastEffect copy() { + return new GrappleWithThePastEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + if (controller == null) { + return false; + } + TargetCardInYourGraveyard target = new TargetCardInYourGraveyard(filter); + target.setNotTarget(true); + if (target.canChoose(source.getSourceId(), source.getControllerId(), game) + && controller.chooseUse(outcome, "Return a creature or land card from your graveyard to hand?", source, game) + && controller.choose(Outcome.ReturnToHand, target, source.getSourceId(), game)) { + Card card = game.getCard(target.getFirstTarget()); + if (card != null) { + controller.moveCards(card, Zone.HAND, source, game); + } + } + return true; + } +} diff --git a/Mage.Sets/src/mage/sets/eldritchmoon/HarmlessOffering.java b/Mage.Sets/src/mage/sets/eldritchmoon/HarmlessOffering.java new file mode 100644 index 00000000000..29e762c3b12 --- /dev/null +++ b/Mage.Sets/src/mage/sets/eldritchmoon/HarmlessOffering.java @@ -0,0 +1,101 @@ +/* + * 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.Ability; +import mage.abilities.effects.ContinuousEffectImpl; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Layer; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.SubLayer; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; +import mage.target.common.TargetControlledPermanent; +import mage.target.common.TargetOpponent; + +/** + * + * @author fireshoes + */ +public class HarmlessOffering extends CardImpl { + + public HarmlessOffering(UUID ownerId) { + super(ownerId, 131, "Harmless Offering", Rarity.RARE, new CardType[]{CardType.SORCERY}, "{2}{R}"); + this.expansionSetCode = "EMN"; + + // Target opponent gains control of target permanent you control. + this.getSpellAbility().addEffect(new HarmlessOfferingEffect()); + this.getSpellAbility().addTarget(new TargetOpponent()); + this.getSpellAbility().addTarget(new TargetControlledPermanent()); + } + + public HarmlessOffering(final HarmlessOffering card) { + super(card); + } + + @Override + public HarmlessOffering copy() { + return new HarmlessOffering(this); + } +} + +class HarmlessOfferingEffect extends ContinuousEffectImpl { + + public HarmlessOfferingEffect() { + super(Duration.EndOfGame, Layer.ControlChangingEffects_2, SubLayer.NA, Outcome.Benefit); + this.staticText = "Target opponent gains control of target permanent you control"; + } + + public HarmlessOfferingEffect(final HarmlessOfferingEffect effect) { + super(effect); + } + + @Override + public HarmlessOfferingEffect copy() { + return new HarmlessOfferingEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + UUID controllerId = source.getTargets().get(0).getFirstTarget(); + Player controller = game.getPlayer(controllerId); + Permanent permanent = game.getPermanent(source.getTargets().get(1).getFirstTarget()); + if (controller != null && permanent != null) { + permanent.changeControllerId(controllerId, game); + } else { + this.discard(); + } + return true; + } + +} diff --git a/Mage.Sets/src/mage/sets/eldritchmoon/LupinePrototype.java b/Mage.Sets/src/mage/sets/eldritchmoon/LupinePrototype.java new file mode 100644 index 00000000000..29bebabd2cf --- /dev/null +++ b/Mage.Sets/src/mage/sets/eldritchmoon/LupinePrototype.java @@ -0,0 +1,111 @@ +/* + * 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.SimpleStaticAbility; +import mage.abilities.effects.RestrictionEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; + +/** + * + * @author fireshoes + */ +public class LupinePrototype extends CardImpl { + + public LupinePrototype(UUID ownerId) { + super(ownerId, 197, "Lupine Prototype", Rarity.RARE, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{2}"); + this.expansionSetCode = "EMN"; + this.subtype.add("Wolf"); + this.subtype.add("Construct"); + this.power = new MageInt(5); + this.toughness = new MageInt(5); + + // Lupine Prototype can't attack or block unless a player has no cards in hand. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new LupinePrototypeEffect())); + } + + public LupinePrototype(final LupinePrototype card) { + super(card); + } + + @Override + public LupinePrototype copy() { + return new LupinePrototype(this); + } +} + +class LupinePrototypeEffect extends RestrictionEffect { + + public LupinePrototypeEffect() { + super(Duration.WhileOnBattlefield); + staticText = "{this} can't attack or block unless a player has no cards in hand"; + } + + public LupinePrototypeEffect(final LupinePrototypeEffect effect) { + super(effect); + } + + @Override + public boolean applies(Permanent permanent, Ability source, Game game) { + if (permanent.getId().equals(source.getSourceId())) { + for (Player player : game.getPlayers().values()) { + if (player != null && player.getHand().isEmpty()) { + return false; + } + } + return true; + } + // don't apply for all other creatures! + return false; + } + + @Override + public boolean canBlock(Permanent attacker, Permanent blocker, Ability source, Game game) { + return false; + } + + @Override + public boolean canAttack(Game game) { + return false; + } + + @Override + public LupinePrototypeEffect copy() { + return new LupinePrototypeEffect(this); + } +} diff --git a/Mage.Sets/src/mage/sets/eldritchmoon/Murder.java b/Mage.Sets/src/mage/sets/eldritchmoon/Murder.java new file mode 100644 index 00000000000..6ac17032fae --- /dev/null +++ b/Mage.Sets/src/mage/sets/eldritchmoon/Murder.java @@ -0,0 +1,54 @@ +/* + * 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.constants.Rarity; + +/** + * + * @author fireshoes + */ +public class Murder extends mage.sets.magic2013.Murder { + + public Murder(UUID ownerId) { + super(ownerId); + this.cardNumber = 97; + this.expansionSetCode = "EMN"; + this.rarity = Rarity.UNCOMMON; + } + + public Murder(final Murder card) { + super(card); + } + + @Override + public Murder copy() { + return new Murder(this); + } +} diff --git a/Mage.Sets/src/mage/sets/eldritchmoon/StromkirkCondemned.java b/Mage.Sets/src/mage/sets/eldritchmoon/StromkirkCondemned.java new file mode 100644 index 00000000000..3faaa6213b3 --- /dev/null +++ b/Mage.Sets/src/mage/sets/eldritchmoon/StromkirkCondemned.java @@ -0,0 +1,76 @@ +/* + * 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.LimitedTimesPerTurnActivatedAbility; +import mage.abilities.costs.common.DiscardCardCost; +import mage.abilities.effects.common.continuous.BoostAllEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; + +/** + * + * @author fireshoes + */ +public class StromkirkCondemned extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Vampires"); + + static { + filter.add(new SubtypePredicate("Vampire")); + } + + public StromkirkCondemned(UUID ownerId) { + super(ownerId, 105, "Stromkirk Condemned", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{B}{B}"); + this.expansionSetCode = "EMN"; + this.subtype.add("Vampire"); + this.subtype.add("Horror"); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Discard a card: Vampires you control get +1/+1 until end of turn. Activate this ability only once each turn. + this.addAbility(new LimitedTimesPerTurnActivatedAbility(Zone.BATTLEFIELD, new BoostAllEffect(1, 1, Duration.EndOfTurn, filter, false), new DiscardCardCost())); + + } + + public StromkirkCondemned(final StromkirkCondemned card) { + super(card); + } + + @Override + public StromkirkCondemned copy() { + return new StromkirkCondemned(this); + } +} diff --git a/Mage.Sets/src/mage/sets/eldritchmoon/WharfInfiltrator.java b/Mage.Sets/src/mage/sets/eldritchmoon/WharfInfiltrator.java new file mode 100644 index 00000000000..28cf6f4790a --- /dev/null +++ b/Mage.Sets/src/mage/sets/eldritchmoon/WharfInfiltrator.java @@ -0,0 +1,134 @@ +/* + * 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.TriggeredAbilityImpl; +import mage.abilities.common.DealsCombatDamageToAPlayerTriggeredAbility; +import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.effects.common.DoIfCostPaid; +import mage.abilities.effects.common.DrawDiscardControllerEffect; +import mage.abilities.keyword.SkulkAbility; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.game.events.GameEvent.EventType; +import mage.game.permanent.token.Token; + +/** + * + * @author fireshoes + */ +public class WharfInfiltrator extends CardImpl { + + public WharfInfiltrator(UUID ownerId) { + super(ownerId, 80, "Wharf Infiltrator", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{1}{U}"); + this.expansionSetCode = "EMN"; + this.subtype.add("Eldrazi"); + this.subtype.add("Horror"); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // Skulk + this.addAbility(new SkulkAbility()); + + // Whenever Wharf Infiltrator deals combat damage to a player, you may draw a card. If you do, discard a card. + Effect effect = new DrawDiscardControllerEffect(); + effect.setText("you may draw a card. If you do, discard a card"); + this.addAbility(new DealsCombatDamageToAPlayerTriggeredAbility(effect, true)); + + // Whenever you discard a creature card, you may pay {2}. If you do, put a 3/2 colorless Eldrazi Horror creature token onto the battlefield. + effect = new CreateTokenEffect(new EldraziHorrorToken()); + effect.setText("put a 3/2 colorless Eldrazi Horror creature token onto the battlefield"); + DoIfCostPaid doIfCostPaid = new DoIfCostPaid(effect, new GenericManaCost(2)); + this.addAbility(new WharfInfiltratorDiscardAbility(doIfCostPaid)); + } + + public WharfInfiltrator(final WharfInfiltrator card) { + super(card); + } + + @Override + public WharfInfiltrator copy() { + return new WharfInfiltrator(this); + } +} + +class WharfInfiltratorDiscardAbility extends TriggeredAbilityImpl { + + WharfInfiltratorDiscardAbility(Effect effect) { + super(Zone.BATTLEFIELD, effect, false); + } + + WharfInfiltratorDiscardAbility(final WharfInfiltratorDiscardAbility ability) { + super(ability); + } + + @Override + public WharfInfiltratorDiscardAbility copy() { + return new WharfInfiltratorDiscardAbility(this); + } + + @Override + public boolean checkEventType(GameEvent event, Game game) { + return event.getType() == EventType.DISCARDED_CARD; + } + + @Override + public boolean checkTrigger(GameEvent event, Game game) { + Card card = game.getCard(event.getTargetId()); + if (getControllerId().equals(event.getPlayerId()) && card != null && card.getCardType().contains(CardType.CREATURE)) { + return true; + } + return false; + } + + @Override + public String getRule() { + return "Whenever you discard a creature card, " + super.getRule(); + } +} + +class EldraziHorrorToken extends Token { + + public EldraziHorrorToken() { + super("Eldrazi Horror", "3/2 colorless Eldrazi Horror creature token"); + cardType.add(CardType.CREATURE); + subtype.add("Eldrazi"); + subtype.add("Horror"); + power = new MageInt(3); + toughness = new MageInt(2); + } +} diff --git a/Mage.Sets/src/mage/sets/eldritchmoon/WhispersOfEmrakul.java b/Mage.Sets/src/mage/sets/eldritchmoon/WhispersOfEmrakul.java new file mode 100644 index 00000000000..0b6900ab251 --- /dev/null +++ b/Mage.Sets/src/mage/sets/eldritchmoon/WhispersOfEmrakul.java @@ -0,0 +1,72 @@ +/* + * 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.condition.InvertCondition; +import mage.abilities.condition.common.DeliriumCondition; +import mage.abilities.decorator.ConditionalOneShotEffect; +import mage.abilities.effects.common.discard.DiscardTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.target.common.TargetOpponent; + +/** + * + * @author fireshoes + */ +public class WhispersOfEmrakul extends CardImpl { + + public WhispersOfEmrakul(UUID ownerId) { + super(ownerId, 114, "Whispers of Emrakul", Rarity.UNCOMMON, new CardType[]{CardType.SORCERY}, "{1}{B}"); + this.expansionSetCode = "EMN"; + + // Target opponent discards a card at random. + this.getSpellAbility().addEffect(new ConditionalOneShotEffect( + new DiscardTargetEffect(1, true), + new InvertCondition(DeliriumCondition.getInstance()), + "Target player sacrifices a creature or planeswalker.")); + + // Delirium — If there are four or more card types among cards in your graveyard, that player discards two cards at random instead. + this.getSpellAbility().addEffect(new ConditionalOneShotEffect( + new DiscardTargetEffect(2, true), + DeliriumCondition.getInstance(), + "
Delirium — If there are four or more card types among cards in your graveyard, that player discards two cards at random instead")); + this.getSpellAbility().addTarget(new TargetOpponent()); + } + + public WhispersOfEmrakul(final WhispersOfEmrakul card) { + super(card); + } + + @Override + public WhispersOfEmrakul copy() { + return new WhispersOfEmrakul(this); + } +} diff --git a/Mage.Sets/src/mage/sets/newphyrexia/BirthingPod.java b/Mage.Sets/src/mage/sets/newphyrexia/BirthingPod.java index 4f0d641cc67..64874931397 100644 --- a/Mage.Sets/src/mage/sets/newphyrexia/BirthingPod.java +++ b/Mage.Sets/src/mage/sets/newphyrexia/BirthingPod.java @@ -60,7 +60,8 @@ public class BirthingPod extends CardImpl { super(ownerId, 104, "Birthing Pod", Rarity.RARE, new CardType[]{CardType.ARTIFACT}, "{3}{GP}"); this.expansionSetCode = "NPH"; - // {1}{GP}, {tap}, Sacrifice a creature: Search your library for a creature card with converted mana cost equal to 1 plus the sacrificed creature's converted mana cost, put that card onto the battlefield, then shuffle your library. Activate this ability only any time you could cast a sorcery. + // {1}{GP}, {tap}, Sacrifice a creature: Search your library for a creature card with converted mana cost equal to 1 plus the sacrificed creature's converted mana cost, + // put that card onto the battlefield, then shuffle your library. Activate this ability only any time you could cast a sorcery. Ability ability = new ActivateAsSorceryActivatedAbility(Zone.BATTLEFIELD, new BirthingPodEffect(), new ManaCostsImpl("{1}{GP}")); ability.addCost(new TapSourceCost()); ability.addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent())); @@ -81,7 +82,8 @@ class BirthingPodEffect extends OneShotEffect { BirthingPodEffect() { super(Outcome.Benefit); - staticText = "Search your library for a creature card with converted mana cost equal to 1 plus the sacrificed creature's converted mana cost, put that card onto the battlefield, then shuffle your library"; + staticText = "Search your library for a creature card with converted mana cost equal to 1 plus the sacrificed creature's converted mana cost, put that card " + + "onto the battlefield, then shuffle your library"; } BirthingPodEffect(final BirthingPodEffect effect) { diff --git a/Utils/mtg-cards-data.txt b/Utils/mtg-cards-data.txt index cf681d73a3c..521f31a5c72 100644 --- a/Utils/mtg-cards-data.txt +++ b/Utils/mtg-cards-data.txt @@ -57298,6 +57298,7 @@ Walking Corpse|Welcome Deck 2016|10|C|{1}{B}|Creature - Zombie|2|2|| Decimator of the Provinces|Eldritch Moon|2|M|{10}|Creature - Eldrazi Boar|7|7|Emerge {6}{G}{G}{G} ((You may cast this spell by sacrificing a creature and paying the emerge cost reduced by that creature's converted mana cost)$When you cast Decimator of the Provinces, creatures you control get +2/+2 and gain trample until end of turn.$Haste, trample| Elder Deep-Fiend|Eldritch Moon|5|R|{8}|Creature - Eldrazi Octopus|5|6|Flash$Emerge {5}{U}{U} (You may cast this spell by sacrificing a creature and paying the emerge cost reduced by that creature's converted mana cost)$When you cast Elder Deep-Fiend, tap up to four target permanents.| Emrakul, the Promised End|Eldritch Moon|6|M|{13}|Legendary Creature - Eldrazi|13|13|Emrakul, the Promised End costs {1} less to cast for each card type among cards in your graveyard.$When you cast Emrakul, you gain control of target opponent during that player's next turn. After that turn, that player takes an extra turn.$Flying, trample, protection from instants| +Eternal Scourge|Eldritch Moon|7|R|{3}|Creature - Eldrazi Horror|3|3|You may cast Eternal Scourge from exile.$When Eternal Scourge becomes the target of a spell or ability an opponent controls, exile it.| Wretched Gryff|Eldritch Moon|12|C|{7}|Creature - Eldrazi Hippogriff|3|4|Emerge {5}{U} (You may cast this spell by sacrificing a creature and paying the emerge cost reduced by that creature's converted mana cost.)$When you cast Wretched Gryff, draw a card.$Flying| Blessed Alliance|Eldritch Moon|13|U|{1}{W}|Instant|||Escalate {2} (Pay this cost for each mode chosen beyond the first.)$Choose one or more &mdash Target player gains 4 life. Untap up to two target creatures. Target opponent sacrifices an attacking creature.| Bruna, the Fading Light|Eldritch Moon|15|R|{5}{W}{W}|Legendary Creature - Angel Horror|5|7|When you cast Bruna, the Fading Light, you may return target Angel or Human creature card from your graveyard to the battlefield.$Flying, vigilance$(Melds with Gisela, the Broken Blade.)| @@ -57323,16 +57324,18 @@ Ingenious Skaab|Eldritch Moon|66|C|{2}{U}|Creature - Zombie Horror|2|3|Prowess < Niblis of Frost|Eldritch Moon|72|R|{2}{U}{U}|Creature - Spirit|3|3|Flying$Prowess (Whenever you cast a noncreature spell, this creature gets +1/+1 until end of turn.)$Whenever you cast an instant or sorcery spell, tap target creature an opponent controls. That creature doesn't untap during its controller's next untap step.| Take Inventory|Eldritch Moon|76|C|{1}{U}|Sorcery|||Draw a card, then draw cards equal to the number of cards named Take Inventory in your graveyard.| Unsubstantiate|Eldritch Moon|79|U|{1}{U}|Instant|||Return target spell or creature to its owner's hand.| -Wharf Infiltrator|Eldritch Moon|80|R|{1}{U}|Creature - Human Horror|1|1|Skulk (This creature can't be blocked by creatures with greater power.)$Whenever Wharf Infiltrator deals combat damage to a player, you may draw card. If you do, discard a card.$Whenever you discard a creature card, you may pay {2}. If you do, put a 3/2 colorless Eldrazi Horror creature token onto the battlefield.| +Wharf Infiltrator|Eldritch Moon|80|R|{1}{U}|Creature - Human Horror|1|1|Skulk (This creature can't be blocked by creatures with greater power.)$Whenever Wharf Infiltrator deals combat damage to a player, you may draw a card. If you do, discard a card.$Whenever you discard a creature card, you may pay {2}. If you do, put a 3/2 colorless Eldrazi Horror creature token onto the battlefield.| Borrowed Malevolence|Eldritch Moon|82|C|{B}|Instant|||Escalate {2} (Pay this cost for each mode chosen beyond the first.)$Choose one or both &mdash Target creature gets +1/+1 until end of turn. Target creature gets -1/-1 until end of turn.| Cemetery Recruitment|Eldritch Moon|83|C|{1}{B}|Sorcery|||Return target creature card from your graveyard to your hand. If it's a Zombie card, draw a card.| Graf Rats|Eldritch Moon|91|C|{1}{B}|Creature - Rat|2|1|At the beginning of combat on your turn, if you both own and control Graf Rats and a creature named Midnight Scavengers, exile them, then meld them into Chittering Host.| Haunted Dead|Eldritch Moon|92|U|{3}{B}|Creature - Zombie|2|2|When Haunted Dead enters the battlefield, put a 1/1 white Spirit creature token with flying onto the battlefield.${1}{B}, Discard two cards: Return Haunted Dead from your graveyard to the battlefield tapped.| Midnight Scavengers|Eldritch Moon|96|C|{4}{B}|Creature - Human Rogue|3|3|When Midnight Scavengers enters the battlefield, you may return target creature card with converted mana cost 3 or less from your graveyard to your hand.$(Melds with Graf Rats.)| +Murder|Eldritch Moon|97|U|{1}{B}{B}|Instant|||Destroy target creature.| Noosegraf Mob|Eldritch Moon|98|R|{4}{B}{B}|Creature - Zombie|0|0|Noosegraf Mob enters the battlefield with five +1/+1 counters on it.$Whenever a player casts a spell, remove a +1/+1 counter from Noosegraf Mob. If you do, put a 2/2 black Zombie creature token onto the battlefield.| Stromkirk Condemned|Eldritch Moon|105|R|{B}{B}|Creature - Vampire Horror|2|2|Discard a card: Vampires you control get +1/+1 until end of turn. Activate this ability only once each turn.| Voldaren Pariah|Eldritch Moon|111|R|{3}{B}{B}|Creature - Vampire Horror|3|3|Flying$Sacrifice three other creatures: Transform Voldaren Pariah.$Madness {B}{B}{B} (If you discard this card, discard it into exile. When you do, cast it for its madness cost or put it into your graveyard.)| Abolisher of Bloodlines|Eldritch Moon|111|R||Creature - Eldrazi Vampire|6|5|Flying$When this creature transforms into Abolisher of Bloodlines, target opponent sacrifices three creatures.| +Whispers of Emrakul|Eldritch Moon|114|U|{1}{B}|Sorcery|||Target opponent discards a card at random.$Delirium — If there are four or more card types among cards in your graveyard, that player discards two cards at random instead.| Assembled Alphas|Eldritch Moon|117|R|{5}{R}|Creature - Wolf|5|5|Whenever Assembled Alphas blocks or becomes blocked by a creature, Assembled Alphas deals 3 damage to that creature and 3 damage to that creature's controller.| Galvanic Bombardment|Eldritch Moon|129|C|{R}|Instant|||Galvanic Bombardment deals X damage to target creature, where X is 2 plus the number of cards named Galvanic Bombardment in your graveyard.| Hanweir Garrison|Eldritch Moon|130|R|{2}{R}|Creature - Human Soldier|2|3|Whenever Hanweir Garrison attacks, put two 1/1 red Human creature tokens onto the battlefield tapped and attacking.$(Melds with Hanweir Battlements.)| @@ -57345,6 +57348,7 @@ Dronepack Kindred|Eldritch Moon|148|C||Creature - Eldrazi Werewolf|5|7|Trample${ Eldritch Evolution|Eldritch Moon|155|R|{1}{G}{G}|Sorcery|||As an additional cost to cast Eldritch Evolution, sacrifice a creature.$Search your library for a creature card with converted mana cost X or less, where X is 2 plus the sacrificed creature's converted mana cost. Put that card onto the battlefield, then shuffle your library. Exile Eldritch Evolution.| Emrakul's Influence|Eldritch Moon|157|U|{2}{G}{G}|Enchantment|||Whenever you cast an Eldrazi creature spell with converted mana cost 7 or greater, draw two cards.| Gnarlwood Dryad|Eldritch Moon|159|U|{G}|Creature - Dryad Horror|1|1|Deathtouch$Delirium &mdash Gnarlwood Dryad gets +2/+2 as long as there are four or more card types among cards in your graveyard.| +Grapple with the Past|Eldritch Moon|160|C|{1}{G}|Instant|||Put the top three cards of your library into your graveyard, then you may return a creature or land card from your graveyard to your hand.| Kessig Prowler|Eldritch Moon|163|U|{G}|Creature - Werewolf Horror|2|1|{4}{G}: Transform Kessig Prowler.| Sinous Predator|Eldritch Moon|163|U||Creature - Eldrazi Werewolf|4|4|Sinous Predator can't be blocked by more than one creature.| Ulvenwald Observer|Eldritch Moon|176|R|{4}{G}{G}|Creature - Treefolk|6|6|Whenever a creature you control with toughness 4 or greater dies, draw a card.| @@ -57354,7 +57358,8 @@ Ulrich of the Krallenhorde|Eldritch Moon|191|M|{3}{R}{G}|Legendary Creature - Hu Ulrich, Uncontested Alpha|Eldritch Moon|191|M||Legendary Creature - Werewolf|6|6|Whenever this creature transforms into Ulrich, Uncontested Alpha, you may have it fight target non-Werewolf creature you don't control.$At the beginning of each upkeep, if a player cast two or more spells last turn, transform Ulrich, Uncontested Alpha.| Cryptolith Fragment|Eldritch Moon|193|U|{3}|Artifact|||Cryptolith Fragment enters the battlefield tapped.${T}: Add one mana of any color to your mana pool. Each player loses 1 life.$At the beginning of your upkeep, if each player has 10 or less life, transform Cryptolith Fragment.| Aurora of Emrakul|Eldritch Moon|193|U||Creature - Eldrazi Reflection|1|4|Flying, deathtouch$Whenever Aurora of Emrakul attacks, each opponent loses 3 life.| +Lupine Prototype|Eldritch Moon|197|R|{2}|Artifact Creature - Wolf Construct|5|5|Lupine Prototype can't attack or block unless a player has no cards in hand.| Soul Separator|Eldritch Moon|199|R|{3}|Artifact|||{5}, {T}, Sacrifice Soul Separator: Exile target creature card from your graveyard. Put a token onto the battlefield that's a copy of that card except it's 1/1, it's a Spirit in addition to its other types, and it has flying. Put a black Zombie creature token onto the battlefield with power equal to that card's power and toughness equal that card's toughness.| Stitcher's Graft|Eldritch Moon|200|R|{1}|Artifact - Equipment|||Equipped creature gets +3/+3.$Whenever equipped creature attacks, it doesn't untap during its controller's next untap step.$Whenever Stitcher's Graft becomes unequipped from a creature, sacrifice that creature.$Equip {2}| -Geier Reach Sanitarium|Eldritch Moon|203||Legendary Land|||{T}: Add {C} to your mana pool.${2}, {T}: Each player draws a card, then discards a card.| +Geier Reach Sanitarium|Eldritch Moon|203|R||Legendary Land|||{T}: Add {C} to your mana pool.${2}, {T}: Each player draws a card, then discards a card.| Hanweir Battlements|Eldritch Moon|204|R||Land|||{T}: Add {C} to your mana pool.${R},{T}: Target creature gains haste until end of turn.${3}{R}{R},{T}: If you both own and control Hanweir Battlements and a creature named Hanweir Garrison, exile them, then meld them into Hanweir, the Writhing Township.| \ No newline at end of file