From 479a6afe093f3d2e5b2eb5c5ffc72efbc4acaea5 Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Thu, 5 Dec 2013 23:59:01 +0100 Subject: [PATCH] [C13] Added 13 cards. --- .../mage/sets/commander/MoltenSlagheap.java | 52 +++++++ .../src/mage/sets/commander/VisionSkeins.java | 52 +++++++ .../mage/sets/commander2013/Annihilate.java | 52 +++++++ .../mage/sets/commander2013/BalefulForce.java | 71 ++++++++++ .../mage/sets/commander2013/CrosissCharm.java | 91 ++++++++++++ .../mage/sets/commander2013/DecreeOfPain.java | 111 +++++++++++++++ .../mage/sets/commander2013/EyeOfDoom.java | 133 ++++++++++++++++++ .../src/mage/sets/commander2013/Mirari.java | 121 ++++++++++++++++ .../sets/commander2013/MoltenSlagheap.java | 79 +++++++++++ .../sets/commander2013/PriceOfKnowledge.java | 107 ++++++++++++++ .../mage/sets/commander2013/Prosperity.java | 61 ++++++++ .../mage/sets/commander2013/Starstorm.java | 52 +++++++ .../sets/commander2013/StrategicPlanning.java | 124 ++++++++++++++++ .../mage/sets/commander2013/VisionSkeins.java | 61 ++++++++ .../sets/darkascension/MarkovWarlord.java | 8 +- .../mage/sets/dissension/VisionSkeins.java | 52 +++++++ .../mage/sets/innistrad/AngelicOverseer.java | 11 +- .../src/mage/sets/invasion/Annihilate.java | 74 ++++++++++ Mage.Sets/src/mage/sets/odyssey/Mirari.java | 52 +++++++ .../src/mage/sets/onslaught/Starstorm.java | 66 +++++++++ .../mage/sets/planeshift/CrosissCharm.java | 52 +++++++ .../src/mage/sets/scourge/DecreeOfPain.java | 52 +++++++ .../mage/sets/sixthedition/Prosperity.java | 52 +++++++ .../src/mage/sets/timeshifted/Mirari.java | 54 +++++++ .../mage/sets/timespiral/MoltenSlagheap.java | 52 +++++++ .../src/mage/sets/visions/Prosperity.java | 52 +++++++ .../effects/common/CopyTargetSpellEffect.java | 2 +- .../effects/common/DrawCardAllEffect.java | 18 ++- .../common/ReturnToHandTargetEffect.java | 14 +- .../MaximumHandSizeControllerEffect.java | 37 ++--- Mage/src/mage/counters/CounterType.java | 4 + .../src/mage/counters/common/DoomCounter.java | 49 +++++++ 32 files changed, 1831 insertions(+), 37 deletions(-) create mode 100644 Mage.Sets/src/mage/sets/commander/MoltenSlagheap.java create mode 100644 Mage.Sets/src/mage/sets/commander/VisionSkeins.java create mode 100644 Mage.Sets/src/mage/sets/commander2013/Annihilate.java create mode 100644 Mage.Sets/src/mage/sets/commander2013/BalefulForce.java create mode 100644 Mage.Sets/src/mage/sets/commander2013/CrosissCharm.java create mode 100644 Mage.Sets/src/mage/sets/commander2013/DecreeOfPain.java create mode 100644 Mage.Sets/src/mage/sets/commander2013/EyeOfDoom.java create mode 100644 Mage.Sets/src/mage/sets/commander2013/Mirari.java create mode 100644 Mage.Sets/src/mage/sets/commander2013/MoltenSlagheap.java create mode 100644 Mage.Sets/src/mage/sets/commander2013/PriceOfKnowledge.java create mode 100644 Mage.Sets/src/mage/sets/commander2013/Prosperity.java create mode 100644 Mage.Sets/src/mage/sets/commander2013/Starstorm.java create mode 100644 Mage.Sets/src/mage/sets/commander2013/StrategicPlanning.java create mode 100644 Mage.Sets/src/mage/sets/commander2013/VisionSkeins.java create mode 100644 Mage.Sets/src/mage/sets/dissension/VisionSkeins.java create mode 100644 Mage.Sets/src/mage/sets/invasion/Annihilate.java create mode 100644 Mage.Sets/src/mage/sets/odyssey/Mirari.java create mode 100644 Mage.Sets/src/mage/sets/onslaught/Starstorm.java create mode 100644 Mage.Sets/src/mage/sets/planeshift/CrosissCharm.java create mode 100644 Mage.Sets/src/mage/sets/scourge/DecreeOfPain.java create mode 100644 Mage.Sets/src/mage/sets/sixthedition/Prosperity.java create mode 100644 Mage.Sets/src/mage/sets/timeshifted/Mirari.java create mode 100644 Mage.Sets/src/mage/sets/timespiral/MoltenSlagheap.java create mode 100644 Mage.Sets/src/mage/sets/visions/Prosperity.java create mode 100644 Mage/src/mage/counters/common/DoomCounter.java diff --git a/Mage.Sets/src/mage/sets/commander/MoltenSlagheap.java b/Mage.Sets/src/mage/sets/commander/MoltenSlagheap.java new file mode 100644 index 0000000000..df58b83870 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander/MoltenSlagheap.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.commander; + +import java.util.UUID; + +/** + * + * @author LevelX2 + */ +public class MoltenSlagheap extends mage.sets.commander2013.MoltenSlagheap { + + public MoltenSlagheap(UUID ownerId) { + super(ownerId); + this.cardNumber = 282; + this.expansionSetCode = "CMD"; + } + + public MoltenSlagheap(final MoltenSlagheap card) { + super(card); + } + + @Override + public MoltenSlagheap copy() { + return new MoltenSlagheap(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander/VisionSkeins.java b/Mage.Sets/src/mage/sets/commander/VisionSkeins.java new file mode 100644 index 0000000000..230da1ad82 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander/VisionSkeins.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.commander; + +import java.util.UUID; + +/** + * + * @author LevelX2 + */ +public class VisionSkeins extends mage.sets.commander2013.VisionSkeins { + + public VisionSkeins(UUID ownerId) { + super(ownerId); + this.cardNumber = 67; + this.expansionSetCode = "CMD"; + } + + public VisionSkeins(final VisionSkeins card) { + super(card); + } + + @Override + public VisionSkeins copy() { + return new VisionSkeins(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2013/Annihilate.java b/Mage.Sets/src/mage/sets/commander2013/Annihilate.java new file mode 100644 index 0000000000..06da424452 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2013/Annihilate.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.commander2013; + +import java.util.UUID; + +/** + * + * @author LevelX2 + */ +public class Annihilate extends mage.sets.invasion.Annihilate { + + public Annihilate(UUID ownerId) { + super(ownerId); + this.cardNumber = 68; + this.expansionSetCode = "C13"; + } + + public Annihilate(final Annihilate card) { + super(card); + } + + @Override + public Annihilate copy() { + return new Annihilate(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2013/BalefulForce.java b/Mage.Sets/src/mage/sets/commander2013/BalefulForce.java new file mode 100644 index 0000000000..cd019ba54b --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2013/BalefulForce.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.commander2013; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; +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; + +/** + * + * @author LevelX2 + */ +public class BalefulForce extends CardImpl { + + public BalefulForce(UUID ownerId) { + super(ownerId, 70, "Baleful Force", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{5}{B}{B}{B}"); + this.expansionSetCode = "C13"; + this.subtype.add("Elemental"); + + this.color.setBlack(true); + this.power = new MageInt(7); + this.toughness = new MageInt(7); + + // At the beginning of each upkeep, you draw a card and you lose 1 life. + Ability ability = new BeginningOfUpkeepTriggeredAbility(new DrawCardControllerEffect(1), TargetController.ANY, false); + ability.addEffect(new LoseLifeSourceEffect(1)); + this.addAbility(ability); + } + + public BalefulForce(final BalefulForce card) { + super(card); + } + + @Override + public BalefulForce copy() { + return new BalefulForce(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2013/CrosissCharm.java b/Mage.Sets/src/mage/sets/commander2013/CrosissCharm.java new file mode 100644 index 0000000000..00f033cd59 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2013/CrosissCharm.java @@ -0,0 +1,91 @@ +/* + * 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.commander2013; + +import java.util.UUID; +import mage.ObjectColor; +import mage.abilities.Mode; +import mage.abilities.effects.common.DestroyTargetEffect; +import mage.abilities.effects.common.ReturnToHandTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.ColorPredicate; +import mage.target.Target; +import mage.target.TargetPermanent; +import mage.target.common.TargetArtifactPermanent; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LevelX2 + */ +public class CrosissCharm extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("nonblack creature"); + static { + filter.add(Predicates.not(new ColorPredicate(ObjectColor.BLACK))); + } + + public CrosissCharm(UUID ownerId) { + super(ownerId, 181, "Crosis's Charm", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{U}{B}{R}"); + this.expansionSetCode = "C13"; + + this.color.setRed(true); + this.color.setBlue(true); + this.color.setBlack(true); + + // Choose one - Return target permanent to its owner's hand; + this.getSpellAbility().addEffect(new ReturnToHandTargetEffect()); + this.getSpellAbility().addTarget(new TargetPermanent(true)); + // or destroy target nonblack creature, and it can't be regenerated; + Mode mode = new Mode(); + mode.getEffects().add(new DestroyTargetEffect(true)); + mode.getTargets().add(new TargetCreaturePermanent(filter, true)); + this.getSpellAbility().addMode(mode); + // or destroy target artifact. + mode = new Mode(); + mode.getEffects().add(new DestroyTargetEffect(true)); + Target target = new TargetArtifactPermanent(); + target.setRequired(true); + mode.getTargets().add(target); + this.getSpellAbility().addMode(mode); + + } + + public CrosissCharm(final CrosissCharm card) { + super(card); + } + + @Override + public CrosissCharm copy() { + return new CrosissCharm(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2013/DecreeOfPain.java b/Mage.Sets/src/mage/sets/commander2013/DecreeOfPain.java new file mode 100644 index 0000000000..beb87b64a7 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2013/DecreeOfPain.java @@ -0,0 +1,111 @@ +/* + * 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.commander2013; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.CycleTriggeredAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.continious.BoostAllEffect; +import mage.abilities.keyword.CyclingAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.filter.common.FilterCreaturePermanent; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; + +/** + * + * @author LevelX2 + */ +public class DecreeOfPain extends CardImpl { + + public DecreeOfPain(UUID ownerId) { + super(ownerId, 72, "Decree of Pain", Rarity.RARE, new CardType[]{CardType.SORCERY}, "{6}{B}{B}"); + this.expansionSetCode = "C13"; + + this.color.setBlack(true); + + // Destroy all creatures. They can't be regenerated. Draw a card for each creature destroyed this way. + this.getSpellAbility().addEffect(new DecreeOfPainEffect()); + // Cycling {3}{B}{B} + this.addAbility(new CyclingAbility(new ManaCostsImpl("{3}{B}{B}"))); + // When you cycle Decree of Pain, all creatures get -2/-2 until end of turn. + Ability ability = new CycleTriggeredAbility(new BoostAllEffect(-2,-2, Duration.EndOfTurn)); + this.addAbility(ability); + } + + public DecreeOfPain(final DecreeOfPain card) { + super(card); + } + + @Override + public DecreeOfPain copy() { + return new DecreeOfPain(this); + } +} + +class DecreeOfPainEffect extends OneShotEffect { + + public DecreeOfPainEffect() { + super(Outcome.DestroyPermanent); + this.staticText = "Destroy all creatures. They can't be regenerated. Draw a card for each creature destroyed this way"; + } + + public DecreeOfPainEffect(final DecreeOfPainEffect effect) { + super(effect); + } + + @Override + public DecreeOfPainEffect copy() { + return new DecreeOfPainEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null) { + int destroyedCreature = 0; + for(Permanent creature: game.getState().getBattlefield().getActivePermanents(new FilterCreaturePermanent(), controller.getId(), game)) { + if (creature.destroy(source.getSourceId(), game, true)) { + destroyedCreature++; + } + } + if (destroyedCreature > 0) { + controller.drawCards(destroyedCreature, game); + } + return true; + } + return false; + } +} diff --git a/Mage.Sets/src/mage/sets/commander2013/EyeOfDoom.java b/Mage.Sets/src/mage/sets/commander2013/EyeOfDoom.java new file mode 100644 index 0000000000..738c148ed5 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2013/EyeOfDoom.java @@ -0,0 +1,133 @@ +/* + * 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.commander2013; + +import java.util.ArrayList; +import java.util.List; +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.SacrificeSourceCost; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.DestroyAllEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.counters.CounterType; +import mage.filter.FilterPermanent; +import mage.filter.predicate.permanent.CounterPredicate; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; +import mage.players.PlayerList; +import mage.target.Target; +import mage.target.common.TargetNonlandPermanent; + +/** + * + * @author LevelX2 + */ +public class EyeOfDoom extends CardImpl { + + private static final FilterPermanent filter = new FilterPermanent("permanent with a doom counter on it"); + static { + filter.add(new CounterPredicate(CounterType.DOOM)); + } + public EyeOfDoom(UUID ownerId) { + super(ownerId, 243, "Eye of Doom", Rarity.RARE, new CardType[]{CardType.ARTIFACT}, "{4}"); + this.expansionSetCode = "C13"; + + // When Eye of Doom enters the battlefield, each player chooses a nonland permanent and puts a doom counter on it. + this.addAbility(new EntersBattlefieldTriggeredAbility(new EyeOfDoomEffect(),false)); + + // {2}, {tap}, Sacrifice Eye of Doom: Destroy each permanent with a doom counter on it. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DestroyAllEffect(filter), new GenericManaCost(2)); + ability.addCost(new TapSourceCost()); + ability.addCost(new SacrificeSourceCost()); + this.addAbility(ability); + } + + public EyeOfDoom(final EyeOfDoom card) { + super(card); + } + + @Override + public EyeOfDoom copy() { + return new EyeOfDoom(this); + } +} + +class EyeOfDoomEffect extends OneShotEffect { + + public EyeOfDoomEffect() { + super(Outcome.Detriment); + this.staticText = "each player chooses a nonland permanent and puts a doom counter on it"; + } + + public EyeOfDoomEffect(final EyeOfDoomEffect effect) { + super(effect); + } + + @Override + public EyeOfDoomEffect copy() { + return new EyeOfDoomEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + List permanents = new ArrayList(); + Target target = new TargetNonlandPermanent(); + target.setRequired(true); + target.setNotTarget(false); + PlayerList playerList = game.getPlayerList().copy(); + playerList.setCurrent(game.getActivePlayerId()); + Player player = game.getPlayer(game.getActivePlayerId()); + do { + target.clearChosen(); + if (player.chooseTarget(outcome, target, source, game)) { + Permanent permanent = game.getPermanent(target.getFirstTarget()); + if (permanent != null) { + permanents.add(permanent); + game.informPlayers((new StringBuilder(player.getName()).append(" chooses ").append(permanent.getName()).toString())); + } + } + player = playerList.getNext(game); + } while (!player.getId().equals(game.getActivePlayerId())); + + for (Permanent permanent: permanents) { + permanent.addCounters(CounterType.DOOM.createInstance(), game); + } + + return true; + } +} diff --git a/Mage.Sets/src/mage/sets/commander2013/Mirari.java b/Mage.Sets/src/mage/sets/commander2013/Mirari.java new file mode 100644 index 0000000000..3205f6116e --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2013/Mirari.java @@ -0,0 +1,121 @@ +/* + * 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.commander2013; + +import java.util.UUID; +import mage.abilities.TriggeredAbilityImpl; +import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.effects.common.CopyTargetSpellEffect; +import mage.abilities.effects.common.DoIfCostPaid; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.FilterSpell; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.CardTypePredicate; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.game.stack.Spell; +import mage.target.TargetSpell; + +/** + * + * @author LevelX2 + */ +public class Mirari extends CardImpl { + + public Mirari(UUID ownerId) { + super(ownerId, 246, "Mirari", Rarity.RARE, new CardType[]{CardType.ARTIFACT}, "{5}"); + this.expansionSetCode = "C13"; + this.supertype.add("Legendary"); + + // Whenever you cast an instant or sorcery spell, you may pay {3}. If you do, copy that spell. You may choose new targets for the copy. + this.addAbility(new MirariTriggeredAbility()); + + } + + public Mirari(final Mirari card) { + super(card); + } + + @Override + public Mirari copy() { + return new Mirari(this); + } +} + + +class MirariTriggeredAbility extends TriggeredAbilityImpl { + + private static final FilterSpell filter = new FilterSpell(); + + static { + filter.add(Predicates.or( + new CardTypePredicate(CardType.INSTANT), + new CardTypePredicate(CardType.SORCERY))); + } + + MirariTriggeredAbility() { + super(Zone.BATTLEFIELD, new DoIfCostPaid(new CopyTargetSpellEffect(), new GenericManaCost(3)), false); + this.addTarget(new TargetSpell(filter)); + } + + MirariTriggeredAbility(final MirariTriggeredAbility ability) { + super(ability); + } + + @Override + public MirariTriggeredAbility copy() { + return new MirariTriggeredAbility(this); + } + + @Override + public boolean checkTrigger(GameEvent event, Game game) { + if (event.getType() == GameEvent.EventType.SPELL_CAST && event.getPlayerId().equals(this.getControllerId())) { + Spell spell = game.getStack().getSpell(event.getTargetId()); + if (isControlledInstantOrSorcery(spell)) { + this.getTargets().get(0).clearChosen(); + this.getTargets().get(0).add(spell.getId(), game); + return true; + } + } + return false; + } + + private boolean isControlledInstantOrSorcery(Spell spell) { + return spell != null && + (spell.getControllerId().equals(this.getControllerId())) && + (spell.getCardType().contains(CardType.INSTANT) || spell.getCardType().contains(CardType.SORCERY)); + } + + @Override + public String getRule() { + return "Whenever you cast an instant or sorcery spell, you may pay {3}. If you do, copy that spell. You may choose new targets for the copy."; + } +} diff --git a/Mage.Sets/src/mage/sets/commander2013/MoltenSlagheap.java b/Mage.Sets/src/mage/sets/commander2013/MoltenSlagheap.java new file mode 100644 index 0000000000..2a67634f46 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2013/MoltenSlagheap.java @@ -0,0 +1,79 @@ +/* + * 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.commander2013; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.RemoveVariableCountersSourceCost; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.dynamicvalue.common.RemovedCountersForCostValue; +import mage.abilities.effects.common.ManaInAnyCombinationEffect; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.abilities.mana.ColorlessManaAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.ColoredManaSymbol; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.counters.CounterType; + +/** + * + * @author LevelX2 + */ +public class MoltenSlagheap extends CardImpl { + + public MoltenSlagheap(UUID ownerId) { + super(ownerId, 306, "Molten Slagheap", Rarity.UNCOMMON, new CardType[]{CardType.LAND}, ""); + this.expansionSetCode = "C13"; + + // {tap}: Add {1} to your mana pool. + this.addAbility(new ColorlessManaAbility()); + // {1}, {tap}: Put a storage counter on Molten Slagheap. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new AddCountersSourceEffect(CounterType.STORAGE.createInstance()),new GenericManaCost(1)); + ability.addCost(new TapSourceCost()); + this.addAbility(ability); + // {1}, Remove X storage counters from Molten Slagheap: Add X mana in any combination of {B} and/or {R} to your mana pool. + ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, + new ManaInAnyCombinationEffect(new RemovedCountersForCostValue(), ColoredManaSymbol.B, ColoredManaSymbol.R), + new GenericManaCost(1)); + ability.addCost(new RemoveVariableCountersSourceCost(CounterType.STORAGE.createInstance())); + this.addAbility(ability); + } + + public MoltenSlagheap(final MoltenSlagheap card) { + super(card); + } + + @Override + public MoltenSlagheap copy() { + return new MoltenSlagheap(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2013/PriceOfKnowledge.java b/Mage.Sets/src/mage/sets/commander2013/PriceOfKnowledge.java new file mode 100644 index 0000000000..9bdedeb3db --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2013/PriceOfKnowledge.java @@ -0,0 +1,107 @@ +/* + * 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.commander2013; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.Effect; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.continious.MaximumHandSizeControllerEffect; +import mage.abilities.effects.common.continious.MaximumHandSizeControllerEffect.HandSizeModification; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.TargetController; +import mage.constants.Zone; +import mage.game.Game; +import mage.players.Player; + +/** + * + * @author LevelX2 + */ +public class PriceOfKnowledge extends CardImpl { + + public PriceOfKnowledge(UUID ownerId) { + super(ownerId, 89, "Price of Knowledge", Rarity.RARE, new CardType[]{CardType.ENCHANTMENT}, "{6}{B}"); + this.expansionSetCode = "C13"; + + this.color.setBlack(true); + + // Players have no maximum hand size. + Effect effect = new MaximumHandSizeControllerEffect(Integer.MAX_VALUE, Duration.WhileOnBattlefield, HandSizeModification.SET, TargetController.ANY); + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect)); + // At the beginning of each opponent's upkeep, Price of Knowledge deals damage to that player equal to the number of cards in that player's hand. + this.addAbility(new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, new PriceOfKnowledgeEffect(), TargetController.OPPONENT, false)); + + + } + + public PriceOfKnowledge(final PriceOfKnowledge card) { + super(card); + } + + @Override + public PriceOfKnowledge copy() { + return new PriceOfKnowledge(this); + } +} + +class PriceOfKnowledgeEffect extends OneShotEffect { + + public PriceOfKnowledgeEffect(final PriceOfKnowledgeEffect effect) { + super(effect); + } + + public PriceOfKnowledgeEffect() { + super(Outcome.Neutral); + staticText = "{this} deals damage to that player equal to the number of cards in that player's hand"; + } + + @Override + public boolean apply(Game game, Ability source) { + Player targetPlayer = game.getPlayer(targetPointer.getFirst(game, source)); + if (targetPlayer != null) { + int xValue = targetPlayer.getHand().size(); + if (xValue > 0) { + targetPlayer.damage(xValue, source.getSourceId(), game, false, true); + } + return true; + } + return false; + } + + @Override + public PriceOfKnowledgeEffect copy() { + return new PriceOfKnowledgeEffect(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2013/Prosperity.java b/Mage.Sets/src/mage/sets/commander2013/Prosperity.java new file mode 100644 index 0000000000..8ec00c83f0 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2013/Prosperity.java @@ -0,0 +1,61 @@ +/* + * 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.commander2013; + +import java.util.UUID; +import mage.abilities.dynamicvalue.common.ManacostVariableValue; +import mage.abilities.effects.common.DrawCardAllEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; + +/** + * + * @author LevelX2 + */ +public class Prosperity extends CardImpl { + + public Prosperity(UUID ownerId) { + super(ownerId, 54, "Prosperity", Rarity.UNCOMMON, new CardType[]{CardType.SORCERY}, "{X}{U}"); + this.expansionSetCode = "C13"; + + this.color.setBlue(true); + + // Each player draws X cards. + this.getSpellAbility().addEffect(new DrawCardAllEffect(new ManacostVariableValue())); + } + + public Prosperity(final Prosperity card) { + super(card); + } + + @Override + public Prosperity copy() { + return new Prosperity(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2013/Starstorm.java b/Mage.Sets/src/mage/sets/commander2013/Starstorm.java new file mode 100644 index 0000000000..a266e9a55b --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2013/Starstorm.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.commander2013; + +import java.util.UUID; + +/** + * + * @author LevelX2 + */ +public class Starstorm extends mage.sets.onslaught.Starstorm { + + public Starstorm(UUID ownerId) { + super(ownerId); + this.cardNumber = 122; + this.expansionSetCode = "C13"; + } + + public Starstorm(final Starstorm card) { + super(card); + } + + @Override + public Starstorm copy() { + return new Starstorm(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2013/StrategicPlanning.java b/Mage.Sets/src/mage/sets/commander2013/StrategicPlanning.java new file mode 100644 index 0000000000..c2156bb315 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2013/StrategicPlanning.java @@ -0,0 +1,124 @@ +/* + * 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.commander2013; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.effects.OneShotEffect; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.cards.Cards; +import mage.cards.CardsImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.FilterCard; +import mage.game.Game; +import mage.players.Player; +import mage.target.TargetCard; + +/** + * + * @author LevelX2 + */ +public class StrategicPlanning extends CardImpl { + + public StrategicPlanning(UUID ownerId) { + super(ownerId, 59, "Strategic Planning", Rarity.UNCOMMON, new CardType[]{CardType.SORCERY}, "{1}{U}"); + this.expansionSetCode = "C13"; + + this.color.setBlue(true); + + // Look at the top three cards of your library. Put one of them into your hand and the rest into your graveyard. + this.getSpellAbility().addEffect(new StrategicPlanningEffect()); + } + + public StrategicPlanning(final StrategicPlanning card) { + super(card); + } + + @Override + public StrategicPlanning copy() { + return new StrategicPlanning(this); + } +} + +class StrategicPlanningEffect extends OneShotEffect { + + public StrategicPlanningEffect() { + super(Outcome.DrawCard); + this.staticText = "Look at the top three cards of your library. Put one of them into your hand and the rest into your graveyard"; + } + + public StrategicPlanningEffect(final StrategicPlanningEffect effect) { + super(effect); + } + + @Override + public StrategicPlanningEffect copy() { + return new StrategicPlanningEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player player = game.getPlayer(source.getControllerId()); + + if (player != null) { + Cards cards = new CardsImpl(Zone.PICK); + int cardsCount = Math.min(3, player.getLibrary().size()); + for (int i = 0; i < cardsCount; i++) { + Card card = player.getLibrary().removeFromTop(game); + if (card != null) { + cards.add(card); + game.setZone(card.getId(), Zone.PICK); + } + } + + if (cards.size() > 0) { + player.lookAtCards("Strategic Planning", cards, game); + + TargetCard target = new TargetCard(Zone.PICK, new FilterCard("card to put in your hand")); + target.setRequired(true); + if (player.choose(Outcome.Benefit, cards, target, game)) { + Card card = cards.get(target.getFirstTarget(), game); + if (card != null) { + card.moveToZone(Zone.HAND, source.getId(), game, false); + cards.remove(card); + } + } + + for (Card card : cards.getCards(game)) { + card.moveToZone(Zone.GRAVEYARD, source.getId(), game, true); + } + } + return true; + } + return false; + } +} diff --git a/Mage.Sets/src/mage/sets/commander2013/VisionSkeins.java b/Mage.Sets/src/mage/sets/commander2013/VisionSkeins.java new file mode 100644 index 0000000000..a654b6ef97 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2013/VisionSkeins.java @@ -0,0 +1,61 @@ +/* + * 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.commander2013; + +import java.util.UUID; +import mage.abilities.dynamicvalue.common.ManacostVariableValue; +import mage.abilities.effects.common.DrawCardAllEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; + +/** + * + * @author LevelX2 + */ +public class VisionSkeins extends CardImpl { + + public VisionSkeins(UUID ownerId) { + super(ownerId, 65, "Vision Skeins", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{1}{U}"); + this.expansionSetCode = "C13"; + + this.color.setBlue(true); + + // Each player draws two cards. + this.getSpellAbility().addEffect(new DrawCardAllEffect(2)); + } + + public VisionSkeins(final VisionSkeins card) { + super(card); + } + + @Override + public VisionSkeins copy() { + return new VisionSkeins(this); + } +} diff --git a/Mage.Sets/src/mage/sets/darkascension/MarkovWarlord.java b/Mage.Sets/src/mage/sets/darkascension/MarkovWarlord.java index c90fbedd6b..67e4bb1dde 100644 --- a/Mage.Sets/src/mage/sets/darkascension/MarkovWarlord.java +++ b/Mage.Sets/src/mage/sets/darkascension/MarkovWarlord.java @@ -32,7 +32,7 @@ import mage.constants.CardType; import mage.constants.Duration; import mage.constants.Rarity; import mage.MageInt; -import mage.abilities.common.EntersBattlefieldAbility; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.effects.common.combat.CantBlockTargetEffect; import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; @@ -56,8 +56,10 @@ public class MarkovWarlord extends CardImpl { this.addAbility(HasteAbility.getInstance()); // When Markov Warlord enters the battlefield, up to two target creatures can't block this turn. - EntersBattlefieldAbility ability = new EntersBattlefieldAbility(new CantBlockTargetEffect(Duration.EndOfTurn)); - ability.addTarget(new TargetCreaturePermanent(0, 2)); + EntersBattlefieldTriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new CantBlockTargetEffect(Duration.EndOfTurn)); + TargetCreaturePermanent target = new TargetCreaturePermanent(0, 2); + target.setRequired(true); + ability.addTarget(target); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/sets/dissension/VisionSkeins.java b/Mage.Sets/src/mage/sets/dissension/VisionSkeins.java new file mode 100644 index 0000000000..41b95df50a --- /dev/null +++ b/Mage.Sets/src/mage/sets/dissension/VisionSkeins.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.dissension; + +import java.util.UUID; + +/** + * + * @author LevelX2 + */ +public class VisionSkeins extends mage.sets.commander2013.VisionSkeins { + + public VisionSkeins(UUID ownerId) { + super(ownerId); + this.cardNumber = 36; + this.expansionSetCode = "DIS"; + } + + public VisionSkeins(final VisionSkeins card) { + super(card); + } + + @Override + public VisionSkeins copy() { + return new VisionSkeins(this); + } +} diff --git a/Mage.Sets/src/mage/sets/innistrad/AngelicOverseer.java b/Mage.Sets/src/mage/sets/innistrad/AngelicOverseer.java index 7cd23077b3..5da09a0e95 100644 --- a/Mage.Sets/src/mage/sets/innistrad/AngelicOverseer.java +++ b/Mage.Sets/src/mage/sets/innistrad/AngelicOverseer.java @@ -32,6 +32,7 @@ import java.util.UUID; import mage.constants.CardType; import mage.constants.Rarity; import mage.MageInt; +import mage.abilities.Ability; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.condition.common.ControlsPermanentCondition; import mage.abilities.decorator.ConditionalContinousEffect; @@ -48,8 +49,8 @@ import mage.filter.predicate.mageobject.SubtypePredicate; */ public class AngelicOverseer extends CardImpl { - private static final String rule1 = "As long as you control a Human, {this} has hexproof."; - private static final String rule2 = "As long as you control a Human, {this} is indestructible."; + private static final String rule1 = "As long as you control a Human, {this} has hexproof"; + private static final String rule2 = "and is indestructible"; private static final FilterControlledPermanent filter = new FilterControlledPermanent("Human"); static { @@ -69,10 +70,10 @@ public class AngelicOverseer extends CardImpl { // As long as you control a Human, Angelic Overseer has hexproof and is indestructible. ConditionalContinousEffect effect1 = new ConditionalContinousEffect(new GainAbilitySourceEffect(HexproofAbility.getInstance()), new ControlsPermanentCondition(filter), rule1); - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect1)); + Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, effect1); ConditionalContinousEffect effect2 = new ConditionalContinousEffect(new GainAbilitySourceEffect(IndestructibleAbility.getInstance()), new ControlsPermanentCondition(filter), rule2); - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect2)); - + ability.addEffect(effect2); + this.addAbility(ability); } public AngelicOverseer(final AngelicOverseer card) { diff --git a/Mage.Sets/src/mage/sets/invasion/Annihilate.java b/Mage.Sets/src/mage/sets/invasion/Annihilate.java new file mode 100644 index 0000000000..c2e3e27e77 --- /dev/null +++ b/Mage.Sets/src/mage/sets/invasion/Annihilate.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.invasion; + +import java.util.UUID; +import mage.ObjectColor; +import mage.abilities.effects.common.DestroyTargetEffect; +import mage.abilities.effects.common.DrawCardControllerEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.ColorPredicate; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LevelX2 + */ +public class Annihilate extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("nonblack creature"); + static { + filter.add(Predicates.not(new ColorPredicate(ObjectColor.BLACK))); + } + + public Annihilate(UUID ownerId) { + super(ownerId, 94, "Annihilate", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{3}{B}{B}"); + this.expansionSetCode = "INV"; + + this.color.setBlack(true); + + // Destroy target nonblack creature. It can't be regenerated. + this.getSpellAbility().addEffect(new DestroyTargetEffect(true)); + this.getSpellAbility().addTarget(new TargetCreaturePermanent(filter, true)); + // Draw a card. + this.getSpellAbility().addEffect(new DrawCardControllerEffect(1)); + } + + public Annihilate(final Annihilate card) { + super(card); + } + + @Override + public Annihilate copy() { + return new Annihilate(this); + } +} diff --git a/Mage.Sets/src/mage/sets/odyssey/Mirari.java b/Mage.Sets/src/mage/sets/odyssey/Mirari.java new file mode 100644 index 0000000000..1ee40bb0b5 --- /dev/null +++ b/Mage.Sets/src/mage/sets/odyssey/Mirari.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.odyssey; + +import java.util.UUID; + +/** + * + * @author LevelX2 + */ +public class Mirari extends mage.sets.commander2013.Mirari { + + public Mirari(UUID ownerId) { + super(ownerId); + this.cardNumber = 303; + this.expansionSetCode = "ODY"; + } + + public Mirari(final Mirari card) { + super(card); + } + + @Override + public Mirari copy() { + return new Mirari(this); + } +} diff --git a/Mage.Sets/src/mage/sets/onslaught/Starstorm.java b/Mage.Sets/src/mage/sets/onslaught/Starstorm.java new file mode 100644 index 0000000000..a60b76a59b --- /dev/null +++ b/Mage.Sets/src/mage/sets/onslaught/Starstorm.java @@ -0,0 +1,66 @@ +/* + * 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.onslaught; + +import java.util.UUID; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.dynamicvalue.common.ManacostVariableValue; +import mage.abilities.effects.common.DamageAllEffect; +import mage.abilities.keyword.CyclingAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.common.FilterCreaturePermanent; + +/** + * + * @author LevelX2 + */ +public class Starstorm extends CardImpl { + + public Starstorm(UUID ownerId) { + super(ownerId, 238, "Starstorm", Rarity.RARE, new CardType[]{CardType.INSTANT}, "{X}{R}{R}"); + this.expansionSetCode = "ONS"; + + this.color.setRed(true); + + // Starstorm deals X damage to each creature. + this.getSpellAbility().addEffect(new DamageAllEffect(new ManacostVariableValue(), new FilterCreaturePermanent())); + // Cycling {3} + this.addAbility(new CyclingAbility(new ManaCostsImpl("{3}"))); + } + + public Starstorm(final Starstorm card) { + super(card); + } + + @Override + public Starstorm copy() { + return new Starstorm(this); + } +} diff --git a/Mage.Sets/src/mage/sets/planeshift/CrosissCharm.java b/Mage.Sets/src/mage/sets/planeshift/CrosissCharm.java new file mode 100644 index 0000000000..f12e3d8f11 --- /dev/null +++ b/Mage.Sets/src/mage/sets/planeshift/CrosissCharm.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.planeshift; + +import java.util.UUID; + +/** + * + * @author LevelX2 + */ +public class CrosissCharm extends mage.sets.commander2013.CrosissCharm { + + public CrosissCharm(UUID ownerId) { + super(ownerId); + this.cardNumber = 99; + this.expansionSetCode = "PLS"; + } + + public CrosissCharm(final CrosissCharm card) { + super(card); + } + + @Override + public CrosissCharm copy() { + return new CrosissCharm(this); + } +} diff --git a/Mage.Sets/src/mage/sets/scourge/DecreeOfPain.java b/Mage.Sets/src/mage/sets/scourge/DecreeOfPain.java new file mode 100644 index 0000000000..e7934947d8 --- /dev/null +++ b/Mage.Sets/src/mage/sets/scourge/DecreeOfPain.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.scourge; + +import java.util.UUID; + +/** + * + * @author LevelX2 + */ +public class DecreeOfPain extends mage.sets.commander2013.DecreeOfPain { + + public DecreeOfPain(UUID ownerId) { + super(ownerId); + this.cardNumber = 64; + this.expansionSetCode = "SCG"; + } + + public DecreeOfPain(final DecreeOfPain card) { + super(card); + } + + @Override + public DecreeOfPain copy() { + return new DecreeOfPain(this); + } +} diff --git a/Mage.Sets/src/mage/sets/sixthedition/Prosperity.java b/Mage.Sets/src/mage/sets/sixthedition/Prosperity.java new file mode 100644 index 0000000000..080bedcdf6 --- /dev/null +++ b/Mage.Sets/src/mage/sets/sixthedition/Prosperity.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.sixthedition; + +import java.util.UUID; + +/** + * + * @author LevelX2 + */ +public class Prosperity extends mage.sets.commander2013.Prosperity { + + public Prosperity(UUID ownerId) { + super(ownerId); + this.cardNumber = 89; + this.expansionSetCode = "6ED"; + } + + public Prosperity(final Prosperity card) { + super(card); + } + + @Override + public Prosperity copy() { + return new Prosperity(this); + } +} diff --git a/Mage.Sets/src/mage/sets/timeshifted/Mirari.java b/Mage.Sets/src/mage/sets/timeshifted/Mirari.java new file mode 100644 index 0000000000..764523d6bd --- /dev/null +++ b/Mage.Sets/src/mage/sets/timeshifted/Mirari.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.timeshifted; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author LevelX2 + */ +public class Mirari extends mage.sets.commander2013.Mirari { + + public Mirari(UUID ownerId) { + super(ownerId); + this.cardNumber = 112; + this.expansionSetCode = "TSB"; + this.rarity = Rarity.SPECIAL; + } + + public Mirari(final Mirari card) { + super(card); + } + + @Override + public Mirari copy() { + return new Mirari(this); + } +} diff --git a/Mage.Sets/src/mage/sets/timespiral/MoltenSlagheap.java b/Mage.Sets/src/mage/sets/timespiral/MoltenSlagheap.java new file mode 100644 index 0000000000..41fa58e690 --- /dev/null +++ b/Mage.Sets/src/mage/sets/timespiral/MoltenSlagheap.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.timespiral; + +import java.util.UUID; + +/** + * + * @author LevelX2 + */ +public class MoltenSlagheap extends mage.sets.commander2013.MoltenSlagheap { + + public MoltenSlagheap(UUID ownerId) { + super(ownerId); + this.cardNumber = 276; + this.expansionSetCode = "TSP"; + } + + public MoltenSlagheap(final MoltenSlagheap card) { + super(card); + } + + @Override + public MoltenSlagheap copy() { + return new MoltenSlagheap(this); + } +} diff --git a/Mage.Sets/src/mage/sets/visions/Prosperity.java b/Mage.Sets/src/mage/sets/visions/Prosperity.java new file mode 100644 index 0000000000..e643fbb268 --- /dev/null +++ b/Mage.Sets/src/mage/sets/visions/Prosperity.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.visions; + +import java.util.UUID; + +/** + * + * @author LevelX2 + */ +public class Prosperity extends mage.sets.commander2013.Prosperity { + + public Prosperity(UUID ownerId) { + super(ownerId); + this.cardNumber = 40; + this.expansionSetCode = "VIS"; + } + + public Prosperity(final Prosperity card) { + super(card); + } + + @Override + public Prosperity copy() { + return new Prosperity(this); + } +} diff --git a/Mage/src/mage/abilities/effects/common/CopyTargetSpellEffect.java b/Mage/src/mage/abilities/effects/common/CopyTargetSpellEffect.java index a098fceda6..98c97ad5a7 100644 --- a/Mage/src/mage/abilities/effects/common/CopyTargetSpellEffect.java +++ b/Mage/src/mage/abilities/effects/common/CopyTargetSpellEffect.java @@ -65,7 +65,7 @@ public class CopyTargetSpellEffect extends OneShotEffect if (activateMessage.startsWith(" casts ")) { activateMessage = activateMessage.substring(6); } - game.informPlayers(player.getName() + " copies " + activateMessage);; + game.informPlayers(player.getName() + " copies " + activateMessage); return true; } return false; diff --git a/Mage/src/mage/abilities/effects/common/DrawCardAllEffect.java b/Mage/src/mage/abilities/effects/common/DrawCardAllEffect.java index c34ccd7db5..8ce47bb637 100644 --- a/Mage/src/mage/abilities/effects/common/DrawCardAllEffect.java +++ b/Mage/src/mage/abilities/effects/common/DrawCardAllEffect.java @@ -29,9 +29,11 @@ package mage.abilities.effects.common; import java.util.UUID; -import mage.constants.Outcome; import mage.abilities.Ability; +import mage.abilities.dynamicvalue.DynamicValue; +import mage.abilities.dynamicvalue.common.StaticValue; import mage.abilities.effects.OneShotEffect; +import mage.constants.Outcome; import mage.game.Game; import mage.players.Player; import mage.util.CardUtil; @@ -42,12 +44,17 @@ import mage.util.CardUtil; */ public class DrawCardAllEffect extends OneShotEffect { - protected int amount; + protected DynamicValue amount; public DrawCardAllEffect(int amount) { + this(new StaticValue(amount)); + + } + + public DrawCardAllEffect(DynamicValue amount) { super(Outcome.DrawCard); this.amount = amount; - staticText = "Each player draws " + CardUtil.numberToText(amount) + " card" + (amount == 1?"":"s"); + staticText = "Each player draws " + CardUtil.numberToText(amount.toString()) + " card" + (amount.toString().equals("1")?"":"s"); } public DrawCardAllEffect(final DrawCardAllEffect effect) { @@ -66,8 +73,9 @@ public class DrawCardAllEffect extends OneShotEffect { Player sourcePlayer = game.getPlayer(source.getControllerId()); for (UUID playerId: sourcePlayer.getInRange()) { Player player = game.getPlayer(playerId); - if (player != null) - player.drawCards(amount, game); + if (player != null) { + player.drawCards(amount.calculate(game, source), game); + } } return true; } diff --git a/Mage/src/mage/abilities/effects/common/ReturnToHandTargetEffect.java b/Mage/src/mage/abilities/effects/common/ReturnToHandTargetEffect.java index a841ff5d41..d6e88f3e62 100644 --- a/Mage/src/mage/abilities/effects/common/ReturnToHandTargetEffect.java +++ b/Mage/src/mage/abilities/effects/common/ReturnToHandTargetEffect.java @@ -29,18 +29,20 @@ package mage.abilities.effects.common; import java.util.UUID; -import mage.constants.Outcome; -import mage.constants.Zone; import mage.abilities.Ability; import mage.abilities.Mode; import mage.abilities.effects.OneShotEffect; import mage.cards.Card; +import mage.constants.Outcome; +import mage.constants.Zone; +import static mage.constants.Zone.BATTLEFIELD; +import static mage.constants.Zone.EXILED; +import static mage.constants.Zone.GRAVEYARD; import mage.game.Game; import mage.game.permanent.Permanent; import mage.target.Target; import mage.util.CardUtil; - /** * @author BetaSteward_at_googlemail.com */ @@ -67,7 +69,7 @@ public class ReturnToHandTargetEffect extends OneShotEffect { + + public DoomCounter() { + this(1); + } + + public DoomCounter(int amount) { + super("doom"); + this.count = amount; + } + +}