From 11a64a1c6add89141ab7d3793ac9d9308238028b Mon Sep 17 00:00:00 2001 From: North Date: Sun, 4 Mar 2012 22:41:35 +0200 Subject: [PATCH] [DKA] 5 cards --- .../sets/darkascension/GrimFlowering.java | 62 +++++++++++ .../sets/darkascension/ScorchTheFields.java | 72 ++++++++++++ .../darkascension/ShatteredPerception.java | 103 ++++++++++++++++++ .../mage/sets/darkascension/UndyingEvil.java | 64 +++++++++++ .../sets/darkascension/WrackWithMadness.java | 93 ++++++++++++++++ 5 files changed, 394 insertions(+) create mode 100644 Mage.Sets/src/mage/sets/darkascension/GrimFlowering.java create mode 100644 Mage.Sets/src/mage/sets/darkascension/ScorchTheFields.java create mode 100644 Mage.Sets/src/mage/sets/darkascension/ShatteredPerception.java create mode 100644 Mage.Sets/src/mage/sets/darkascension/UndyingEvil.java create mode 100644 Mage.Sets/src/mage/sets/darkascension/WrackWithMadness.java diff --git a/Mage.Sets/src/mage/sets/darkascension/GrimFlowering.java b/Mage.Sets/src/mage/sets/darkascension/GrimFlowering.java new file mode 100644 index 0000000000..b25c4ffb96 --- /dev/null +++ b/Mage.Sets/src/mage/sets/darkascension/GrimFlowering.java @@ -0,0 +1,62 @@ +/* + * 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.darkascension; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.abilities.dynamicvalue.common.CardsInControllerGraveyardCount; +import mage.abilities.effects.common.DrawCardControllerEffect; +import mage.cards.CardImpl; +import mage.filter.common.FilterCreatureCard; + +/** + * + * @author North + */ +public class GrimFlowering extends CardImpl { + + public GrimFlowering(UUID ownerId) { + super(ownerId, 117, "Grim Flowering", Rarity.UNCOMMON, new CardType[]{CardType.SORCERY}, "{5}{G}"); + this.expansionSetCode = "DKA"; + + this.color.setGreen(true); + + // Draw a card for each creature card in your graveyard. + this.getSpellAbility().addEffect(new DrawCardControllerEffect(new CardsInControllerGraveyardCount(new FilterCreatureCard()))); + } + + public GrimFlowering(final GrimFlowering card) { + super(card); + } + + @Override + public GrimFlowering copy() { + return new GrimFlowering(this); + } +} diff --git a/Mage.Sets/src/mage/sets/darkascension/ScorchTheFields.java b/Mage.Sets/src/mage/sets/darkascension/ScorchTheFields.java new file mode 100644 index 0000000000..b4d6577770 --- /dev/null +++ b/Mage.Sets/src/mage/sets/darkascension/ScorchTheFields.java @@ -0,0 +1,72 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.darkascension; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.abilities.effects.common.DamageAllEffect; +import mage.abilities.effects.common.DestroyTargetEffect; +import mage.cards.CardImpl; +import mage.filter.common.FilterCreaturePermanent; +import mage.target.common.TargetLandPermanent; + +/** + * + * @author North + */ +public class ScorchTheFields extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Human creature"); + + static { + filter.getSubtype().add("Human"); + } + + public ScorchTheFields(UUID ownerId) { + super(ownerId, 103, "Scorch the Fields", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{4}{R}"); + this.expansionSetCode = "DKA"; + + this.color.setRed(true); + + // Destroy target land. + this.getSpellAbility().addEffect(new DestroyTargetEffect()); + this.getSpellAbility().addTarget(new TargetLandPermanent()); + // Scorch the Fields deals 1 damage to each Human creature. + this.getSpellAbility().addEffect(new DamageAllEffect(1, filter)); + } + + public ScorchTheFields(final ScorchTheFields card) { + super(card); + } + + @Override + public ScorchTheFields copy() { + return new ScorchTheFields(this); + } +} diff --git a/Mage.Sets/src/mage/sets/darkascension/ShatteredPerception.java b/Mage.Sets/src/mage/sets/darkascension/ShatteredPerception.java new file mode 100644 index 0000000000..cdd511ff69 --- /dev/null +++ b/Mage.Sets/src/mage/sets/darkascension/ShatteredPerception.java @@ -0,0 +1,103 @@ +/* + * 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.darkascension; + +import java.util.Set; +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Outcome; +import mage.Constants.Rarity; +import mage.Constants.TimingRule; +import mage.abilities.Ability; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.keyword.FlashbackAbility; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.game.Game; +import mage.players.Player; + +/** + * + * @author North + */ +public class ShatteredPerception extends CardImpl { + + public ShatteredPerception(UUID ownerId) { + super(ownerId, 104, "Shattered Perception", Rarity.UNCOMMON, new CardType[]{CardType.SORCERY}, "{2}{R}"); + this.expansionSetCode = "DKA"; + + this.color.setRed(true); + + // Discard all the cards in your hand, then draw that many cards. + this.getSpellAbility().addEffect(new ShatteredPerceptionEffect()); + // Flashback {5}{R} + this.addAbility(new FlashbackAbility(new ManaCostsImpl("{5}{R}"), TimingRule.SORCERY)); + } + + public ShatteredPerception(final ShatteredPerception card) { + super(card); + } + + @Override + public ShatteredPerception copy() { + return new ShatteredPerception(this); + } +} + +class ShatteredPerceptionEffect extends OneShotEffect { + + public ShatteredPerceptionEffect() { + super(Outcome.DrawCard); + this.staticText = "Discard all the cards in your hand, then draw that many cards"; + } + + public ShatteredPerceptionEffect(final ShatteredPerceptionEffect effect) { + super(effect); + } + + @Override + public ShatteredPerceptionEffect copy() { + return new ShatteredPerceptionEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player player = game.getPlayer(source.getControllerId()); + if (player != null) { + Set cardsInHand = player.getHand().getCards(game); + int amount = cardsInHand.size(); + for (Card card : cardsInHand) { + player.discard(card, source, game); + } + player.drawCards(amount, game); + return true; + } + return false; + } +} diff --git a/Mage.Sets/src/mage/sets/darkascension/UndyingEvil.java b/Mage.Sets/src/mage/sets/darkascension/UndyingEvil.java new file mode 100644 index 0000000000..a253ad8f82 --- /dev/null +++ b/Mage.Sets/src/mage/sets/darkascension/UndyingEvil.java @@ -0,0 +1,64 @@ +/* + * 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.darkascension; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Duration; +import mage.Constants.Rarity; +import mage.abilities.effects.common.continious.GainAbilityTargetEffect; +import mage.abilities.keyword.UndyingAbility; +import mage.cards.CardImpl; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author North + */ +public class UndyingEvil extends CardImpl { + + public UndyingEvil(UUID ownerId) { + super(ownerId, 77, "Undying Evil", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{B}"); + this.expansionSetCode = "DKA"; + + this.color.setBlack(true); + + // Target creature gains undying until end of turn. + this.getSpellAbility().addEffect(new GainAbilityTargetEffect(new UndyingAbility(), Duration.EndOfTurn)); + this.getSpellAbility().addTarget(new TargetCreaturePermanent()); + } + + public UndyingEvil(final UndyingEvil card) { + super(card); + } + + @Override + public UndyingEvil copy() { + return new UndyingEvil(this); + } +} diff --git a/Mage.Sets/src/mage/sets/darkascension/WrackWithMadness.java b/Mage.Sets/src/mage/sets/darkascension/WrackWithMadness.java new file mode 100644 index 0000000000..4cdb68d455 --- /dev/null +++ b/Mage.Sets/src/mage/sets/darkascension/WrackWithMadness.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.darkascension; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Outcome; +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.target.common.TargetCreaturePermanent; + +/** + * + * @author North + */ +public class WrackWithMadness extends CardImpl { + + public WrackWithMadness(UUID ownerId) { + super(ownerId, 107, "Wrack with Madness", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{3}{R}"); + this.expansionSetCode = "DKA"; + + this.color.setRed(true); + + // Target creature deals damage to itself equal to its power. + this.getSpellAbility().addEffect(new WrackWithMadnessEffect()); + this.getSpellAbility().addTarget(new TargetCreaturePermanent()); + } + + public WrackWithMadness(final WrackWithMadness card) { + super(card); + } + + @Override + public WrackWithMadness copy() { + return new WrackWithMadness(this); + } +} + +class WrackWithMadnessEffect extends OneShotEffect { + + public WrackWithMadnessEffect() { + super(Outcome.Damage); + this.staticText = "Target creature deals damage to itself equal to its power"; + } + + public WrackWithMadnessEffect(final WrackWithMadnessEffect effect) { + super(effect); + } + + @Override + public WrackWithMadnessEffect copy() { + return new WrackWithMadnessEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Permanent permanent = game.getPermanent(targetPointer.getFirst(source)); + if (permanent != null) { + permanent.damage(permanent.getPower().getValue(), permanent.getId(), game, true, false); + return true; + } + return false; + } +}