From f8b81f7a520a03c891cea242d475597e161b99b7 Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Tue, 9 Jul 2013 16:08:43 +0200 Subject: [PATCH] [M14] Added 9 black cards. --- .../src/mage/deck/Commander.java | 2 +- .../mage/sets/magic2014/GaleriderSliver.java | 6 +- .../mage/sets/magic2014/LilianasReaver.java | 74 +++++++++++++ .../mage/sets/magic2014/LiturgyOfBlood.java | 65 +++++++++++ .../sets/magic2014/RiseOfTheDarkRealms.java | 100 +++++++++++++++++ .../sets/magic2014/ShadowbornApostle.java | 89 +++++++++++++++ .../mage/sets/magic2014/ShadowbornDemon.java | 101 ++++++++++++++++++ .../src/mage/sets/magic2014/SyphonSliver.java | 75 +++++++++++++ .../mage/sets/magic2014/TenaciousDead.java | 71 ++++++++++++ .../mage/sets/magic2014/VampireWarlord.java | 78 ++++++++++++++ .../sets/magic2014/XathridNecromancer.java | 82 ++++++++++++++ .../src/mage/sets/tenth/RelentlessRats.java | 4 + Mage/src/mage/cards/decks/Constructed.java | 2 +- 13 files changed, 743 insertions(+), 6 deletions(-) create mode 100644 Mage.Sets/src/mage/sets/magic2014/LilianasReaver.java create mode 100644 Mage.Sets/src/mage/sets/magic2014/LiturgyOfBlood.java create mode 100644 Mage.Sets/src/mage/sets/magic2014/RiseOfTheDarkRealms.java create mode 100644 Mage.Sets/src/mage/sets/magic2014/ShadowbornApostle.java create mode 100644 Mage.Sets/src/mage/sets/magic2014/ShadowbornDemon.java create mode 100644 Mage.Sets/src/mage/sets/magic2014/SyphonSliver.java create mode 100644 Mage.Sets/src/mage/sets/magic2014/TenaciousDead.java create mode 100644 Mage.Sets/src/mage/sets/magic2014/VampireWarlord.java create mode 100644 Mage.Sets/src/mage/sets/magic2014/XathridNecromancer.java diff --git a/Mage.Server.Plugins/Mage.Deck.Constructed/src/mage/deck/Commander.java b/Mage.Server.Plugins/Mage.Deck.Constructed/src/mage/deck/Commander.java index 2d6aa834e31..d143f70eb4f 100644 --- a/Mage.Server.Plugins/Mage.Deck.Constructed/src/mage/deck/Commander.java +++ b/Mage.Server.Plugins/Mage.Deck.Constructed/src/mage/deck/Commander.java @@ -118,7 +118,7 @@ public class Commander extends DeckValidator { countCards(counts, deck.getSideboard()); for (Map.Entry entry: counts.entrySet()) { if (entry.getValue() > 1) { - if (!basicLandNames.contains(entry.getKey()) && !entry.getKey().equals("Relentless Rats")) { + if (!basicLandNames.contains(entry.getKey()) && !entry.getKey().equals("Relentless Rats")&& !entry.getKey().equals("Shadowborn Apostle")) { invalid.put(entry.getKey(), "Too many: " + entry.getValue()); valid = false; } diff --git a/Mage.Sets/src/mage/sets/magic2014/GaleriderSliver.java b/Mage.Sets/src/mage/sets/magic2014/GaleriderSliver.java index 3889ad12e85..e50575c84a1 100644 --- a/Mage.Sets/src/mage/sets/magic2014/GaleriderSliver.java +++ b/Mage.Sets/src/mage/sets/magic2014/GaleriderSliver.java @@ -37,8 +37,7 @@ import mage.constants.CardType; import mage.constants.Duration; import mage.constants.Rarity; import mage.constants.Zone; -import mage.filter.FilterPermanent; -import mage.filter.predicate.mageobject.CardTypePredicate; +import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.SubtypePredicate; /** @@ -47,9 +46,8 @@ import mage.filter.predicate.mageobject.SubtypePredicate; */ public class GaleriderSliver extends CardImpl { - private static final FilterPermanent filter = new FilterPermanent("Sliver creatures"); + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Sliver creatures"); static { - filter.add(new CardTypePredicate(CardType.CREATURE)); filter.add(new SubtypePredicate("Sliver")); } diff --git a/Mage.Sets/src/mage/sets/magic2014/LilianasReaver.java b/Mage.Sets/src/mage/sets/magic2014/LilianasReaver.java new file mode 100644 index 00000000000..ffbcc860120 --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2014/LilianasReaver.java @@ -0,0 +1,74 @@ +/* + * 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.magic2014; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.DealsCombatDamageToAPlayerTriggeredAbility; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.effects.common.DiscardTargetEffect; +import mage.abilities.keyword.DeathtouchAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.game.permanent.token.ZombieToken; + +/** + * + * @author LevelX2 + */ +public class LilianasReaver extends CardImpl { + + public LilianasReaver(UUID ownerId) { + super(ownerId, 103, "Liliana's Reaver", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{2}{B}{B}"); + this.expansionSetCode = "M14"; + this.subtype.add("Zombie"); + + this.color.setBlack(true); + this.power = new MageInt(4); + this.toughness = new MageInt(3); + + // Deathtouch + this.addAbility(DeathtouchAbility.getInstance()); + // Whenever Liliana's Reaver deals combat damage to a player, that player discards a card and you put a 2/2 black Zombie creature token onto the battlefield tapped. + + Ability ability = new DealsCombatDamageToAPlayerTriggeredAbility(new DiscardTargetEffect(1),false, true); + ability.addEffect(new CreateTokenEffect(new ZombieToken(), 1, true, false)); + this.addAbility(ability); + } + + public LilianasReaver(final LilianasReaver card) { + super(card); + } + + @Override + public LilianasReaver copy() { + return new LilianasReaver(this); + } +} diff --git a/Mage.Sets/src/mage/sets/magic2014/LiturgyOfBlood.java b/Mage.Sets/src/mage/sets/magic2014/LiturgyOfBlood.java new file mode 100644 index 00000000000..423b6be2f21 --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2014/LiturgyOfBlood.java @@ -0,0 +1,65 @@ +/* + * 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.magic2014; + +import java.util.UUID; +import mage.Mana; +import mage.abilities.effects.common.BasicManaEffect; +import mage.abilities.effects.common.DestroyTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LevelX2 + */ +public class LiturgyOfBlood extends CardImpl { + + public LiturgyOfBlood(UUID ownerId) { + super(ownerId, 104, "Liturgy of Blood", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{3}{B}{B}"); + this.expansionSetCode = "M14"; + + this.color.setBlack(true); + + // Destroy target creature. Add {B}{B}{B} to your mana pool. + this.getSpellAbility().addEffect(new DestroyTargetEffect()); + this.getSpellAbility().addTarget(new TargetCreaturePermanent(true)); + this.getSpellAbility().addEffect(new BasicManaEffect(new Mana(0, 0, 0, 0, 3, 0, 0))); + } + + public LiturgyOfBlood(final LiturgyOfBlood card) { + super(card); + } + + @Override + public LiturgyOfBlood copy() { + return new LiturgyOfBlood(this); + } +} diff --git a/Mage.Sets/src/mage/sets/magic2014/RiseOfTheDarkRealms.java b/Mage.Sets/src/mage/sets/magic2014/RiseOfTheDarkRealms.java new file mode 100644 index 00000000000..7c2e189843b --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2014/RiseOfTheDarkRealms.java @@ -0,0 +1,100 @@ +/* + * 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.magic2014; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.effects.OneShotEffect; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.game.Game; +import mage.players.Player; + +/** + * + * @author LevelX2 + */ +public class RiseOfTheDarkRealms extends CardImpl { + + public RiseOfTheDarkRealms(UUID ownerId) { + super(ownerId, 111, "Rise of the Dark Realms", Rarity.MYTHIC, new CardType[]{CardType.SORCERY}, "{7}{B}{B}"); + this.expansionSetCode = "M14"; + + this.color.setBlack(true); + + // Put all creature cards from all graveyards onto the battlefield under your control. + this.getSpellAbility().addEffect(new RiseOfTheDarkRealmsEffect()); + } + + public RiseOfTheDarkRealms(final RiseOfTheDarkRealms card) { + super(card); + } + + @Override + public RiseOfTheDarkRealms copy() { + return new RiseOfTheDarkRealms(this); + } +} + +class RiseOfTheDarkRealmsEffect extends OneShotEffect { + + public RiseOfTheDarkRealmsEffect() { + super(Outcome.PutCreatureInPlay); + staticText = "Put all creature cards from all graveyards onto the battlefield under your control"; + } + + public RiseOfTheDarkRealmsEffect(final RiseOfTheDarkRealmsEffect effect) { + super(effect); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + for (UUID playerId: controller.getInRange()) { + Player player = game.getPlayer(playerId); + if (player != null) { + for (Card card: player.getGraveyard().getCards(game)) { + if (card.getCardType().contains(CardType.CREATURE)) { + card.putOntoBattlefield(game, Zone.GRAVEYARD, source.getSourceId(), source.getControllerId()); + } + } + } + } + return true; + } + + @Override + public RiseOfTheDarkRealmsEffect copy() { + return new RiseOfTheDarkRealmsEffect(this); + } + +} diff --git a/Mage.Sets/src/mage/sets/magic2014/ShadowbornApostle.java b/Mage.Sets/src/mage/sets/magic2014/ShadowbornApostle.java new file mode 100644 index 00000000000..2070af5b379 --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2014/ShadowbornApostle.java @@ -0,0 +1,89 @@ +/* + * 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.magic2014; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.SacrificeTargetCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.search.SearchLibraryPutInPlayEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.common.FilterControlledCreaturePermanent; +import mage.filter.common.FilterCreatureCard; +import mage.filter.predicate.mageobject.NamePredicate; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.target.common.TargetCardInLibrary; +import mage.target.common.TargetControlledCreaturePermanent; + +/** + * + * @author LevelX2 + */ +public class ShadowbornApostle extends CardImpl { + + private static final FilterCreatureCard filter = new FilterCreatureCard("a Demon creature"); + private static final FilterControlledCreaturePermanent filterApostle = new FilterControlledCreaturePermanent("six creatures named Shadowborn Apostle"); + static { + filter.add(new SubtypePredicate("Demon")); + filterApostle.add(new NamePredicate("Shadowborn Apostle")); + } + + public ShadowbornApostle(UUID ownerId) { + super(ownerId, 114, "Shadowborn Apostle", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{B}"); + this.expansionSetCode = "M14"; + this.subtype.add("Human"); + this.subtype.add("Cleric"); + + this.color.setBlack(true); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // A deck can have any number of cards named Shadowborn Apostle. + this.addInfo("rule", "A deck can have any number of cards named Shadowborn Apostle."); + // {B}, Sacrifice six creatures named Shadowborn Apostle: Search your library for a Demon creature and put it onto the battlefield. Then shuffle your library. + Effect effect = new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(filter), false, true); + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl("{B}")); + ability.addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent(6,6,filterApostle, false))); + this.addAbility(ability); + } + + public ShadowbornApostle(final ShadowbornApostle card) { + super(card); + } + + @Override + public ShadowbornApostle copy() { + return new ShadowbornApostle(this); + } +} diff --git a/Mage.Sets/src/mage/sets/magic2014/ShadowbornDemon.java b/Mage.Sets/src/mage/sets/magic2014/ShadowbornDemon.java new file mode 100644 index 00000000000..8c66ba42a47 --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2014/ShadowbornDemon.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.magic2014; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.TriggeredAbility; +import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.condition.common.CardsInControllerGraveCondition; +import mage.abilities.condition.common.InvertCondition; +import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.effects.common.DestroyTargetEffect; +import mage.abilities.effects.common.SacrificeTargetEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.TargetController; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.target.Target; +import mage.target.common.TargetControlledCreaturePermanent; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LevelX2 + */ +public class ShadowbornDemon extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("non-Demon creature"); + static { + filter.add(Predicates.not(new SubtypePredicate("Demon"))); + } + + public ShadowbornDemon(UUID ownerId) { + super(ownerId, 115, "Shadowborn Demon", Rarity.MYTHIC, new CardType[]{CardType.CREATURE}, "{3}{B}{B}"); + this.expansionSetCode = "M14"; + this.subtype.add("Demon"); + + this.color.setBlack(true); + this.power = new MageInt(5); + this.toughness = new MageInt(6); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + // When Shadowborn Demon enters the battlefield, destroy target non-Demon creature. + Ability ability = new EntersBattlefieldTriggeredAbility(new DestroyTargetEffect(),false); + Target target = new TargetCreaturePermanent(filter); + target.setRequired(true); + ability.addTarget(target); + this.addAbility(ability); + // At the beginning of your upkeep, if there are fewer than six creature cards in your graveyard, sacrifice a creature. + TriggeredAbility triggeredAbility = new BeginningOfUpkeepTriggeredAbility(new SacrificeTargetEffect(), TargetController.YOU, false); + target = new TargetControlledCreaturePermanent(true); + target.setNotTarget(false); + triggeredAbility.addTarget(target); + this.addAbility(new ConditionalTriggeredAbility( + triggeredAbility, + new InvertCondition(new CardsInControllerGraveCondition(6)), + "At the beginning of your upkeep, if there are fewer than six creature cards in your graveyard, sacrifice a creature")); + + } + + public ShadowbornDemon(final ShadowbornDemon card) { + super(card); + } + + @Override + public ShadowbornDemon copy() { + return new ShadowbornDemon(this); + } +} diff --git a/Mage.Sets/src/mage/sets/magic2014/SyphonSliver.java b/Mage.Sets/src/mage/sets/magic2014/SyphonSliver.java new file mode 100644 index 00000000000..eae2404984d --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2014/SyphonSliver.java @@ -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.magic2014; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.continious.GainAbilityControlledEffect; +import mage.abilities.keyword.LifelinkAbility; +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 LevelX2 + */ +public class SyphonSliver extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Sliver creatures"); + static { + filter.add(new SubtypePredicate("Sliver")); + } + + public SyphonSliver(UUID ownerId) { + super(ownerId, 117, "Syphon Sliver", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{2}{B}"); + this.expansionSetCode = "M14"; + this.subtype.add("Sliver"); + + this.color.setBlack(true); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Sliver creatures you control have lifelink. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityControlledEffect(LifelinkAbility.getInstance(), Duration.WhileOnBattlefield, filter))); + } + + public SyphonSliver(final SyphonSliver card) { + super(card); + } + + @Override + public SyphonSliver copy() { + return new SyphonSliver(this); + } +} diff --git a/Mage.Sets/src/mage/sets/magic2014/TenaciousDead.java b/Mage.Sets/src/mage/sets/magic2014/TenaciousDead.java new file mode 100644 index 00000000000..1e9064f5531 --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2014/TenaciousDead.java @@ -0,0 +1,71 @@ +/* + * 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.magic2014; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.DiesTriggeredAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.DoIfCostPaid; +import mage.abilities.effects.common.ReturnToBattlefieldUnderOwnerControlSourceEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; + +/** + * + * @author LevelX2 + */ +public class TenaciousDead extends CardImpl { + + public TenaciousDead(UUID ownerId) { + super(ownerId, 118, "Tenacious Dead", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{B}"); + this.expansionSetCode = "M14"; + this.subtype.add("Skeleton"); + this.subtype.add("Warrior"); + + this.color.setBlack(true); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // When Tenacious Dead dies, you may pay {1}{B}. If you do, return it to the battlefield tapped under its owner's control. + Effect effect = new DoIfCostPaid(new ReturnToBattlefieldUnderOwnerControlSourceEffect(), new ManaCostsImpl("{1}{B}")); + this.addAbility(new DiesTriggeredAbility(effect, false)); + + } + + public TenaciousDead(final TenaciousDead card) { + super(card); + } + + @Override + public TenaciousDead copy() { + return new TenaciousDead(this); + } +} diff --git a/Mage.Sets/src/mage/sets/magic2014/VampireWarlord.java b/Mage.Sets/src/mage/sets/magic2014/VampireWarlord.java new file mode 100644 index 00000000000..e5e074fa38a --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2014/VampireWarlord.java @@ -0,0 +1,78 @@ +/* + * 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.magic2014; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.SacrificeTargetCost; +import mage.abilities.effects.common.RegenerateSourceEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.common.FilterControlledCreaturePermanent; +import mage.filter.predicate.permanent.AnotherPredicate; +import mage.target.common.TargetControlledCreaturePermanent; + +/** + * + * @author LevelX2 + */ +public class VampireWarlord extends CardImpl { + + private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("another creature"); + static { + filter.add(new AnotherPredicate()); + } + + public VampireWarlord(UUID ownerId) { + super(ownerId, 120, "Vampire Warlord", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{4}{B}"); + this.expansionSetCode = "M14"; + this.subtype.add("Vampire"); + this.subtype.add("Warrior"); + + this.color.setBlack(true); + this.power = new MageInt(4); + this.toughness = new MageInt(2); + + // Sacrifice another creature: Regenerate Vampire Warlord. + TargetControlledCreaturePermanent target = new TargetControlledCreaturePermanent(1,1, filter, false); + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new RegenerateSourceEffect(), new SacrificeTargetCost(target))); + + } + + public VampireWarlord(final VampireWarlord card) { + super(card); + } + + @Override + public VampireWarlord copy() { + return new VampireWarlord(this); + } +} diff --git a/Mage.Sets/src/mage/sets/magic2014/XathridNecromancer.java b/Mage.Sets/src/mage/sets/magic2014/XathridNecromancer.java new file mode 100644 index 00000000000..e3b96d88537 --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2014/XathridNecromancer.java @@ -0,0 +1,82 @@ +/* + * 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.magic2014; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.DiesThisOrAnotherCreatureTriggeredAbility; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.TargetController; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.filter.predicate.permanent.ControllerPredicate; +import mage.game.permanent.token.ZombieToken; + +/** + * + * @author LevelX2 + */ +public class XathridNecromancer extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Human creature you control"); + static { + filter.add(new ControllerPredicate(TargetController.YOU)); + filter.add(new SubtypePredicate("Human")); + } + + public XathridNecromancer(UUID ownerId) { + super(ownerId, 123, "Xathrid Necromancer", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{2}{B}"); + this.expansionSetCode = "M14"; + this.subtype.add("Human"); + this.subtype.add("Wizard"); + + this.color.setBlack(true); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Whenever Xathrid Necromancer or another Human creature you control dies, put a 2/2 black Zombie creature token onto the battlefield tapped. + Effect effect = new CreateTokenEffect(new ZombieToken(), 1, true, false); + Ability ability = new DiesThisOrAnotherCreatureTriggeredAbility(effect, false, filter); + this.addAbility(ability); + + } + + public XathridNecromancer(final XathridNecromancer card) { + super(card); + } + + @Override + public XathridNecromancer copy() { + return new XathridNecromancer(this); + } +} diff --git a/Mage.Sets/src/mage/sets/tenth/RelentlessRats.java b/Mage.Sets/src/mage/sets/tenth/RelentlessRats.java index fb296fe2d8c..c78bb1a588f 100644 --- a/Mage.Sets/src/mage/sets/tenth/RelentlessRats.java +++ b/Mage.Sets/src/mage/sets/tenth/RelentlessRats.java @@ -66,7 +66,11 @@ public class RelentlessRats extends CardImpl { this.power = new MageInt(2); this.toughness = new MageInt(2); + // Relentless Rats gets +1/+1 for each other creature on the battlefield named Relentless Rats. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new RelentlessRatsEffect())); + + // A deck can have any number of cards named Relentless Rats. + this.addInfo("rule", "A deck can have any number of cards named Relentless Rats."); } public RelentlessRats(final RelentlessRats card) { diff --git a/Mage/src/mage/cards/decks/Constructed.java b/Mage/src/mage/cards/decks/Constructed.java index c494b486da6..29d8f655a51 100644 --- a/Mage/src/mage/cards/decks/Constructed.java +++ b/Mage/src/mage/cards/decks/Constructed.java @@ -76,7 +76,7 @@ public class Constructed extends DeckValidator { countCards(counts, deck.getSideboard()); for (Entry entry: counts.entrySet()) { if (entry.getValue() > 4) { - if (!basicLandNames.contains(entry.getKey()) && !entry.getKey().equals("Relentless Rats")) { + if (!basicLandNames.contains(entry.getKey()) && !entry.getKey().equals("Relentless Rats") && !entry.getKey().equals("Shadowborn Apostle")) { invalid.put(entry.getKey(), "Too many: " + entry.getValue()); valid = false; }