From 462acf2b2f4ffd8c74521564dbaeac30e4c00760 Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Sat, 22 Jun 2013 01:58:03 +0200 Subject: [PATCH] [MMA] Added 3 cards. --- .../src/mage/sets/eventide/WormHarvest.java | 84 +++++++++++++ .../mage/sets/futuresight/GrinningIgnus.java | 54 ++++++++ .../mage/sets/futuresight/Riftsweeper.java | 52 ++++++++ .../sets/modernmasters/GrinningIgnus.java | 71 +++++++++++ .../mage/sets/modernmasters/Riftsweeper.java | 115 ++++++++++++++++++ .../mage/sets/modernmasters/WormHarvest.java | 54 ++++++++ 6 files changed, 430 insertions(+) create mode 100644 Mage.Sets/src/mage/sets/eventide/WormHarvest.java create mode 100644 Mage.Sets/src/mage/sets/futuresight/GrinningIgnus.java create mode 100644 Mage.Sets/src/mage/sets/futuresight/Riftsweeper.java create mode 100644 Mage.Sets/src/mage/sets/modernmasters/GrinningIgnus.java create mode 100644 Mage.Sets/src/mage/sets/modernmasters/Riftsweeper.java create mode 100644 Mage.Sets/src/mage/sets/modernmasters/WormHarvest.java diff --git a/Mage.Sets/src/mage/sets/eventide/WormHarvest.java b/Mage.Sets/src/mage/sets/eventide/WormHarvest.java new file mode 100644 index 00000000000..53fdabcc2c9 --- /dev/null +++ b/Mage.Sets/src/mage/sets/eventide/WormHarvest.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.eventide; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.dynamicvalue.common.CardsInControllerGraveyardCount; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.keyword.RetraceAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.TimingRule; +import mage.filter.common.FilterLandCard; +import mage.game.permanent.token.Token; + +/** + * + * @author LevelX2 + */ +public class WormHarvest extends CardImpl { + + public WormHarvest(UUID ownerId) { + super(ownerId, 131, "Worm Harvest", Rarity.RARE, new CardType[]{CardType.SORCERY}, "{2}{B/G}{B/G}{B/G}"); + this.expansionSetCode = "EVE"; + + this.color.setGreen(true); + this.color.setBlack(true); + + // Put a 1/1 black and green Worm creature token onto the battlefield for each land card in your graveyard. + CardsInControllerGraveyardCount value = new CardsInControllerGraveyardCount(new FilterLandCard()); + this.getSpellAbility().addEffect(new CreateTokenEffect(new WormHarvestToken(), value)); + + // Retrace + this.addAbility(new RetraceAbility(new ManaCostsImpl("{2}{B/G}{B/G}{B/G}"), TimingRule.SORCERY)); + } + + public WormHarvest(final WormHarvest card) { + super(card); + } + + @Override + public WormHarvest copy() { + return new WormHarvest(this); + } +} + +class WormHarvestToken extends Token { + WormHarvestToken() { + super("Worm", "1/1 black and green Worm creature token"); + cardType.add(CardType.CREATURE); + color.setBlack(true); + color.setGreen(true); + subtype.add("Worm"); + power = new MageInt(1); + toughness = new MageInt(1); + } +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/futuresight/GrinningIgnus.java b/Mage.Sets/src/mage/sets/futuresight/GrinningIgnus.java new file mode 100644 index 00000000000..2d8c4e2cadc --- /dev/null +++ b/Mage.Sets/src/mage/sets/futuresight/GrinningIgnus.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.futuresight; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author LevelX2 + */ +public class GrinningIgnus extends mage.sets.modernmasters.GrinningIgnus { + + public GrinningIgnus(UUID ownerId) { + super(ownerId); + this.cardNumber = 116; + this.expansionSetCode = "FUT"; + this.rarity = Rarity.COMMON; + } + + public GrinningIgnus(final GrinningIgnus card) { + super(card); + } + + @Override + public GrinningIgnus copy() { + return new GrinningIgnus(this); + } +} diff --git a/Mage.Sets/src/mage/sets/futuresight/Riftsweeper.java b/Mage.Sets/src/mage/sets/futuresight/Riftsweeper.java new file mode 100644 index 00000000000..45a5ed4621b --- /dev/null +++ b/Mage.Sets/src/mage/sets/futuresight/Riftsweeper.java @@ -0,0 +1,52 @@ +/* + * 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.futuresight; + +import java.util.UUID; + +/** + * + * @author LevelX2 + */ +public class Riftsweeper extends mage.sets.modernmasters.Riftsweeper { + + public Riftsweeper(UUID ownerId) { + super(ownerId); + this.cardNumber = 136; + this.expansionSetCode = "FUT"; + } + + public Riftsweeper(final Riftsweeper card) { + super(card); + } + + @Override + public Riftsweeper copy() { + return new Riftsweeper(this); + } +} diff --git a/Mage.Sets/src/mage/sets/modernmasters/GrinningIgnus.java b/Mage.Sets/src/mage/sets/modernmasters/GrinningIgnus.java new file mode 100644 index 00000000000..b4750ab5f61 --- /dev/null +++ b/Mage.Sets/src/mage/sets/modernmasters/GrinningIgnus.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.modernmasters; + +import java.util.UUID; +import mage.MageInt; +import mage.Mana; +import mage.abilities.Ability; +import mage.abilities.costs.common.ReturnToHandSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.mana.ActivateAsSorceryManaAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; + +/** + * + * @author LevelX2 + */ +public class GrinningIgnus extends CardImpl { + + public GrinningIgnus(UUID ownerId) { + super(ownerId, 118, "Grinning Ignus", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{2}{R}"); + this.expansionSetCode = "MMA"; + this.subtype.add("Elemental"); + + this.color.setRed(true); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // {R}, Return Grinning Ignus to its owner's hand: Add {2}{R} to your mana pool. Activate this ability only any time you could cast a sorcery. + Ability ability = new ActivateAsSorceryManaAbility(Zone.BATTLEFIELD, new Mana(1, 0, 0, 0, 0, 2, 0), new ManaCostsImpl("{R}")); + ability.addCost(new ReturnToHandSourceCost()); + this.addAbility(ability); + } + + public GrinningIgnus(final GrinningIgnus card) { + super(card); + } + + @Override + public GrinningIgnus copy() { + return new GrinningIgnus(this); + } +} diff --git a/Mage.Sets/src/mage/sets/modernmasters/Riftsweeper.java b/Mage.Sets/src/mage/sets/modernmasters/Riftsweeper.java new file mode 100644 index 00000000000..3f23cce82a6 --- /dev/null +++ b/Mage.Sets/src/mage/sets/modernmasters/Riftsweeper.java @@ -0,0 +1,115 @@ +/* + * 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.modernmasters; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.keyword.HauntAbility; +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.other.FaceDownPredicate; +import mage.game.Game; +import mage.target.common.TargetCardInExile; + +/** + * + * @author LevelX2 + */ +public class Riftsweeper extends CardImpl { + + private static final FilterCard filter = new FilterCard("face-up exiled card"); + static { + filter.add(Predicates.not(new FaceDownPredicate())); + } + + public Riftsweeper(UUID ownerId) { + super(ownerId, 159, "Riftsweeper", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{1}{G}"); + this.expansionSetCode = "MMA"; + this.subtype.add("Elf"); + this.subtype.add("Shaman"); + + this.color.setGreen(true); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // When Riftsweeper enters the battlefield, choose target face-up exiled card. Its owner shuffles it into his or her library. + Ability ability = new EntersBattlefieldTriggeredAbility(new RiftsweeperEffect(), false); + ability.addTarget(new TargetCardInExile(1, 1, filter, null, true)); + this.addAbility(ability); + } + + public Riftsweeper(final Riftsweeper card) { + super(card); + } + + @Override + public Riftsweeper copy() { + return new Riftsweeper(this); + } +} + +class RiftsweeperEffect extends OneShotEffect { + + public RiftsweeperEffect() { + super(Outcome.Benefit); + this.staticText = "choose target face-up exiled card. Its owner shuffles it into his or her library"; + } + + public RiftsweeperEffect(final RiftsweeperEffect effect) { + super(effect); + } + + @Override + public RiftsweeperEffect copy() { + return new RiftsweeperEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Card card = game.getCard(targetPointer.getFirst(game, source)); + if (card != null) { + // remove exiting suspend counters + card.getCounters().clear(); + // move to exile + card.moveToZone(Zone.LIBRARY, source.getSourceId(), game, true); + game.getState().getPlayer(card.getOwnerId()).getLibrary().shuffle(); + game.informPlayers(new StringBuilder("Riftsweeper: Choosen card was ").append(card.getName()).toString()); + return true; + } + return false; + } +} diff --git a/Mage.Sets/src/mage/sets/modernmasters/WormHarvest.java b/Mage.Sets/src/mage/sets/modernmasters/WormHarvest.java new file mode 100644 index 00000000000..e158a312d52 --- /dev/null +++ b/Mage.Sets/src/mage/sets/modernmasters/WormHarvest.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.modernmasters; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author LevelX2 + */ +public class WormHarvest extends mage.sets.eventide.WormHarvest { + + public WormHarvest(UUID ownerId) { + super(ownerId); + this.cardNumber = 195; + this.expansionSetCode = "MMA"; + this.rarity = Rarity.UNCOMMON; + } + + public WormHarvest(final WormHarvest card) { + super(card); + } + + @Override + public WormHarvest copy() { + return new WormHarvest(this); + } +}