From f22e2c973c140b218b243353b5a67477e3b343af Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Tue, 9 Jul 2013 14:31:17 +0200 Subject: [PATCH] [M14] Added 5 black cards. --- .../src/mage/sets/magic2014/DarkProphecy.java | 74 +++++++++++++++ .../mage/sets/magic2014/FesteringNewt.java | 89 ++++++++++++++++++ .../mage/sets/magic2014/GnawingZombie.java | 76 +++++++++++++++ .../src/mage/sets/magic2014/GrimReturn.java | 93 +++++++++++++++++++ .../mage/sets/magic2014/LifebaneZombie.java | 84 +++++++++++++++++ 5 files changed, 416 insertions(+) create mode 100644 Mage.Sets/src/mage/sets/magic2014/DarkProphecy.java create mode 100644 Mage.Sets/src/mage/sets/magic2014/FesteringNewt.java create mode 100644 Mage.Sets/src/mage/sets/magic2014/GnawingZombie.java create mode 100644 Mage.Sets/src/mage/sets/magic2014/GrimReturn.java create mode 100644 Mage.Sets/src/mage/sets/magic2014/LifebaneZombie.java diff --git a/Mage.Sets/src/mage/sets/magic2014/DarkProphecy.java b/Mage.Sets/src/mage/sets/magic2014/DarkProphecy.java new file mode 100644 index 0000000000..67c11f5598 --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2014/DarkProphecy.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.abilities.Ability; +import mage.abilities.common.DiesCreatureTriggeredAbility; +import mage.abilities.effects.common.DrawCardControllerEffect; +import mage.abilities.effects.common.LoseLifeControllerEffect; +import mage.abilities.effects.common.LoseLifeSourceEffect; +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.permanent.ControllerPredicate; + +/** + * + * @author LevelX2 + */ +public class DarkProphecy extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("a creature you control"); + static { + filter.add(new ControllerPredicate(TargetController.YOU)); + } + + public DarkProphecy(UUID ownerId) { + super(ownerId, 93, "Dark Prophecy", Rarity.RARE, new CardType[]{CardType.ENCHANTMENT}, "{B}{B}{B}"); + this.expansionSetCode = "M14"; + + this.color.setBlack(true); + + // Whenever a creature you control dies, you draw a card and lose 1 life. + Ability ability = new DiesCreatureTriggeredAbility(new DrawCardControllerEffect(1), false, filter); + ability.addEffect(new LoseLifeSourceEffect(1)); + this.addAbility(ability); + } + + public DarkProphecy(final DarkProphecy card) { + super(card); + } + + @Override + public DarkProphecy copy() { + return new DarkProphecy(this); + } +} diff --git a/Mage.Sets/src/mage/sets/magic2014/FesteringNewt.java b/Mage.Sets/src/mage/sets/magic2014/FesteringNewt.java new file mode 100644 index 0000000000..0df00843f1 --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2014/FesteringNewt.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.DiesTriggeredAbility; +import mage.abilities.condition.common.ControlsPermanentCondition; +import mage.abilities.decorator.ConditionalContinousEffect; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.continious.BoostTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.TargetController; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.NamePredicate; +import mage.filter.predicate.permanent.ControllerPredicate; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LevelX2 + */ +public class FesteringNewt extends CardImpl { + + private static final FilterCreaturePermanent filterCreature = new FilterCreaturePermanent("creature an opponent controls"); + private static final FilterCreaturePermanent filterBogbrewWitch = new FilterCreaturePermanent(); + static { + filterCreature.add(new ControllerPredicate(TargetController.OPPONENT)); + filterBogbrewWitch.add(new NamePredicate("Bogbrew Witch")); + } + public FesteringNewt(UUID ownerId) { + super(ownerId, 98, "Festering Newt", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{B}"); + this.expansionSetCode = "M14"; + this.subtype.add("Salamander"); + + this.color.setBlack(true); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // When Festering Newt dies, target creature an opponent controls gets -1/-1 until end of turn. That creature gets -4/-4 instead if you control a creature named Bogbrew Witch. + Effect effect = new ConditionalContinousEffect( + new BoostTargetEffect(-4,-4, Duration.EndOfTurn), + new BoostTargetEffect(-1,-1, Duration.EndOfTurn), + new ControlsPermanentCondition(filterBogbrewWitch), + "target creature an opponent controls gets -1/-1 until end of turn. That creature gets -4/-4 instead if you control a creature named Bogbrew Witch", + true); + Ability ability = new DiesTriggeredAbility(effect); + ability.addTarget(new TargetCreaturePermanent(filterCreature)); + this.addAbility(ability); + } + + public FesteringNewt(final FesteringNewt card) { + super(card); + } + + @Override + public FesteringNewt copy() { + return new FesteringNewt(this); + } +} diff --git a/Mage.Sets/src/mage/sets/magic2014/GnawingZombie.java b/Mage.Sets/src/mage/sets/magic2014/GnawingZombie.java new file mode 100644 index 0000000000..dc58759d8f --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2014/GnawingZombie.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.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.common.GainLifeEffect; +import mage.abilities.effects.common.LoseLifeTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.target.TargetPlayer; +import mage.target.common.TargetControlledCreaturePermanent; + +/** + * + * @author LevelX2 + */ +public class GnawingZombie extends CardImpl { + + public GnawingZombie(UUID ownerId) { + super(ownerId, 99, "Gnawing Zombie", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{1}{B}"); + this.expansionSetCode = "M14"; + this.subtype.add("Zombie"); + + this.color.setBlack(true); + this.power = new MageInt(1); + this.toughness = new MageInt(3); + + // {1}{B}, Sacrifice a creature: Target player loses 1 life and you gain 1 life. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new LoseLifeTargetEffect(1), new ManaCostsImpl("{1}{B}")); + ability.addEffect(new GainLifeEffect(1)); + ability.addTarget(new TargetPlayer(true)); + ability.addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent())); + this.addAbility(ability); + } + + public GnawingZombie(final GnawingZombie card) { + super(card); + } + + @Override + public GnawingZombie copy() { + return new GnawingZombie(this); + } +} diff --git a/Mage.Sets/src/mage/sets/magic2014/GrimReturn.java b/Mage.Sets/src/mage/sets/magic2014/GrimReturn.java new file mode 100644 index 0000000000..f176b343e4 --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2014/GrimReturn.java @@ -0,0 +1,93 @@ +/* + * 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.ArrayList; +import java.util.List; +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.ReturnFromGraveyardToBattlefieldTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.FilterCard; +import mage.filter.common.FilterCreatureCard; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.CardIdPredicate; +import mage.game.Game; +import mage.target.common.TargetCardInGraveyard; +import mage.watchers.common.CardsPutIntoGraveyardWatcher; + +/** + * + * @author LevelX2 + */ +public class GrimReturn extends CardImpl { + + private static final String textFilter = "creature card in a graveyard that was put there from the battlefield this turn"; + + public GrimReturn(UUID ownerId) { + super(ownerId, 100, "Grim Return", Rarity.RARE, new CardType[]{CardType.INSTANT}, "{2}{B}"); + this.expansionSetCode = "M14"; + + this.color.setBlack(true); + + // Choose target creature card in a graveyard that was put there from the battlefield this turn. Put that card onto the battlefield under your control. + Effect effect = new ReturnFromGraveyardToBattlefieldTargetEffect(); + effect.setText("Choose target creature card in a graveyard that was put there from the battlefield this turn. Put that card onto the battlefield under your control"); + this.getSpellAbility().addEffect(new ReturnFromGraveyardToBattlefieldTargetEffect()); + this.getSpellAbility().addTarget(new TargetCardInGraveyard(new FilterCreatureCard(textFilter))); + this.addWatcher(new CardsPutIntoGraveyardWatcher()); + } + + public GrimReturn(final GrimReturn card) { + super(card); + } + + @Override + public GrimReturn copy() { + return new GrimReturn(this); + } + + @Override + public void adjustTargets(Ability ability, Game game) { + CardsPutIntoGraveyardWatcher watcher = (CardsPutIntoGraveyardWatcher) game.getState().getWatchers().get("CardsPutIntoGraveyardWatcher"); + if (watcher != null) { + FilterCard filter = new FilterCreatureCard(textFilter); + List uuidPredicates = new ArrayList(); + for (UUID uuid :watcher.getCardsPutToGraveyardFromBattlefield()) { + uuidPredicates.add(new CardIdPredicate(uuid)); + } + filter.add(Predicates.or(uuidPredicates)); + ability.getTargets().clear(); + ability.addTarget(new TargetCardInGraveyard(filter)); + } + + } +} diff --git a/Mage.Sets/src/mage/sets/magic2014/LifebaneZombie.java b/Mage.Sets/src/mage/sets/magic2014/LifebaneZombie.java new file mode 100644 index 0000000000..e2e0239996 --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2014/LifebaneZombie.java @@ -0,0 +1,84 @@ +/* + * 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.ObjectColor; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.common.ExileCardYouChooseTargetOpponentEffect; +import mage.abilities.keyword.IntimidateAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.common.FilterCreatureCard; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.ColorPredicate; +import mage.target.common.TargetOpponent; + +/** + * + * @author LevelX2 + */ +public class LifebaneZombie extends CardImpl { + + private static final FilterCreatureCard filter = new FilterCreatureCard("a green or white creature card"); + static { + filter.add(Predicates.or( + new ColorPredicate(ObjectColor.GREEN), + new ColorPredicate(ObjectColor.WHITE))); + } + + public LifebaneZombie(UUID ownerId) { + super(ownerId, 101, "Lifebane Zombie", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{1}{B}{B}"); + this.expansionSetCode = "M14"; + this.subtype.add("Zombie"); + this.subtype.add("Warrior"); + + this.color.setBlack(true); + this.power = new MageInt(3); + this.toughness = new MageInt(1); + + // Intimidate + this.addAbility(IntimidateAbility.getInstance()); + // When Lifebane Zombie enters the battlefield, target opponent reveals his or her hand. You choose a green or white creature card from it and exile that card. + Ability ability = new EntersBattlefieldTriggeredAbility(new ExileCardYouChooseTargetOpponentEffect(filter)); + ability.addTarget(new TargetOpponent()); + this.addAbility(ability); + } + + public LifebaneZombie(final LifebaneZombie card) { + super(card); + } + + @Override + public LifebaneZombie copy() { + return new LifebaneZombie(this); + } +}