From b109ad625f9ba07ddd9a667837def81e09c11444 Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Sun, 3 Nov 2013 21:01:10 +0100 Subject: [PATCH] [C13] Added 13 cards. --- .../mage/sets/commander/DeadwoodTreefolk.java | 52 ++++ .../src/mage/sets/commander/HullBreach.java | 52 ++++ .../mage/sets/commander/SavageTwister.java | 52 ++++ .../mage/sets/commander2013/CurseOfChaos.java | 150 +++++++++++ .../sets/commander2013/CurseOfInertia.java | 170 ++++++++++++ .../sets/commander2013/CurseOfPredation.java | 133 ++++++++++ .../commander2013/CurseOfShallowGraves.java | 125 +++++++++ .../commander2013/CurseOfTheForsaken.java | 132 +++++++++ .../sets/commander2013/DarksteelMutation.java | 99 +++++++ .../sets/commander2013/DeadwoodTreefolk.java | 91 +++++++ .../mage/sets/commander2013/FieryJustice.java | 52 ++++ .../mage/sets/commander2013/FromTheAshes.java | 139 ++++++++++ .../sets/commander2013/GahijiHonoredOne.java | 128 +++++++++ .../mage/sets/commander2013/HullBreach.java | 94 +++++++ .../mage/sets/commander2013/OpalPalace.java | 251 ++++++++++++++++++ .../sets/commander2013/SavageTwister.java | 63 +++++ .../mage/sets/guildpact/SavageTwister.java | 52 ++++ .../src/mage/sets/iceage/FieryJustice.java | 73 +++++ .../src/mage/sets/mirage/SavageTwister.java | 52 ++++ .../sets/planarchaos/DeadwoodTreefolk.java | 52 ++++ .../src/mage/sets/planechase/HullBreach.java | 52 ++++ .../mage/sets/planechase/SavageTwister.java | 52 ++++ .../src/mage/sets/planeshift/HullBreach.java | 52 ++++ .../mage/sets/timeshifted/FieryJustice.java | 54 ++++ 24 files changed, 2222 insertions(+) create mode 100644 Mage.Sets/src/mage/sets/commander/DeadwoodTreefolk.java create mode 100644 Mage.Sets/src/mage/sets/commander/HullBreach.java create mode 100644 Mage.Sets/src/mage/sets/commander/SavageTwister.java create mode 100644 Mage.Sets/src/mage/sets/commander2013/CurseOfChaos.java create mode 100644 Mage.Sets/src/mage/sets/commander2013/CurseOfInertia.java create mode 100644 Mage.Sets/src/mage/sets/commander2013/CurseOfPredation.java create mode 100644 Mage.Sets/src/mage/sets/commander2013/CurseOfShallowGraves.java create mode 100644 Mage.Sets/src/mage/sets/commander2013/CurseOfTheForsaken.java create mode 100644 Mage.Sets/src/mage/sets/commander2013/DarksteelMutation.java create mode 100644 Mage.Sets/src/mage/sets/commander2013/DeadwoodTreefolk.java create mode 100644 Mage.Sets/src/mage/sets/commander2013/FieryJustice.java create mode 100644 Mage.Sets/src/mage/sets/commander2013/FromTheAshes.java create mode 100644 Mage.Sets/src/mage/sets/commander2013/GahijiHonoredOne.java create mode 100644 Mage.Sets/src/mage/sets/commander2013/HullBreach.java create mode 100644 Mage.Sets/src/mage/sets/commander2013/OpalPalace.java create mode 100644 Mage.Sets/src/mage/sets/commander2013/SavageTwister.java create mode 100644 Mage.Sets/src/mage/sets/guildpact/SavageTwister.java create mode 100644 Mage.Sets/src/mage/sets/iceage/FieryJustice.java create mode 100644 Mage.Sets/src/mage/sets/mirage/SavageTwister.java create mode 100644 Mage.Sets/src/mage/sets/planarchaos/DeadwoodTreefolk.java create mode 100644 Mage.Sets/src/mage/sets/planechase/HullBreach.java create mode 100644 Mage.Sets/src/mage/sets/planechase/SavageTwister.java create mode 100644 Mage.Sets/src/mage/sets/planeshift/HullBreach.java create mode 100644 Mage.Sets/src/mage/sets/timeshifted/FieryJustice.java diff --git a/Mage.Sets/src/mage/sets/commander/DeadwoodTreefolk.java b/Mage.Sets/src/mage/sets/commander/DeadwoodTreefolk.java new file mode 100644 index 0000000000..aa5a55ecb4 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander/DeadwoodTreefolk.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 DeadwoodTreefolk extends mage.sets.commander2013.DeadwoodTreefolk { + + public DeadwoodTreefolk(UUID ownerId) { + super(ownerId); + this.cardNumber = 150; + this.expansionSetCode = "CMD"; + } + + public DeadwoodTreefolk(final DeadwoodTreefolk card) { + super(card); + } + + @Override + public DeadwoodTreefolk copy() { + return new DeadwoodTreefolk(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander/HullBreach.java b/Mage.Sets/src/mage/sets/commander/HullBreach.java new file mode 100644 index 0000000000..3ea78cd47e --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander/HullBreach.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 HullBreach extends mage.sets.commander2013.HullBreach { + + public HullBreach(UUID ownerId) { + super(ownerId); + this.cardNumber = 203; + this.expansionSetCode = "CMD"; + } + + public HullBreach(final HullBreach card) { + super(card); + } + + @Override + public HullBreach copy() { + return new HullBreach(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander/SavageTwister.java b/Mage.Sets/src/mage/sets/commander/SavageTwister.java new file mode 100644 index 0000000000..4954b2c439 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander/SavageTwister.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 SavageTwister extends mage.sets.commander2013.SavageTwister { + + public SavageTwister(UUID ownerId) { + super(ownerId); + this.cardNumber = 222; + this.expansionSetCode = "CMD"; + } + + public SavageTwister(final SavageTwister card) { + super(card); + } + + @Override + public SavageTwister copy() { + return new SavageTwister(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2013/CurseOfChaos.java b/Mage.Sets/src/mage/sets/commander2013/CurseOfChaos.java new file mode 100644 index 0000000000..40da4eb6f8 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2013/CurseOfChaos.java @@ -0,0 +1,150 @@ +/* + * 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.TriggeredAbilityImpl; +import mage.abilities.effects.Effect; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.AttachEffect; +import mage.abilities.keyword.EnchantAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.game.events.GameEvent.EventType; +import mage.game.permanent.Permanent; +import mage.players.Player; +import mage.target.TargetPlayer; +import mage.target.targetpointer.FixedTarget; + +/** + * + * @author LevelX2 + */ +public class CurseOfChaos extends CardImpl { + + public CurseOfChaos(UUID ownerId) { + super(ownerId, 105, "Curse of Chaos", Rarity.UNCOMMON, new CardType[]{CardType.ENCHANTMENT}, "{2}{R}"); + this.expansionSetCode = "C13"; + this.subtype.add("Aura"); + this.subtype.add("Curse"); + + this.color.setRed(true); + + // Enchant player + TargetPlayer auraTarget = new TargetPlayer(); + this.getSpellAbility().addTarget(auraTarget); + this.getSpellAbility().addEffect(new AttachEffect(Outcome.DrawCard)); + this.addAbility(new EnchantAbility(auraTarget.getTargetName())); + + // Whenever a player attacks enchanted player with one or more creatures, that attacking player may discard a card. If the player does, he or she draws a card. + this.addAbility(new CurseOfChaosTriggeredAbility()); + } + + public CurseOfChaos(final CurseOfChaos card) { + super(card); + } + + @Override + public CurseOfChaos copy() { + return new CurseOfChaos(this); + } +} + +class CurseOfChaosTriggeredAbility extends TriggeredAbilityImpl { + + public CurseOfChaosTriggeredAbility() { + super(Zone.BATTLEFIELD, new CurseOfChaosEffect(), false); // false because handled in effect + } + + public CurseOfChaosTriggeredAbility(final CurseOfChaosTriggeredAbility ability) { + super(ability); + } + + @Override + public boolean checkTrigger(GameEvent event, Game game) { + if (event.getType().equals(EventType.DECLARED_ATTACKERS)) { + Permanent enchantment = game.getPermanent(this.getSourceId()); + if (enchantment != null + && enchantment.getAttachedTo() != null + && game.getCombat().getPlayerDefenders(game).contains(enchantment.getAttachedTo())) { + for (Effect effect: this.getEffects()) { + effect.setTargetPointer(new FixedTarget(game.getCombat().getAttackerId())); + } + return true; + } + } + return false; + } + + @Override + public String getRule() { + return new StringBuilder("Whenever a player attacks enchanted player with one or more creatures, ").append(super.getRule()).toString(); + } + + @Override + public CurseOfChaosTriggeredAbility copy() { + return new CurseOfChaosTriggeredAbility(this); + } + +} + +class CurseOfChaosEffect extends OneShotEffect { + + public CurseOfChaosEffect() { + super(Outcome.Benefit); + this.staticText = "that attacking player may discard a card. If the player does, he or she draws a card"; + } + + public CurseOfChaosEffect(final CurseOfChaosEffect effect) { + super(effect); + } + + @Override + public CurseOfChaosEffect copy() { + return new CurseOfChaosEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player attacker = game.getPlayer(this.getTargetPointer().getFirst(game, source)); + if (attacker != null) { + if (attacker.getHand().size() > 0 && attacker.chooseUse(outcome, "Discard a card and draw a card?", game)){ + attacker.discard(1, source, game); + attacker.drawCards(1, game); + } + return true; + } + return false; + } +} diff --git a/Mage.Sets/src/mage/sets/commander2013/CurseOfInertia.java b/Mage.Sets/src/mage/sets/commander2013/CurseOfInertia.java new file mode 100644 index 0000000000..25e225091a --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2013/CurseOfInertia.java @@ -0,0 +1,170 @@ +/* + * 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.TriggeredAbilityImpl; +import mage.abilities.effects.Effect; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.AttachEffect; +import mage.abilities.keyword.EnchantAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.game.events.GameEvent.EventType; +import mage.game.permanent.Permanent; +import mage.players.Player; +import mage.target.Target; +import mage.target.TargetPermanent; +import mage.target.TargetPlayer; +import mage.target.targetpointer.FixedTarget; + +/** + * + * @author LevelX2 + */ +public class CurseOfInertia extends CardImpl { + + public CurseOfInertia(UUID ownerId) { + super(ownerId, 36, "Curse of Inertia", Rarity.UNCOMMON, new CardType[]{CardType.ENCHANTMENT}, "{2}{U}"); + this.expansionSetCode = "C13"; + this.subtype.add("Aura"); + this.subtype.add("Curse"); + + this.color.setBlue(true); + + // Enchant player + TargetPlayer auraTarget = new TargetPlayer(); + this.getSpellAbility().addTarget(auraTarget); + this.getSpellAbility().addEffect(new AttachEffect(Outcome.Tap)); + this.addAbility(new EnchantAbility(auraTarget.getTargetName())); + + // Whenever a player attacks enchanted player with one or more creatures, that attacking player may tap or untap target permanent of his or her choice. + this.addAbility(new CurseOfInertiaTriggeredAbility()); + + } + + public CurseOfInertia(final CurseOfInertia card) { + super(card); + } + + @Override + public CurseOfInertia copy() { + return new CurseOfInertia(this); + } +} + +class CurseOfInertiaTriggeredAbility extends TriggeredAbilityImpl { + + public CurseOfInertiaTriggeredAbility() { + super(Zone.BATTLEFIELD, new CurseOfInertiaTapOrUntapTargetEffect(), false); + this.addTarget(new TargetPermanent(true)); + } + + public CurseOfInertiaTriggeredAbility(Effect effect, boolean optional, String text) { + super(Zone.BATTLEFIELD, effect, optional); + } + + public CurseOfInertiaTriggeredAbility(final CurseOfInertiaTriggeredAbility ability) { + super(ability); + } + + @Override + public boolean checkTrigger(GameEvent event, Game game) { + if (event.getType().equals(EventType.DECLARED_ATTACKERS)) { + Permanent enchantment = game.getPermanent(this.getSourceId()); + if (enchantment != null + && enchantment.getAttachedTo() != null + && game.getCombat().getPlayerDefenders(game).contains(enchantment.getAttachedTo())) { + for (Effect effect: this.getEffects()) { + effect.setTargetPointer(new FixedTarget(game.getCombat().getAttackerId())); + } + return true; + } + } + return false; + } + + @Override + public String getRule() { + return "Whenever a player attacks enchanted player with one or more creatures, that attacking player may tap or untap target permanent of his or her choice."; + } + + @Override + public CurseOfInertiaTriggeredAbility copy() { + return new CurseOfInertiaTriggeredAbility(this); + } + +} + +class CurseOfInertiaTapOrUntapTargetEffect extends OneShotEffect { + public CurseOfInertiaTapOrUntapTargetEffect() { + super(Outcome.Tap); + staticText = "tap or untap target permanent of his or her choice"; + } + + public CurseOfInertiaTapOrUntapTargetEffect(final CurseOfInertiaTapOrUntapTargetEffect effect) { + super(effect); + } + + @Override + public boolean apply(Game game, Ability source) { + Player player = game.getPlayer(this.getTargetPointer().getFirst(game, source)); + if (player != null) { + Target target = new TargetPermanent(true); + if (target.canChoose(source.getSourceId(), player.getId(), game) + && player.choose(outcome, target, source.getSourceId(), game)) { + Permanent targetPermanent = game.getPermanent(target.getFirstTarget()); + if (targetPermanent != null) { + if (targetPermanent.isTapped()) { + if (player.chooseUse(Outcome.Untap, "Untap that permanent?", game)) { + targetPermanent.untap(game); + } + } else { + if (player.chooseUse(Outcome.Tap, "Tap that permanent?", game)) { + targetPermanent.tap(game); + } + } + return true; + } + } + } + return false; + } + + @Override + public CurseOfInertiaTapOrUntapTargetEffect copy() { + return new CurseOfInertiaTapOrUntapTargetEffect(this); + } + +} diff --git a/Mage.Sets/src/mage/sets/commander2013/CurseOfPredation.java b/Mage.Sets/src/mage/sets/commander2013/CurseOfPredation.java new file mode 100644 index 0000000000..e397fdfa20 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2013/CurseOfPredation.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.UUID; +import mage.abilities.TriggeredAbilityImpl; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.AttachEffect; +import mage.abilities.effects.common.counter.AddCountersTargetEffect; +import mage.abilities.keyword.EnchantAbility; +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.game.Game; +import mage.game.events.GameEvent; +import mage.game.events.GameEvent.EventType; +import mage.game.permanent.Permanent; +import mage.players.Player; +import mage.target.TargetPlayer; +import mage.target.targetpointer.FixedTarget; + +/** + * + * @author LevelX2 + */ +public class CurseOfPredation extends CardImpl { + + public CurseOfPredation(UUID ownerId) { + super(ownerId, 140, "Curse of Predation", Rarity.UNCOMMON, new CardType[]{CardType.ENCHANTMENT}, "{2}{G}"); + this.expansionSetCode = "C13"; + this.subtype.add("Aura"); + this.subtype.add("Curse"); + + this.color.setGreen(true); + + // Enchant player + TargetPlayer auraTarget = new TargetPlayer(); + this.getSpellAbility().addTarget(auraTarget); + this.getSpellAbility().addEffect(new AttachEffect(Outcome.BoostCreature)); + this.addAbility(new EnchantAbility(auraTarget.getTargetName())); + + // Whenever a creature attacks enchanted player, put a +1/+1 counter on it. + this.addAbility(new CurseOfPredationTriggeredAbility()); + } + + public CurseOfPredation(final CurseOfPredation card) { + super(card); + } + + @Override + public CurseOfPredation copy() { + return new CurseOfPredation(this); + } +} + +class CurseOfPredationTriggeredAbility extends TriggeredAbilityImpl { + + public CurseOfPredationTriggeredAbility() { + super(Zone.BATTLEFIELD, new AddCountersTargetEffect(CounterType.P1P1.createInstance(), Outcome.BoostCreature), false); + } + + public CurseOfPredationTriggeredAbility(Effect effect, boolean optional, String text) { + super(Zone.BATTLEFIELD, effect, optional); + } + + public CurseOfPredationTriggeredAbility(final CurseOfPredationTriggeredAbility ability) { + super(ability); + } + + @Override + public boolean checkTrigger(GameEvent event, Game game) { + if (event.getType().equals(EventType.ATTACKER_DECLARED)) { + Player defender = game.getPlayer(event.getTargetId()); + if (defender == null) { + Permanent planeswalker = game.getPermanent(event.getTargetId()); + if (planeswalker != null) { + defender = game.getPlayer(planeswalker.getControllerId()); + } + } + if (defender != null) { + Permanent enchantment = game.getPermanent(this.getSourceId()); + if (enchantment != null + && enchantment.getAttachedTo() != null + && enchantment.getAttachedTo().equals(defender.getId())) { + for (Effect effect: this.getEffects()) { + effect.setTargetPointer(new FixedTarget(event.getSourceId())); + } + return true; + } + } + } + return false; + } + + @Override + public String getRule() { + return "Whenever a creature attacks enchanted player, put a +1/+1 counter on it."; + } + + @Override + public CurseOfPredationTriggeredAbility copy() { + return new CurseOfPredationTriggeredAbility(this); + } + +} diff --git a/Mage.Sets/src/mage/sets/commander2013/CurseOfShallowGraves.java b/Mage.Sets/src/mage/sets/commander2013/CurseOfShallowGraves.java new file mode 100644 index 0000000000..df655ece7c --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2013/CurseOfShallowGraves.java @@ -0,0 +1,125 @@ +/* + * 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.dynamicvalue.common.StaticValue; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.AttachEffect; +import mage.abilities.effects.common.CreateTokenTargetEffect; +import mage.abilities.keyword.EnchantAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.game.events.GameEvent.EventType; +import mage.game.permanent.Permanent; +import mage.game.permanent.token.ZombieToken; +import mage.players.Player; +import mage.target.TargetPlayer; +import mage.target.targetpointer.FixedTarget; + +/** + * + * @author LevelX2 + */ +public class CurseOfShallowGraves extends CardImpl { + + public CurseOfShallowGraves(UUID ownerId) { + super(ownerId, 71, "Curse of Shallow Graves", Rarity.UNCOMMON, new CardType[]{CardType.ENCHANTMENT}, "{2}{B}"); + this.expansionSetCode = "C13"; + this.subtype.add("Aura"); + this.subtype.add("Curse"); + + this.color.setBlack(true); + + // Enchant player + TargetPlayer auraTarget = new TargetPlayer(); + this.getSpellAbility().addTarget(auraTarget); + this.getSpellAbility().addEffect(new AttachEffect(Outcome.PutCreatureInPlay)); + this.addAbility(new EnchantAbility(auraTarget.getTargetName())); + + // Whenever a player attacks enchanted player with one or more creatures, that attacking player may put a 2/2 black Zombie creature token onto the battlefield tapped. + this.addAbility(new CurseOfShallowTriggeredAbility()); + } + + public CurseOfShallowGraves(final CurseOfShallowGraves card) { + super(card); + } + + @Override + public CurseOfShallowGraves copy() { + return new CurseOfShallowGraves(this); + } +} + +class CurseOfShallowTriggeredAbility extends TriggeredAbilityImpl { + + public CurseOfShallowTriggeredAbility() { + super(Zone.BATTLEFIELD, new CreateTokenTargetEffect(new ZombieToken(), new StaticValue(1), true, false), true); + } + + public CurseOfShallowTriggeredAbility(Effect effect, boolean optional, String text) { + super(Zone.BATTLEFIELD, effect, optional); + } + + public CurseOfShallowTriggeredAbility(final CurseOfShallowTriggeredAbility ability) { + super(ability); + } + + @Override + public boolean checkTrigger(GameEvent event, Game game) { + if (event.getType().equals(EventType.DECLARED_ATTACKERS)) { + Permanent enchantment = game.getPermanent(this.getSourceId()); + if (enchantment != null + && enchantment.getAttachedTo() != null + && game.getCombat().getPlayerDefenders(game).contains(enchantment.getAttachedTo())) { + for (Effect effect: this.getEffects()) { + effect.setTargetPointer(new FixedTarget(game.getCombat().getAttackerId())); + } + return true; + } + } + return false; + } + + @Override + public String getRule() { + return "Whenever a player attacks enchanted player with one or more creatures, that attacking player may put a 2/2 black Zombie creature token onto the battlefield tapped."; + } + + @Override + public CurseOfShallowTriggeredAbility copy() { + return new CurseOfShallowTriggeredAbility(this); + } + +} diff --git a/Mage.Sets/src/mage/sets/commander2013/CurseOfTheForsaken.java b/Mage.Sets/src/mage/sets/commander2013/CurseOfTheForsaken.java new file mode 100644 index 0000000000..156ea57e03 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2013/CurseOfTheForsaken.java @@ -0,0 +1,132 @@ +/* + * 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.effects.Effect; +import mage.abilities.effects.common.AttachEffect; +import mage.abilities.effects.common.GainLifeTargetEffect; +import mage.abilities.keyword.EnchantAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.game.events.GameEvent.EventType; +import mage.game.permanent.Permanent; +import mage.players.Player; +import mage.target.TargetPlayer; +import mage.target.targetpointer.FixedTarget; + +/** + * + * @author LevelX2 + */ +public class CurseOfTheForsaken extends CardImpl { + + public CurseOfTheForsaken(UUID ownerId) { + super(ownerId, 8, "Curse of the Forsaken", Rarity.UNCOMMON, new CardType[]{CardType.ENCHANTMENT}, "{2}{W}"); + this.expansionSetCode = "C13"; + this.subtype.add("Aura"); + this.subtype.add("Curse"); + + this.color.setWhite(true); + + // Enchant player + TargetPlayer auraTarget = new TargetPlayer(); + this.getSpellAbility().addTarget(auraTarget); + this.getSpellAbility().addEffect(new AttachEffect(Outcome.GainLife)); + this.addAbility(new EnchantAbility(auraTarget.getTargetName())); + + // Whenever a creature attacks enchanted player, its controller gains 1 life. + this.addAbility(new CurseOfTheForsakenTriggeredAbility()); + } + + public CurseOfTheForsaken(final CurseOfTheForsaken card) { + super(card); + } + + @Override + public CurseOfTheForsaken copy() { + return new CurseOfTheForsaken(this); + } +} + +class CurseOfTheForsakenTriggeredAbility extends TriggeredAbilityImpl { + + public CurseOfTheForsakenTriggeredAbility() { + super(Zone.BATTLEFIELD, new GainLifeTargetEffect(1), false); + } + + public CurseOfTheForsakenTriggeredAbility(Effect effect, boolean optional, String text) { + super(Zone.BATTLEFIELD, effect, optional); + } + + public CurseOfTheForsakenTriggeredAbility(final CurseOfTheForsakenTriggeredAbility ability) { + super(ability); + } + + @Override + public boolean checkTrigger(GameEvent event, Game game) { + if (event.getType().equals(EventType.ATTACKER_DECLARED)) { + Player defender = game.getPlayer(event.getTargetId()); + if (defender == null) { + Permanent planeswalker = game.getPermanent(event.getTargetId()); + if (planeswalker != null) { + defender = game.getPlayer(planeswalker.getControllerId()); + } + } + if (defender != null) { + Permanent enchantment = game.getPermanent(this.getSourceId()); + if (enchantment != null + && enchantment.getAttachedTo() != null + && enchantment.getAttachedTo().equals(defender.getId())) { + for (Effect effect: this.getEffects()) { + effect.setTargetPointer(new FixedTarget(event.getPlayerId())); + } + return true; + } + } + } + return false; + } + + @Override + public String getRule() { + return "Whenever a creature attacks enchanted player, its controller gains 1 life."; + } + + @Override + public CurseOfTheForsakenTriggeredAbility copy() { + return new CurseOfTheForsakenTriggeredAbility(this); + } + +} diff --git a/Mage.Sets/src/mage/sets/commander2013/DarksteelMutation.java b/Mage.Sets/src/mage/sets/commander2013/DarksteelMutation.java new file mode 100644 index 0000000000..a1619b2377 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2013/DarksteelMutation.java @@ -0,0 +1,99 @@ +/* + * 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.SimpleStaticAbility; +import mage.abilities.effects.common.AttachEffect; +import mage.abilities.effects.common.continious.BecomesCreatureAttachedEffect; +import mage.abilities.keyword.EnchantAbility; +import mage.abilities.keyword.IndestructibleAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.game.permanent.token.Token; +import mage.target.TargetPermanent; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LevelX2 + */ +public class DarksteelMutation extends CardImpl { + + public DarksteelMutation(UUID ownerId) { + super(ownerId, 9, "Darksteel Mutation", Rarity.UNCOMMON, new CardType[]{CardType.ENCHANTMENT}, "{1}{W}"); + this.expansionSetCode = "C13"; + this.subtype.add("Aura"); + + this.color.setWhite(true); + + // Enchant creature + TargetPermanent auraTarget = new TargetCreaturePermanent(); + this.getSpellAbility().addTarget(auraTarget); + this.getSpellAbility().addEffect(new AttachEffect(Outcome.AddAbility)); + Ability ability = new EnchantAbility(auraTarget.getTargetName()); + this.addAbility(ability); + + // Enchanted creature is a 0/1 Insect artifact creature with indestructible and loses all other abilities, card types, and creature types. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, + new BecomesCreatureAttachedEffect(new DarksteelMutationInsectToken(), + "Enchanted creature is a 0/1 Insect artifact creature with indestructible and loses all other abilities, card types, and creature types", + Duration.WhileOnBattlefield, true))); + + } + + public DarksteelMutation(final DarksteelMutation card) { + super(card); + } + + @Override + public DarksteelMutation copy() { + return new DarksteelMutation(this); + } +} + +class DarksteelMutationInsectToken extends Token { + + public DarksteelMutationInsectToken() { + super("Insect", "0/1 Insect artifact creature with indestructible"); + cardType.add(CardType.ARTIFACT); + cardType.add(CardType.CREATURE); + subtype.add("Insect"); + power = new MageInt(0); + toughness = new MageInt(1); + + this.addAbility(IndestructibleAbility.getInstance()); + } + +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/commander2013/DeadwoodTreefolk.java b/Mage.Sets/src/mage/sets/commander2013/DeadwoodTreefolk.java new file mode 100644 index 0000000000..495e594e37 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2013/DeadwoodTreefolk.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.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldAbility; +import mage.abilities.common.EntersBattlefieldOrDiesSourceTriggeredAbility; +import mage.abilities.effects.common.ReturnFromGraveyardToHandTargetEffect; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.abilities.keyword.VanishingSacrificeAbility; +import mage.abilities.keyword.VanishingUpkeepAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.counters.CounterType; +import mage.filter.common.FilterCreatureCard; +import mage.filter.predicate.mageobject.AnotherCardPredicate; +import mage.filter.predicate.permanent.AnotherPredicate; +import mage.target.Target; +import mage.target.common.TargetCardInYourGraveyard; + +/** + * + * @author LevelX2 + */ +public class DeadwoodTreefolk extends CardImpl { + + private static final FilterCreatureCard filter = new FilterCreatureCard("another creature card from your graveyard"); + static { + filter.add(new AnotherCardPredicate()); + } + + public DeadwoodTreefolk(UUID ownerId) { + super(ownerId, 141, "Deadwood Treefolk", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{5}{G}"); + this.expansionSetCode = "C13"; + this.subtype.add("Treefolk"); + + this.color.setGreen(true); + this.power = new MageInt(3); + this.toughness = new MageInt(6); + + // Vanishing 3 + Ability ability = new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.TIME.createInstance(3))); + ability.setRuleVisible(false); + this.addAbility(ability); + this.addAbility(new VanishingUpkeepAbility(3)); + this.addAbility(new VanishingSacrificeAbility()); + // When Deadwood Treefolk enters the battlefield or leaves the battlefield, return another target creature card from your graveyard to your hand. + ability = new EntersBattlefieldOrDiesSourceTriggeredAbility(new ReturnFromGraveyardToHandTargetEffect(), false); + Target target = new TargetCardInYourGraveyard(filter); + target.setRequired(true); + ability.addTarget(target); + this.addAbility(ability); + } + + public DeadwoodTreefolk(final DeadwoodTreefolk card) { + super(card); + } + + @Override + public DeadwoodTreefolk copy() { + return new DeadwoodTreefolk(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2013/FieryJustice.java b/Mage.Sets/src/mage/sets/commander2013/FieryJustice.java new file mode 100644 index 0000000000..7e5067bcd3 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2013/FieryJustice.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 FieryJustice extends mage.sets.iceage.FieryJustice { + + public FieryJustice(UUID ownerId) { + super(ownerId); + this.cardNumber = 188; + this.expansionSetCode = "C13"; + } + + public FieryJustice(final FieryJustice card) { + super(card); + } + + @Override + public FieryJustice copy() { + return new FieryJustice(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2013/FromTheAshes.java b/Mage.Sets/src/mage/sets/commander2013/FromTheAshes.java new file mode 100644 index 0000000000..04b8e86160 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2013/FromTheAshes.java @@ -0,0 +1,139 @@ +/* + * 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.HashMap; +import java.util.List; +import java.util.Map; +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.effects.OneShotEffect; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.common.FilterBasicLandCard; +import mage.filter.common.FilterLandPermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.CardTypePredicate; +import mage.filter.predicate.mageobject.SupertypePredicate; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; +import mage.target.Target; +import mage.target.common.TargetCardInLibrary; + +/** + * + * @author LevelX2 + */ +public class FromTheAshes extends CardImpl { + + public FromTheAshes(UUID ownerId) { + super(ownerId, 108, "From the Ashes", Rarity.RARE, new CardType[]{CardType.SORCERY}, "{3}{R}"); + this.expansionSetCode = "C13"; + + this.color.setRed(true); + + // Destroy all nonbasic lands. For each land destroyed this way, its controller may search his or her library for a basic land card and put it onto the battlefield. Then each player who searched his or her library this way shuffles it. + this.getSpellAbility().addEffect(new FromTheAshesEffect()); + } + + public FromTheAshes(final FromTheAshes card) { + super(card); + } + + @Override + public FromTheAshes copy() { + return new FromTheAshes(this); + } +} + +class FromTheAshesEffect extends OneShotEffect { + + private static final FilterLandPermanent filter = new FilterLandPermanent("creature an opponent controls"); + static { + filter.add(new CardTypePredicate(CardType.LAND)); + filter.add(Predicates.not(new SupertypePredicate("Basic"))); + } + + public FromTheAshesEffect() { + super(Outcome.Benefit); + this.staticText = "Destroy all nonbasic lands. For each land destroyed this way, its controller may search his or her library for a basic land card and put it onto the battlefield. Then each player who searched his or her library this way shuffles it"; + } + + public FromTheAshesEffect(final FromTheAshesEffect effect) { + super(effect); + } + + @Override + public FromTheAshesEffect copy() { + return new FromTheAshesEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null) { + Map playerAmount = new HashMap(); + for (UUID playerId : controller.getInRange()) { + Player player = game.getPlayer(playerId); + if (player != null) { + int amount = 0; + for (Permanent permanent : game.getBattlefield().getAllActivePermanents(filter, playerId, game)) { + amount++; + permanent.destroy(source.getSourceId(), game, false); + } + playerAmount.put(playerId, new Integer(amount)); + } + } + for(Map.Entry entry : playerAmount.entrySet()) { + Player player = game.getPlayer(entry.getKey()); + if (player != null) { + TargetCardInLibrary target = new TargetCardInLibrary(0, entry.getValue().intValue(), new FilterBasicLandCard()); + if (player.searchLibrary(target, game)) { + if (target.getTargets().size() > 0) { + for (UUID cardId: (List)target.getTargets()) { + Card card = player.getLibrary().getCard(cardId, game); + if (card != null) { + card.putOntoBattlefield(game, Zone.LIBRARY, source.getSourceId(), source.getControllerId(), false); + } + } + } + } + player.shuffleLibrary(game); + } + + } + return true; + } + return false; + } +} diff --git a/Mage.Sets/src/mage/sets/commander2013/GahijiHonoredOne.java b/Mage.Sets/src/mage/sets/commander2013/GahijiHonoredOne.java new file mode 100644 index 0000000000..49aebf9054 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2013/GahijiHonoredOne.java @@ -0,0 +1,128 @@ +/* + * 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.Set; +import java.util.UUID; +import mage.MageInt; +import mage.abilities.TriggeredAbilityImpl; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.continious.BoostTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.game.events.GameEvent.EventType; +import mage.game.permanent.Permanent; +import mage.players.Player; +import mage.target.targetpointer.FixedTarget; + +/** + * + * @author LevelX2 + */ +public class GahijiHonoredOne extends CardImpl { + + public GahijiHonoredOne(UUID ownerId) { + super(ownerId, 191, "Gahiji, Honored One", Rarity.MYTHIC, new CardType[]{CardType.CREATURE}, "{2}{R}{G}{W}"); + this.expansionSetCode = "C13"; + this.supertype.add("Legendary"); + this.subtype.add("Beast"); + + this.color.setRed(true); + this.color.setGreen(true); + this.color.setWhite(true); + this.power = new MageInt(4); + this.toughness = new MageInt(4); + + // Whenever a creature attacks one of your opponents or a planeswalker an opponent controls, that creature gets +2/+0 until end of turn. + this.addAbility(new GahijiHonoredOneTriggeredAbility()); + + } + + public GahijiHonoredOne(final GahijiHonoredOne card) { + super(card); + } + + @Override + public GahijiHonoredOne copy() { + return new GahijiHonoredOne(this); + } +} + +class GahijiHonoredOneTriggeredAbility extends TriggeredAbilityImpl { + + public GahijiHonoredOneTriggeredAbility() { + super(Zone.BATTLEFIELD, new BoostTargetEffect(2,0, Duration.EndOfTurn), false); + } + + public GahijiHonoredOneTriggeredAbility(Effect effect, boolean optional, String text) { + super(Zone.BATTLEFIELD, effect, optional); + } + + public GahijiHonoredOneTriggeredAbility(final GahijiHonoredOneTriggeredAbility ability) { + super(ability); + } + + @Override + public boolean checkTrigger(GameEvent event, Game game) { + if (event.getType().equals(EventType.ATTACKER_DECLARED)) { + Player defender = game.getPlayer(event.getTargetId()); + if (defender == null) { + Permanent planeswalker = game.getPermanent(event.getTargetId()); + if (planeswalker != null) { + defender = game.getPlayer(planeswalker.getControllerId()); + } + } + if (defender != null) { + Set opponents = game.getOpponents(this.getControllerId()); + if (opponents != null && opponents.contains(defender.getId())) { + for (Effect effect: this.getEffects()) { + effect.setTargetPointer(new FixedTarget(event.getSourceId())); + } + return true; + } + } + } + return false; + } + + @Override + public String getRule() { + return "Whenever a creature attacks one of your opponents or a planeswalker an opponent controls, that creature gets +2/+0 until end of turn."; + } + + @Override + public GahijiHonoredOneTriggeredAbility copy() { + return new GahijiHonoredOneTriggeredAbility(this); + } + +} diff --git a/Mage.Sets/src/mage/sets/commander2013/HullBreach.java b/Mage.Sets/src/mage/sets/commander2013/HullBreach.java new file mode 100644 index 0000000000..672f9c140c --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2013/HullBreach.java @@ -0,0 +1,94 @@ +/* + * 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.Mode; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.DestroyTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.common.FilterEnchantmentPermanent; +import mage.target.Target; +import mage.target.TargetPermanent; +import mage.target.common.TargetArtifactPermanent; +import mage.target.targetpointer.SecondTargetPointer; + +/** + * + * @author LevelX2 + */ +public class HullBreach extends CardImpl { + + public HullBreach(UUID ownerId) { + super(ownerId, 193, "Hull Breach", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{R}{G}"); + this.expansionSetCode = "C13"; + + this.color.setRed(true); + this.color.setGreen(true); + + // Choose one - Destroy target artifact; + this.getSpellAbility().addEffect(new DestroyTargetEffect()); + Target target = new TargetArtifactPermanent(); + target.setRequired(true); + this.getSpellAbility().addTarget(target); + // or destroy target enchantment; + Mode mode = new Mode(); + mode.getEffects().add(new DestroyTargetEffect()); + target = new TargetPermanent(new FilterEnchantmentPermanent()); + target.setRequired(true); + mode.getTargets().add(target); + this.getSpellAbility().addMode(mode); + // or destroy target artifact and target enchantment. + mode = new Mode(); + mode.getEffects().add(new DestroyTargetEffect()); + target = new TargetArtifactPermanent(); + target.setRequired(true); + mode.getTargets().add(target); + Effect effect = new DestroyTargetEffect(); + effect.setTargetPointer(new SecondTargetPointer()); + effect.setText("and target enchantment"); + mode.getEffects().add(effect); + target = new TargetPermanent(new FilterEnchantmentPermanent()); + target.setRequired(true); + mode.getTargets().add(target); + this.getSpellAbility().addMode(mode); + + + } + + public HullBreach(final HullBreach card) { + super(card); + } + + @Override + public HullBreach copy() { + return new HullBreach(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2013/OpalPalace.java b/Mage.Sets/src/mage/sets/commander2013/OpalPalace.java new file mode 100644 index 0000000000..1676db1028 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2013/OpalPalace.java @@ -0,0 +1,251 @@ +/* + * 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.Mana; +import mage.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.effects.ReplacementEffectImpl; +import mage.abilities.effects.common.ManaEffect; +import mage.abilities.mana.ColorlessManaAbility; +import mage.abilities.mana.SimpleManaAbility; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.choices.Choice; +import mage.choices.ChoiceImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.WatcherScope; +import mage.constants.Zone; +import mage.counters.CounterType; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.game.events.GameEvent.EventType; +import mage.game.permanent.Permanent; +import mage.game.stack.Spell; +import mage.players.Player; +import mage.watchers.WatcherImpl; + +/** + * + * @author LevelX2 + */ +public class OpalPalace extends CardImpl { + + public OpalPalace(UUID ownerId) { + super(ownerId, 310, "Opal Palace", Rarity.COMMON, new CardType[]{CardType.LAND}, ""); + this.expansionSetCode = "C13"; + + // {tap}: Add {1} to your mana pool. + this.addAbility(new ColorlessManaAbility()); + // {1}, {tap}: Add to your mana pool one mana of any color in your commander's color identity. If you spend this mana to cast your commander, it enters the battlefield with a number of +1/+1 counters on it equal to the number of times it's been cast from the command zone this game. + Ability ability = new SimpleManaAbility(Zone.BATTLEFIELD, new OpalPalaceManaEffect(), new GenericManaCost(1)); + ability.addCost(new TapSourceCost()); + this.addAbility(ability); + + ability = new SimpleStaticAbility(Zone.ALL, new OpalPalaceEntersBattlefieldEffect()); + ability.setRuleVisible(false); + this.addAbility(ability); + + this.addWatcher(new OpalPalaceWatcher()); + } + + public OpalPalace(final OpalPalace card) { + super(card); + } + + @Override + public OpalPalace copy() { + return new OpalPalace(this); + } +} + +class OpalPalaceManaEffect extends ManaEffect { + + public OpalPalaceManaEffect() { + super(); + this.staticText = "Add to your mana pool one mana of any color in your commander's color identity. If you spend this mana to cast your commander, it enters the battlefield with a number of +1/+1 counters on it equal to the number of times it's been cast from the command zone this game"; + } + + public OpalPalaceManaEffect(final OpalPalaceManaEffect effect) { + super(effect); + } + + @Override + public OpalPalaceManaEffect copy() { + return new OpalPalaceManaEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null) { + Card commander = game.getCard(controller.getCommanderId()); + if (commander != null) { + Mana commanderMana = commander.getManaCost().getMana(); + Choice choice = new ChoiceImpl(true); + choice.setMessage("Pick a mana color"); + if (commanderMana.getBlack() > 0) { + choice.getChoices().add("Black"); + } + if (commanderMana.getRed() > 0) { + choice.getChoices().add("Red"); + } + if (commanderMana.getBlue() > 0) { + choice.getChoices().add("Blue"); + } + if (commanderMana.getGreen() > 0) { + choice.getChoices().add("Green"); + } + if (commanderMana.getWhite() > 0) { + choice.getChoices().add("White"); + } + if (choice.getChoices().size() > 0) { + if (choice.getChoices().size() == 1) { + choice.setChoice(choice.getChoices().iterator().next()); + } else { + controller.choose(outcome, choice, game); + } + if (choice.getChoice().equals("Black")) { + controller.getManaPool().addMana(Mana.BlackMana, game, source); + } else if (choice.getChoice().equals("Blue")) { + controller.getManaPool().addMana(Mana.BlueMana, game, source); + } else if (choice.getChoice().equals("Red")) { + controller.getManaPool().addMana(Mana.RedMana, game, source); + } else if (choice.getChoice().equals("Green")) { + controller.getManaPool().addMana(Mana.GreenMana, game, source); + } else if (choice.getChoice().equals("White")) { + controller.getManaPool().addMana(Mana.WhiteMana, game, source); + } + } + return true; + } + } + return false; + } +} + +class OpalPalaceWatcher extends WatcherImpl { + + public List commanderId = new ArrayList(); + + public OpalPalaceWatcher() { + super("ManaPaidFromOpalPalaceWatcher", WatcherScope.CARD); + } + + public OpalPalaceWatcher(final OpalPalaceWatcher watcher) { + super(watcher); + } + + @Override + public OpalPalaceWatcher copy() { + return new OpalPalaceWatcher(this); + } + + @Override + public void watch(GameEvent event, Game game) { + if (event.getType() == GameEvent.EventType.MANA_PAYED) { + if (event.getSourceId().equals(this.getSourceId())) { + Spell spell = game.getStack().getSpell(event.getTargetId()); + if (spell != null) { + Card card = spell.getCard(); + if (card != null) { + for (UUID playerId :game.getPlayerList()) { + Player player = game.getPlayer(playerId); + if (player != null) { + if (player.getCommanderId() != null && player.getCommanderId().equals(card.getId())) { + commanderId.add(card.getId()); + break; + } + } + } + } + } + } + } + } + + @Override + public void reset() { + super.reset(); + commanderId.clear(); + } +} + +class OpalPalaceEntersBattlefieldEffect extends ReplacementEffectImpl { + + public OpalPalaceEntersBattlefieldEffect() { + super(Duration.EndOfGame, Outcome.BoostCreature, false); + staticText = "If you spend this mana to cast your commander, it enters the battlefield with a number of +1/+1 counters on it equal to the number of times it's been cast from the command zone this game"; + } + + public OpalPalaceEntersBattlefieldEffect(OpalPalaceEntersBattlefieldEffect effect) { + super(effect); + } + + @Override + public boolean applies(GameEvent event, Ability source, Game game) { + if (event.getType() == EventType.ENTERS_THE_BATTLEFIELD) { + OpalPalaceWatcher watcher = (OpalPalaceWatcher) game.getState().getWatchers().get("ManaPaidFromOpalPalaceWatcher", source.getSourceId()); + if (watcher != null) { + return watcher.commanderId.contains(event.getTargetId()); + } + } + return false; + } + + @Override + public boolean apply(Game game, Ability source) { + return false; + } + + @Override + public boolean replaceEvent(GameEvent event, Ability source, Game game) { + Permanent permanent = game.getPermanent(event.getTargetId()); + if (permanent != null) { + Integer castCount = (Integer)game.getState().getValue(permanent.getId() + "_castCount"); + if (castCount != null && castCount.intValue() > 1) { + permanent.addCounters(CounterType.P1P1.createInstance(castCount-1), game); + } + } + return false; + } + + @Override + public OpalPalaceEntersBattlefieldEffect copy() { + return new OpalPalaceEntersBattlefieldEffect(this); + } + +} diff --git a/Mage.Sets/src/mage/sets/commander2013/SavageTwister.java b/Mage.Sets/src/mage/sets/commander2013/SavageTwister.java new file mode 100644 index 0000000000..6eea55be8a --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2013/SavageTwister.java @@ -0,0 +1,63 @@ +/* + * 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.DamageAllEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.common.FilterCreaturePermanent; + +/** + * + * @author LevelX2 + */ +public class SavageTwister extends CardImpl { + + public SavageTwister(UUID ownerId) { + super(ownerId, 208, "Savage Twister", Rarity.UNCOMMON, new CardType[]{CardType.SORCERY}, "{X}{R}{G}"); + this.expansionSetCode = "C13"; + + this.color.setRed(true); + this.color.setGreen(true); + + // Savage Twister deals X damage to each creature. + this.getSpellAbility().addEffect(new DamageAllEffect(new ManacostVariableValue(), new FilterCreaturePermanent())); + } + + public SavageTwister(final SavageTwister card) { + super(card); + } + + @Override + public SavageTwister copy() { + return new SavageTwister(this); + } +} diff --git a/Mage.Sets/src/mage/sets/guildpact/SavageTwister.java b/Mage.Sets/src/mage/sets/guildpact/SavageTwister.java new file mode 100644 index 0000000000..558792ca2a --- /dev/null +++ b/Mage.Sets/src/mage/sets/guildpact/SavageTwister.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.guildpact; + +import java.util.UUID; + +/** + * + * @author LevelX2 + */ +public class SavageTwister extends mage.sets.commander2013.SavageTwister { + + public SavageTwister(UUID ownerId) { + super(ownerId); + this.cardNumber = 127; + this.expansionSetCode = "GPT"; + } + + public SavageTwister(final SavageTwister card) { + super(card); + } + + @Override + public SavageTwister copy() { + return new SavageTwister(this); + } +} diff --git a/Mage.Sets/src/mage/sets/iceage/FieryJustice.java b/Mage.Sets/src/mage/sets/iceage/FieryJustice.java new file mode 100644 index 0000000000..9945f6490d --- /dev/null +++ b/Mage.Sets/src/mage/sets/iceage/FieryJustice.java @@ -0,0 +1,73 @@ +/* + * 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.iceage; + +import java.util.UUID; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.DamageMultiEffect; +import mage.abilities.effects.common.GainLifeTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.target.common.TargetCreatureOrPlayerAmount; +import mage.target.common.TargetOpponent; +import mage.target.targetpointer.SecondTargetPointer; + +/** + * + * @author LevelX2 + */ +public class FieryJustice extends CardImpl { + + public FieryJustice(UUID ownerId) { + super(ownerId, 366, "Fiery Justice", Rarity.RARE, new CardType[]{CardType.SORCERY}, "{R}{G}{W}"); + this.expansionSetCode = "ICE"; + + this.color.setRed(true); + this.color.setGreen(true); + this.color.setWhite(true); + + // Fiery Justice deals 5 damage divided as you choose among any number of target creatures and/or players. Target opponent gains 5 life. + this.getSpellAbility().addEffect(new DamageMultiEffect(5)); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayerAmount(5)); + Effect effect = new GainLifeTargetEffect(5); + effect.setTargetPointer(new SecondTargetPointer()); + effect.setText("Target opponent gains 5 life"); + this.getSpellAbility().addEffect(effect); + this.getSpellAbility().addTarget(new TargetOpponent(true)); + } + + public FieryJustice(final FieryJustice card) { + super(card); + } + + @Override + public FieryJustice copy() { + return new FieryJustice(this); + } +} diff --git a/Mage.Sets/src/mage/sets/mirage/SavageTwister.java b/Mage.Sets/src/mage/sets/mirage/SavageTwister.java new file mode 100644 index 0000000000..0cd89b6e44 --- /dev/null +++ b/Mage.Sets/src/mage/sets/mirage/SavageTwister.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.mirage; + +import java.util.UUID; + +/** + * + * @author LevelX2 + */ +public class SavageTwister extends mage.sets.commander2013.SavageTwister { + + public SavageTwister(UUID ownerId) { + super(ownerId); + this.cardNumber = 340; + this.expansionSetCode = "MIR"; + } + + public SavageTwister(final SavageTwister card) { + super(card); + } + + @Override + public SavageTwister copy() { + return new SavageTwister(this); + } +} diff --git a/Mage.Sets/src/mage/sets/planarchaos/DeadwoodTreefolk.java b/Mage.Sets/src/mage/sets/planarchaos/DeadwoodTreefolk.java new file mode 100644 index 0000000000..5e46deaef0 --- /dev/null +++ b/Mage.Sets/src/mage/sets/planarchaos/DeadwoodTreefolk.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.planarchaos; + +import java.util.UUID; + +/** + * + * @author LevelX2 + */ +public class DeadwoodTreefolk extends mage.sets.commander2013.DeadwoodTreefolk { + + public DeadwoodTreefolk(UUID ownerId) { + super(ownerId); + this.cardNumber = 126; + this.expansionSetCode = "PLC"; + } + + public DeadwoodTreefolk(final DeadwoodTreefolk card) { + super(card); + } + + @Override + public DeadwoodTreefolk copy() { + return new DeadwoodTreefolk(this); + } +} diff --git a/Mage.Sets/src/mage/sets/planechase/HullBreach.java b/Mage.Sets/src/mage/sets/planechase/HullBreach.java new file mode 100644 index 0000000000..10858e8edb --- /dev/null +++ b/Mage.Sets/src/mage/sets/planechase/HullBreach.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.planechase; + +import java.util.UUID; + +/** + * + * @author LevelX2 + */ +public class HullBreach extends mage.sets.commander2013.HullBreach { + + public HullBreach(UUID ownerId) { + super(ownerId); + this.cardNumber = 89; + this.expansionSetCode = "HOP"; + } + + public HullBreach(final HullBreach card) { + super(card); + } + + @Override + public HullBreach copy() { + return new HullBreach(this); + } +} diff --git a/Mage.Sets/src/mage/sets/planechase/SavageTwister.java b/Mage.Sets/src/mage/sets/planechase/SavageTwister.java new file mode 100644 index 0000000000..ea4a81d658 --- /dev/null +++ b/Mage.Sets/src/mage/sets/planechase/SavageTwister.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.planechase; + +import java.util.UUID; + +/** + * + * @author LevelX2 + */ +public class SavageTwister extends mage.sets.commander2013.SavageTwister { + + public SavageTwister(UUID ownerId) { + super(ownerId); + this.cardNumber = 94; + this.expansionSetCode = "HOP"; + } + + public SavageTwister(final SavageTwister card) { + super(card); + } + + @Override + public SavageTwister copy() { + return new SavageTwister(this); + } +} diff --git a/Mage.Sets/src/mage/sets/planeshift/HullBreach.java b/Mage.Sets/src/mage/sets/planeshift/HullBreach.java new file mode 100644 index 0000000000..44032cdc0f --- /dev/null +++ b/Mage.Sets/src/mage/sets/planeshift/HullBreach.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 HullBreach extends mage.sets.commander2013.HullBreach { + + public HullBreach(UUID ownerId) { + super(ownerId); + this.cardNumber = 111; + this.expansionSetCode = "PLS"; + } + + public HullBreach(final HullBreach card) { + super(card); + } + + @Override + public HullBreach copy() { + return new HullBreach(this); + } +} diff --git a/Mage.Sets/src/mage/sets/timeshifted/FieryJustice.java b/Mage.Sets/src/mage/sets/timeshifted/FieryJustice.java new file mode 100644 index 0000000000..c2eb4c6105 --- /dev/null +++ b/Mage.Sets/src/mage/sets/timeshifted/FieryJustice.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 FieryJustice extends mage.sets.iceage.FieryJustice { + + public FieryJustice(UUID ownerId) { + super(ownerId); + this.cardNumber = 92; + this.expansionSetCode = "TSB"; + this.rarity = Rarity.SPECIAL; + } + + public FieryJustice(final FieryJustice card) { + super(card); + } + + @Override + public FieryJustice copy() { + return new FieryJustice(this); + } +}