From 08c5a7521f17ab22bf3f402d0989af603f39dfd7 Mon Sep 17 00:00:00 2001 From: Loki Date: Tue, 14 Jun 2011 01:01:53 +0300 Subject: [PATCH] cards --- .../src/mage/sets/newphyrexia/VaporSnag.java | 101 ++++++++++++++++++ .../mage/sets/planechase/KorSanctifiers.java | 55 ++++++++++ .../mage/sets/riseoftheeldrazi/AllIsDust.java | 97 +++++++++++++++++ .../riseoftheeldrazi/ArtisanofKozilek.java | 70 ++++++++++++ .../mage/sets/zendikar/KorSanctifiers.java | 81 ++++++++++++++ 5 files changed, 404 insertions(+) create mode 100644 Mage.Sets/src/mage/sets/newphyrexia/VaporSnag.java create mode 100644 Mage.Sets/src/mage/sets/planechase/KorSanctifiers.java create mode 100644 Mage.Sets/src/mage/sets/riseoftheeldrazi/AllIsDust.java create mode 100644 Mage.Sets/src/mage/sets/riseoftheeldrazi/ArtisanofKozilek.java create mode 100644 Mage.Sets/src/mage/sets/zendikar/KorSanctifiers.java diff --git a/Mage.Sets/src/mage/sets/newphyrexia/VaporSnag.java b/Mage.Sets/src/mage/sets/newphyrexia/VaporSnag.java new file mode 100644 index 0000000000..01e13137dc --- /dev/null +++ b/Mage.Sets/src/mage/sets/newphyrexia/VaporSnag.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.newphyrexia; + +import java.util.UUID; + +import mage.Constants; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.abilities.Ability; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.ReturnToHandTargetEffect; +import mage.cards.CardImpl; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author Loki + */ +public class VaporSnag extends CardImpl { + + public VaporSnag (UUID ownerId) { + super(ownerId, 48, "Vapor Snag", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{U}"); + this.expansionSetCode = "NPH"; + this.color.setBlue(true); + this.getSpellAbility().addEffect(new ReturnToHandTargetEffect()); + this.getSpellAbility().addEffect(new VaporSnagEffect()); + this.getSpellAbility().addTarget(new TargetCreaturePermanent()); + } + + public VaporSnag (final VaporSnag card) { + super(card); + } + + @Override + public VaporSnag copy() { + return new VaporSnag(this); + } +} + +class VaporSnagEffect extends OneShotEffect { + VaporSnagEffect() { + super(Constants.Outcome.Damage); + } + + VaporSnagEffect(final VaporSnagEffect effect) { + super(effect); + } + + @Override + public boolean apply(Game game, Ability source) { + Permanent p = (Permanent) game.getLastKnownInformation(targetPointer.getFirst(source), Constants.Zone.BATTLEFIELD); + if (p != null) { + Player controller = game.getPlayer(p.getControllerId()); + if (controller != null) { + controller.loseLife(1, game); + return true; + } + } + return false; + } + + @Override + public VaporSnagEffect copy() { + return new VaporSnagEffect(this); + } + + @Override + public String getText(Ability source) { + return "Its controller loses 1 life"; + } +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/planechase/KorSanctifiers.java b/Mage.Sets/src/mage/sets/planechase/KorSanctifiers.java new file mode 100644 index 0000000000..f174bd6c8f --- /dev/null +++ b/Mage.Sets/src/mage/sets/planechase/KorSanctifiers.java @@ -0,0 +1,55 @@ +/* + * 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.planechase; + +import java.util.UUID; +import mage.MageInt; + +/** + * + * @author Loki + */ +public class KorSanctifiers extends mage.sets.zendikar.KorSanctifiers { + + public KorSanctifiers (UUID ownerId) { + super(ownerId); + this.cardNumber = 3; + this.expansionSetCode = "HOP"; + } + + public KorSanctifiers (final KorSanctifiers card) { + super(card); + } + + @Override + public KorSanctifiers copy() { + return new KorSanctifiers(this); + } + +} diff --git a/Mage.Sets/src/mage/sets/riseoftheeldrazi/AllIsDust.java b/Mage.Sets/src/mage/sets/riseoftheeldrazi/AllIsDust.java new file mode 100644 index 0000000000..fa3f3a9849 --- /dev/null +++ b/Mage.Sets/src/mage/sets/riseoftheeldrazi/AllIsDust.java @@ -0,0 +1,97 @@ +/* + * 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.riseoftheeldrazi; + +import java.util.UUID; + +import mage.Constants; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.abilities.Ability; +import mage.abilities.effects.OneShotEffect; +import mage.cards.CardImpl; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; +import mage.players.PlayerList; + +/** + * @author Loki + */ +public class AllIsDust extends CardImpl { + + public AllIsDust(UUID ownerId) { + super(ownerId, 1, "All Is Dust", Rarity.MYTHIC, new CardType[]{CardType.SORCERY}, "{7}"); + this.expansionSetCode = "ROE"; + this.subtype.add("Tribal"); + this.subtype.add("Eldrazi"); + this.getSpellAbility().addEffect(new AllIsDustEffect()); + } + + public AllIsDust(final AllIsDust card) { + super(card); + } + + @Override + public AllIsDust copy() { + return new AllIsDust(this); + } + +} + +class AllIsDustEffect extends OneShotEffect { + AllIsDustEffect() { + super(Constants.Outcome.DestroyPermanent); + } + + AllIsDustEffect(final AllIsDustEffect effect) { + super(effect); + } + + @Override + public boolean apply(Game game, Ability source) { + for (Permanent p : game.getBattlefield().getAllActivePermanents()) { + if (!p.getColor().isColorless()) { + p.sacrifice(source.getSourceId(), game); + } + } + + return true; + } + + @Override + public AllIsDustEffect copy() { + return new AllIsDustEffect(this); + } + + @Override + public String getText(Ability source) { + return "Each player sacrifices all colored permanents he or she controls"; + } +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/riseoftheeldrazi/ArtisanofKozilek.java b/Mage.Sets/src/mage/sets/riseoftheeldrazi/ArtisanofKozilek.java new file mode 100644 index 0000000000..a81c9944cf --- /dev/null +++ b/Mage.Sets/src/mage/sets/riseoftheeldrazi/ArtisanofKozilek.java @@ -0,0 +1,70 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ + +package mage.sets.riseoftheeldrazi; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.common.ReturnFromGraveyardToBattlefieldTargetEffect; +import mage.abilities.keyword.AnnihilatorAbility; +import mage.cards.CardImpl; +import mage.filter.common.FilterCreatureCard; +import mage.target.common.TargetCardInYourGraveyard; + +/** + * + * @author Loki + */ +public class ArtisanofKozilek extends CardImpl { + + public ArtisanofKozilek (UUID ownerId) { + super(ownerId, 2, "Artisan of Kozilek", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{9}"); + this.expansionSetCode = "ROE"; + this.subtype.add("Eldrazi"); + this.power = new MageInt(10); + this.toughness = new MageInt(9); + Ability ability = new EntersBattlefieldTriggeredAbility(new ReturnFromGraveyardToBattlefieldTargetEffect()); + ability.addTarget(new TargetCardInYourGraveyard(new FilterCreatureCard())); + this.addAbility(ability); + this.addAbility(new AnnihilatorAbility(2)); + } + + public ArtisanofKozilek (final ArtisanofKozilek card) { + super(card); + } + + @Override + public ArtisanofKozilek copy() { + return new ArtisanofKozilek(this); + } + +} diff --git a/Mage.Sets/src/mage/sets/zendikar/KorSanctifiers.java b/Mage.Sets/src/mage/sets/zendikar/KorSanctifiers.java new file mode 100644 index 0000000000..2927f2ecda --- /dev/null +++ b/Mage.Sets/src/mage/sets/zendikar/KorSanctifiers.java @@ -0,0 +1,81 @@ +/* + * 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.zendikar; + +import java.util.UUID; + +import mage.Constants; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.MageInt; +import mage.abilities.costs.mana.ColoredManaCost; +import mage.abilities.effects.common.DestroyTargetEffect; +import mage.abilities.keyword.KickerAbility; +import mage.cards.CardImpl; +import mage.filter.Filter; +import mage.filter.FilterPermanent; +import mage.target.TargetPermanent; + +/** + * + * @author Loki + */ +public class KorSanctifiers extends CardImpl { + private static final FilterPermanent filter = new FilterPermanent("artifact or enchantment"); + + static { + filter.getCardType().add(CardType.ARTIFACT); + filter.getCardType().add(CardType.ENCHANTMENT); + filter.setScopeCardType(Filter.ComparisonScope.Any); + } + + public KorSanctifiers (UUID ownerId) { + super(ownerId, 22, "Kor Sanctifiers", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{2}{W}"); + this.expansionSetCode = "ZEN"; + this.subtype.add("Kor"); + this.subtype.add("Cleric"); + this.color.setWhite(true); + this.power = new MageInt(2); + this.toughness = new MageInt(3); + KickerAbility kickerAbility = new KickerAbility(new DestroyTargetEffect(), false); + kickerAbility.addCost(new ColoredManaCost(Constants.ColoredManaSymbol.W)); + kickerAbility.addTarget(new TargetPermanent(filter)); + this.addAbility(kickerAbility); + } + + public KorSanctifiers (final KorSanctifiers card) { + super(card); + } + + @Override + public KorSanctifiers copy() { + return new KorSanctifiers(this); + } + +}