From 87a5ce620df264b72f565e54def4edcae595eb4e Mon Sep 17 00:00:00 2001 From: LoneFox Date: Fri, 26 Jun 2015 10:36:16 +0300 Subject: [PATCH 1/7] Simplify Gerrard's Wisdom --- .../mage/sets/starter1999/GerrardsWisdom.java | 25 +++---------------- 1 file changed, 3 insertions(+), 22 deletions(-) diff --git a/Mage.Sets/src/mage/sets/starter1999/GerrardsWisdom.java b/Mage.Sets/src/mage/sets/starter1999/GerrardsWisdom.java index 49ee41b9192..da9dbc57515 100644 --- a/Mage.Sets/src/mage/sets/starter1999/GerrardsWisdom.java +++ b/Mage.Sets/src/mage/sets/starter1999/GerrardsWisdom.java @@ -28,15 +28,12 @@ package mage.sets.starter1999; import java.util.UUID; -import mage.abilities.Ability; -import mage.abilities.dynamicvalue.DynamicValue; +import mage.abilities.dynamicvalue.MultipliedValue; import mage.abilities.dynamicvalue.common.CardsInControllerHandCount; -import mage.abilities.effects.Effect; import mage.abilities.effects.common.GainLifeEffect; import mage.cards.CardImpl; import mage.constants.CardType; import mage.constants.Rarity; -import mage.game.Game; /** * @@ -50,7 +47,8 @@ public class GerrardsWisdom extends CardImpl { this.expansionSetCode = "S99"; // You gain 2 life for each card in your hand. - this.getSpellAbility().addEffect(new GainLifeEffect(new TwiceCardsInControllerHandCount())); + this.getSpellAbility().addEffect(new GainLifeEffect(new MultipliedValue(new CardsInControllerHandCount(), 2), + "You gain 2 life for each card in your hand")); } public GerrardsWisdom(final GerrardsWisdom card) { @@ -62,20 +60,3 @@ public class GerrardsWisdom extends CardImpl { return new GerrardsWisdom(this); } } - -class TwiceCardsInControllerHandCount extends CardsInControllerHandCount { - @Override - public int calculate(Game game, Ability sourceAbility, Effect effect) { - return 2 * super.calculate(game, sourceAbility, effect); - } - - @Override - public DynamicValue copy() { - return new TwiceCardsInControllerHandCount(); - } - - @Override - public String toString() { - return "2"; - } -} From 33690f902f372ff762243c34eb17ef0b3e729168 Mon Sep 17 00:00:00 2001 From: LoneFox Date: Fri, 26 Jun 2015 13:16:03 +0300 Subject: [PATCH 2/7] Implement cards: Baleful Stare, Telepathic Spies, Wall of Wonder, and Withering Gaze --- .../src/mage/sets/legends/WallOfWonder.java | 55 +++++++++ .../mage/sets/ninthedition/BalefulStare.java | 114 ++++++++++++++++++ .../mage/sets/ninthedition/WitheringGaze.java | 53 ++++++++ .../src/mage/sets/portal/BalefulStare.java | 53 ++++++++ .../src/mage/sets/portal/WitheringGaze.java | 114 ++++++++++++++++++ .../sets/seventhedition/BalefulStare.java | 53 ++++++++ .../sets/seventhedition/TelepathicSpies.java | 53 ++++++++ .../sets/seventhedition/WallOfWonder.java | 75 ++++++++++++ .../sets/urzasdestiny/TelepathicSpies.java | 69 +++++++++++ 9 files changed, 639 insertions(+) create mode 100644 Mage.Sets/src/mage/sets/legends/WallOfWonder.java create mode 100644 Mage.Sets/src/mage/sets/ninthedition/BalefulStare.java create mode 100644 Mage.Sets/src/mage/sets/ninthedition/WitheringGaze.java create mode 100644 Mage.Sets/src/mage/sets/portal/BalefulStare.java create mode 100644 Mage.Sets/src/mage/sets/portal/WitheringGaze.java create mode 100644 Mage.Sets/src/mage/sets/seventhedition/BalefulStare.java create mode 100644 Mage.Sets/src/mage/sets/seventhedition/TelepathicSpies.java create mode 100644 Mage.Sets/src/mage/sets/seventhedition/WallOfWonder.java create mode 100644 Mage.Sets/src/mage/sets/urzasdestiny/TelepathicSpies.java diff --git a/Mage.Sets/src/mage/sets/legends/WallOfWonder.java b/Mage.Sets/src/mage/sets/legends/WallOfWonder.java new file mode 100644 index 00000000000..70cadb80a2f --- /dev/null +++ b/Mage.Sets/src/mage/sets/legends/WallOfWonder.java @@ -0,0 +1,55 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.legends; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author LoneFox + + */ +public class WallOfWonder extends mage.sets.seventhedition.WallOfWonder { + + public WallOfWonder(UUID ownerId) { + super(ownerId); + this.cardNumber = 85; + this.expansionSetCode = "LEG"; + this.rarity = Rarity.UNCOMMON; + } + + public WallOfWonder(final WallOfWonder card) { + super(card); + } + + @Override + public WallOfWonder copy() { + return new WallOfWonder(this); + } +} diff --git a/Mage.Sets/src/mage/sets/ninthedition/BalefulStare.java b/Mage.Sets/src/mage/sets/ninthedition/BalefulStare.java new file mode 100644 index 00000000000..c6270de3219 --- /dev/null +++ b/Mage.Sets/src/mage/sets/ninthedition/BalefulStare.java @@ -0,0 +1,114 @@ +/* + * 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.ninthedition; + +import java.util.UUID; +import mage.ObjectColor; +import mage.abilities.Ability; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.RevealHandTargetEffect; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.filter.FilterCard; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.ColorPredicate; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.game.Game; +import mage.players.Player; +import mage.target.common.TargetOpponent; + +/** + * + * @author LoneFox + + */ +public class BalefulStare extends CardImpl { + + public BalefulStare(UUID ownerId) { + super(ownerId, 64, "Baleful Stare", Rarity.UNCOMMON, new CardType[]{CardType.SORCERY}, "{2}{U}"); + this.expansionSetCode = "9ED"; + + // Target opponent reveals his or her hand. You draw a card for each Mountain and red card in it. + this.getSpellAbility().addEffect(new RevealHandTargetEffect()); + this.getSpellAbility().addEffect(new BalefulStareEffect()); + this.getSpellAbility().addTarget(new TargetOpponent()); + } + + public BalefulStare(final BalefulStare card) { + super(card); + } + + @Override + public BalefulStare copy() { + return new BalefulStare(this); + } +} + +class BalefulStareEffect extends OneShotEffect { + + private static final FilterCard filter = new FilterCard("Mountain or red card"); + + static { + filter.add(Predicates.or(new SubtypePredicate("Mountain"), + new ColorPredicate(ObjectColor.RED))); + } + + public BalefulStareEffect() { + super(Outcome.DrawCard); + this.staticText = "You draw a card for each Mountain and red card in it"; + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + Player targetPlayer = game.getPlayer(source.getTargets().getFirstTarget()); + if(controller != null && targetPlayer != null) { + int count = 0; + for(Card card : targetPlayer.getHand().getCards(game)) { + if(filter.match(card, game)) { + count++; + } + } + controller.drawCards(count, game); + return true; + } + return false; + } + + public BalefulStareEffect(final BalefulStareEffect effect) { + super(effect); + } + + @Override + public BalefulStareEffect copy() { + return new BalefulStareEffect(this); + } +} diff --git a/Mage.Sets/src/mage/sets/ninthedition/WitheringGaze.java b/Mage.Sets/src/mage/sets/ninthedition/WitheringGaze.java new file mode 100644 index 00000000000..7794567e2ef --- /dev/null +++ b/Mage.Sets/src/mage/sets/ninthedition/WitheringGaze.java @@ -0,0 +1,53 @@ +/* + * 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.ninthedition; + +import java.util.UUID; + +/** + * + * @author LoneFox + + */ +public class WitheringGaze extends mage.sets.portal.WitheringGaze { + + public WitheringGaze(UUID ownerId) { + super(ownerId); + this.cardNumber = 113; + this.expansionSetCode = "9ED"; + } + + public WitheringGaze(final WitheringGaze card) { + super(card); + } + + @Override + public WitheringGaze copy() { + return new WitheringGaze(this); + } +} diff --git a/Mage.Sets/src/mage/sets/portal/BalefulStare.java b/Mage.Sets/src/mage/sets/portal/BalefulStare.java new file mode 100644 index 00000000000..f89cf1e238a --- /dev/null +++ b/Mage.Sets/src/mage/sets/portal/BalefulStare.java @@ -0,0 +1,53 @@ +/* + * 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.portal; + +import java.util.UUID; + +/** + * + * @author LoneFox + + */ +public class BalefulStare extends mage.sets.ninthedition.BalefulStare { + + public BalefulStare(UUID ownerId) { + super(ownerId); + this.cardNumber = 43; + this.expansionSetCode = "POR"; + } + + public BalefulStare(final BalefulStare card) { + super(card); + } + + @Override + public BalefulStare copy() { + return new BalefulStare(this); + } +} diff --git a/Mage.Sets/src/mage/sets/portal/WitheringGaze.java b/Mage.Sets/src/mage/sets/portal/WitheringGaze.java new file mode 100644 index 00000000000..5be12d7efc6 --- /dev/null +++ b/Mage.Sets/src/mage/sets/portal/WitheringGaze.java @@ -0,0 +1,114 @@ +/* + * 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.portal; + +import java.util.UUID; +import mage.ObjectColor; +import mage.abilities.Ability; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.RevealHandTargetEffect; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.filter.FilterCard; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.ColorPredicate; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.game.Game; +import mage.players.Player; +import mage.target.common.TargetOpponent; + +/** + * + * @author LoneFox + + */ +public class WitheringGaze extends CardImpl { + + public WitheringGaze(UUID ownerId) { + super(ownerId, 79, "Withering Gaze", Rarity.UNCOMMON, new CardType[]{CardType.SORCERY}, "{2}{U}"); + this.expansionSetCode = "POR"; + + // Target opponent reveals his or her hand. You draw a card for each Forest and green card in it. + this.getSpellAbility().addEffect(new RevealHandTargetEffect()); + this.getSpellAbility().addEffect(new WitheringGazeEffect()); + this.getSpellAbility().addTarget(new TargetOpponent()); + } + + public WitheringGaze(final WitheringGaze card) { + super(card); + } + + @Override + public WitheringGaze copy() { + return new WitheringGaze(this); + } +} + +class WitheringGazeEffect extends OneShotEffect { + + private static final FilterCard filter = new FilterCard("Forest or green card"); + + static { + filter.add(Predicates.or(new SubtypePredicate("Forest"), + new ColorPredicate(ObjectColor.GREEN))); + } + + public WitheringGazeEffect() { + super(Outcome.DrawCard); + this.staticText = "You draw a card for each Forest and green card in it"; + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + Player targetPlayer = game.getPlayer(source.getTargets().getFirstTarget()); + if(controller != null && targetPlayer != null) { + int count = 0; + for(Card card : targetPlayer.getHand().getCards(game)) { + if(filter.match(card, game)) { + count++; + } + } + controller.drawCards(count, game); + return true; + } + return false; + } + + public WitheringGazeEffect(final WitheringGazeEffect effect) { + super(effect); + } + + @Override + public WitheringGazeEffect copy() { + return new WitheringGazeEffect(this); + } +} diff --git a/Mage.Sets/src/mage/sets/seventhedition/BalefulStare.java b/Mage.Sets/src/mage/sets/seventhedition/BalefulStare.java new file mode 100644 index 00000000000..dd27713ec3a --- /dev/null +++ b/Mage.Sets/src/mage/sets/seventhedition/BalefulStare.java @@ -0,0 +1,53 @@ +/* + * 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.seventhedition; + +import java.util.UUID; + +/** + * + * @author LoneFox + + */ +public class BalefulStare extends mage.sets.ninthedition.BalefulStare { + + public BalefulStare(UUID ownerId) { + super(ownerId); + this.cardNumber = 62; + this.expansionSetCode = "7ED"; + } + + public BalefulStare(final BalefulStare card) { + super(card); + } + + @Override + public BalefulStare copy() { + return new BalefulStare(this); + } +} diff --git a/Mage.Sets/src/mage/sets/seventhedition/TelepathicSpies.java b/Mage.Sets/src/mage/sets/seventhedition/TelepathicSpies.java new file mode 100644 index 00000000000..e774577563f --- /dev/null +++ b/Mage.Sets/src/mage/sets/seventhedition/TelepathicSpies.java @@ -0,0 +1,53 @@ +/* + * 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.seventhedition; + +import java.util.UUID; + +/** + * + * @author LoneFox + + */ +public class TelepathicSpies extends mage.sets.urzasdestiny.TelepathicSpies { + + public TelepathicSpies(UUID ownerId) { + super(ownerId); + this.cardNumber = 101; + this.expansionSetCode = "7ED"; + } + + public TelepathicSpies(final TelepathicSpies card) { + super(card); + } + + @Override + public TelepathicSpies copy() { + return new TelepathicSpies(this); + } +} diff --git a/Mage.Sets/src/mage/sets/seventhedition/WallOfWonder.java b/Mage.Sets/src/mage/sets/seventhedition/WallOfWonder.java new file mode 100644 index 00000000000..8626e9783a1 --- /dev/null +++ b/Mage.Sets/src/mage/sets/seventhedition/WallOfWonder.java @@ -0,0 +1,75 @@ +/* + * 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.seventhedition; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.combat.CanAttackAsThoughtItDidntHaveDefenderSourceEffect; +import mage.abilities.effects.common.continuous.BoostSourceEffect; +import mage.abilities.keyword.DefenderAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; + +/** + * + * @author LoneFox + + */ +public class WallOfWonder extends CardImpl { + + public WallOfWonder(UUID ownerId) { + super(ownerId, 112, "Wall of Wonder", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{2}{U}{U}"); + this.expansionSetCode = "7ED"; + this.subtype.add("Wall"); + this.power = new MageInt(1); + this.toughness = new MageInt(5); + + // Defender + this.addAbility(DefenderAbility.getInstance()); + // {2}{U}{U}: Wall of Wonder gets +4/-4 until end of turn and can attack this turn as though it didn't have defender. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostSourceEffect(4, -4, Duration.EndOfTurn), + new ManaCostsImpl("{2}{U}{U}")); + ability.addEffect(new CanAttackAsThoughtItDidntHaveDefenderSourceEffect(Duration.EndOfTurn)); + this.addAbility(ability); + } + + public WallOfWonder(final WallOfWonder card) { + super(card); + } + + @Override + public WallOfWonder copy() { + return new WallOfWonder(this); + } +} diff --git a/Mage.Sets/src/mage/sets/urzasdestiny/TelepathicSpies.java b/Mage.Sets/src/mage/sets/urzasdestiny/TelepathicSpies.java new file mode 100644 index 00000000000..02ccd3465b6 --- /dev/null +++ b/Mage.Sets/src/mage/sets/urzasdestiny/TelepathicSpies.java @@ -0,0 +1,69 @@ +/* + * 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.urzasdestiny; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.common.LookAtTargetPlayerHandEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.target.common.TargetOpponent; + +/** + * + * @author LoneFox + + */ +public class TelepathicSpies extends CardImpl { + + public TelepathicSpies(UUID ownerId) { + super(ownerId, 47, "Telepathic Spies", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{2}{U}"); + this.expansionSetCode = "UDS"; + this.subtype.add("Human"); + this.subtype.add("Wizard"); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // When Telepathic Spies enters the battlefield, look at target opponent's hand. + Ability ability = new EntersBattlefieldTriggeredAbility(new LookAtTargetPlayerHandEffect(), false); + ability.addTarget(new TargetOpponent()); + this.addAbility(ability); + } + + public TelepathicSpies(final TelepathicSpies card) { + super(card); + } + + @Override + public TelepathicSpies copy() { + return new TelepathicSpies(this); + } +} From 2a477a26833838ab8a34389621393464d5391756 Mon Sep 17 00:00:00 2001 From: LoneFox Date: Fri, 26 Jun 2015 14:15:24 +0300 Subject: [PATCH 3/7] Implement cards: Grafted Skullcap, Nature's Revolt, Sqouthern Paladin, and Squall --- .../mage/sets/masterseditioniv/Squall.java | 55 +++++++++++++ .../mage/sets/mercadianmasques/Squall.java | 53 ++++++++++++ .../sets/seventhedition/GraftedSkullcap.java | 53 ++++++++++++ .../sets/seventhedition/NaturesRevolt.java | 75 +++++++++++++++++ .../sets/seventhedition/SouthernPaladin.java | 82 +++++++++++++++++++ .../src/mage/sets/seventhedition/Squall.java | 53 ++++++++++++ .../src/mage/sets/starter1999/Squall.java | 68 +++++++++++++++ .../src/mage/sets/tempest/NaturesRevolt.java | 53 ++++++++++++ .../mage/sets/urzassaga/GraftedSkullcap.java | 67 +++++++++++++++ .../sets/weatherlight/SouthernPaladin.java | 53 ++++++++++++ 10 files changed, 612 insertions(+) create mode 100644 Mage.Sets/src/mage/sets/masterseditioniv/Squall.java create mode 100644 Mage.Sets/src/mage/sets/mercadianmasques/Squall.java create mode 100644 Mage.Sets/src/mage/sets/seventhedition/GraftedSkullcap.java create mode 100644 Mage.Sets/src/mage/sets/seventhedition/NaturesRevolt.java create mode 100644 Mage.Sets/src/mage/sets/seventhedition/SouthernPaladin.java create mode 100644 Mage.Sets/src/mage/sets/seventhedition/Squall.java create mode 100644 Mage.Sets/src/mage/sets/starter1999/Squall.java create mode 100644 Mage.Sets/src/mage/sets/tempest/NaturesRevolt.java create mode 100644 Mage.Sets/src/mage/sets/urzassaga/GraftedSkullcap.java create mode 100644 Mage.Sets/src/mage/sets/weatherlight/SouthernPaladin.java diff --git a/Mage.Sets/src/mage/sets/masterseditioniv/Squall.java b/Mage.Sets/src/mage/sets/masterseditioniv/Squall.java new file mode 100644 index 00000000000..2ab5ac74eed --- /dev/null +++ b/Mage.Sets/src/mage/sets/masterseditioniv/Squall.java @@ -0,0 +1,55 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.masterseditioniv; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author LoneFox + + */ +public class Squall extends mage.sets.starter1999.Squall { + + public Squall(UUID ownerId) { + super(ownerId); + this.cardNumber = 168; + this.expansionSetCode = "ME4"; + this.rarity = Rarity.UNCOMMON; + } + + public Squall(final Squall card) { + super(card); + } + + @Override + public Squall copy() { + return new Squall(this); + } +} diff --git a/Mage.Sets/src/mage/sets/mercadianmasques/Squall.java b/Mage.Sets/src/mage/sets/mercadianmasques/Squall.java new file mode 100644 index 00000000000..3b7a20c7143 --- /dev/null +++ b/Mage.Sets/src/mage/sets/mercadianmasques/Squall.java @@ -0,0 +1,53 @@ +/* + * 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.mercadianmasques; + +import java.util.UUID; + +/** + * + * @author LoneFox + + */ +public class Squall extends mage.sets.starter1999.Squall { + + public Squall(UUID ownerId) { + super(ownerId); + this.cardNumber = 275; + this.expansionSetCode = "MMQ"; + } + + public Squall(final Squall card) { + super(card); + } + + @Override + public Squall copy() { + return new Squall(this); + } +} diff --git a/Mage.Sets/src/mage/sets/seventhedition/GraftedSkullcap.java b/Mage.Sets/src/mage/sets/seventhedition/GraftedSkullcap.java new file mode 100644 index 00000000000..f141c9371cd --- /dev/null +++ b/Mage.Sets/src/mage/sets/seventhedition/GraftedSkullcap.java @@ -0,0 +1,53 @@ +/* + * 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.seventhedition; + +import java.util.UUID; + +/** + * + * @author LoneFox + + */ +public class GraftedSkullcap extends mage.sets.urzassaga.GraftedSkullcap { + + public GraftedSkullcap(UUID ownerId) { + super(ownerId); + this.cardNumber = 298; + this.expansionSetCode = "7ED"; + } + + public GraftedSkullcap(final GraftedSkullcap card) { + super(card); + } + + @Override + public GraftedSkullcap copy() { + return new GraftedSkullcap(this); + } +} diff --git a/Mage.Sets/src/mage/sets/seventhedition/NaturesRevolt.java b/Mage.Sets/src/mage/sets/seventhedition/NaturesRevolt.java new file mode 100644 index 00000000000..ecbe73895ee --- /dev/null +++ b/Mage.Sets/src/mage/sets/seventhedition/NaturesRevolt.java @@ -0,0 +1,75 @@ +/* + * 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.seventhedition; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.continuous.BecomesCreatureAllEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.common.FilterLandPermanent; +import mage.game.permanent.token.Token; + +/** + * + * @author LoneFox + + */ +public class NaturesRevolt extends CardImpl { + + public NaturesRevolt(UUID ownerId) { + super(ownerId, 260, "Nature's Revolt", Rarity.RARE, new CardType[]{CardType.ENCHANTMENT}, "{3}{G}{G}"); + this.expansionSetCode = "7ED"; + + // All lands are 2/2 creatures that are still lands. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BecomesCreatureAllEffect(new NaturesRevoltToken(), + "lands", new FilterLandPermanent(), Duration.WhileOnBattlefield))); + } + + public NaturesRevolt(final NaturesRevolt card) { + super(card); + } + + @Override + public NaturesRevolt copy() { + return new NaturesRevolt(this); + } +} + +class NaturesRevoltToken extends Token { + public NaturesRevoltToken() { + super("Land", "2/2 creature"); + cardType.add(CardType.CREATURE); + power = new MageInt(2); + toughness = new MageInt(2); + } +} diff --git a/Mage.Sets/src/mage/sets/seventhedition/SouthernPaladin.java b/Mage.Sets/src/mage/sets/seventhedition/SouthernPaladin.java new file mode 100644 index 00000000000..4a7cacace63 --- /dev/null +++ b/Mage.Sets/src/mage/sets/seventhedition/SouthernPaladin.java @@ -0,0 +1,82 @@ +/* + * 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.seventhedition; + +import java.util.UUID; +import mage.MageInt; +import mage.ObjectColor; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.DestroyTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.FilterPermanent; +import mage.filter.predicate.mageobject.ColorPredicate; +import mage.target.TargetPermanent; + +/** + * + * @author LoneFox + + */ +public class SouthernPaladin extends CardImpl { + + private static final FilterPermanent filter = new FilterPermanent("red"); + + static { + filter.add(new ColorPredicate(ObjectColor.RED)); + } + + public SouthernPaladin(UUID ownerId) { + super(ownerId, 46, "Southern Paladin", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{2}{W}{W}"); + this.expansionSetCode = "7ED"; + this.subtype.add("Human"); + this.subtype.add("Knight"); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // {W}{W}, {tap}: Destroy target red permanent. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DestroyTargetEffect(), new ManaCostsImpl("{W}{W}")); + ability.addCost(new TapSourceCost()); + ability.addTarget(new TargetPermanent(filter)); + this.addAbility(ability); + } + + public SouthernPaladin(final SouthernPaladin card) { + super(card); + } + + @Override + public SouthernPaladin copy() { + return new SouthernPaladin(this); + } +} diff --git a/Mage.Sets/src/mage/sets/seventhedition/Squall.java b/Mage.Sets/src/mage/sets/seventhedition/Squall.java new file mode 100644 index 00000000000..b59c8591612 --- /dev/null +++ b/Mage.Sets/src/mage/sets/seventhedition/Squall.java @@ -0,0 +1,53 @@ +/* + * 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.seventhedition; + +import java.util.UUID; + +/** + * + * @author LoneFox + + */ +public class Squall extends mage.sets.starter1999.Squall { + + public Squall(UUID ownerId) { + super(ownerId); + this.cardNumber = 271; + this.expansionSetCode = "7ED"; + } + + public Squall(final Squall card) { + super(card); + } + + @Override + public Squall copy() { + return new Squall(this); + } +} diff --git a/Mage.Sets/src/mage/sets/starter1999/Squall.java b/Mage.Sets/src/mage/sets/starter1999/Squall.java new file mode 100644 index 00000000000..9c71e1ce275 --- /dev/null +++ b/Mage.Sets/src/mage/sets/starter1999/Squall.java @@ -0,0 +1,68 @@ +/* + * 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.starter1999; + +import java.util.UUID; +import mage.abilities.effects.common.DamageAllEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.AbilityPredicate; + +/** + * + * @author LoneFox + + */ +public class Squall extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature with flying"); + + static { + filter.add(new AbilityPredicate(FlyingAbility.class)); + } + + public Squall(UUID ownerId) { + super(ownerId, 143, "Squall", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{2}{G}"); + this.expansionSetCode = "S99"; + + // Squall deals 2 damage to each creature with flying. + this.getSpellAbility().addEffect(new DamageAllEffect(2, filter)); + } + + public Squall(final Squall card) { + super(card); + } + + @Override + public Squall copy() { + return new Squall(this); + } +} diff --git a/Mage.Sets/src/mage/sets/tempest/NaturesRevolt.java b/Mage.Sets/src/mage/sets/tempest/NaturesRevolt.java new file mode 100644 index 00000000000..e8fe7c2f6de --- /dev/null +++ b/Mage.Sets/src/mage/sets/tempest/NaturesRevolt.java @@ -0,0 +1,53 @@ +/* + * 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.tempest; + +import java.util.UUID; + +/** + * + * @author LoneFox + + */ +public class NaturesRevolt extends mage.sets.seventhedition.NaturesRevolt { + + public NaturesRevolt(UUID ownerId) { + super(ownerId); + this.cardNumber = 134; + this.expansionSetCode = "TMP"; + } + + public NaturesRevolt(final NaturesRevolt card) { + super(card); + } + + @Override + public NaturesRevolt copy() { + return new NaturesRevolt(this); + } +} diff --git a/Mage.Sets/src/mage/sets/urzassaga/GraftedSkullcap.java b/Mage.Sets/src/mage/sets/urzassaga/GraftedSkullcap.java new file mode 100644 index 00000000000..9ee7a370fe8 --- /dev/null +++ b/Mage.Sets/src/mage/sets/urzassaga/GraftedSkullcap.java @@ -0,0 +1,67 @@ +/* + * 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.urzassaga; + +import java.util.UUID; +import mage.abilities.common.BeginningOfDrawTriggeredAbility; +import mage.abilities.common.BeginningOfEndStepTriggeredAbility; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.abilities.effects.common.discard.DiscardHandControllerEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.TargetController; + +/** + * + * @author LoneFox + + */ +public class GraftedSkullcap extends CardImpl { + + public GraftedSkullcap(UUID ownerId) { + super(ownerId, 296, "Grafted Skullcap", Rarity.RARE, new CardType[]{CardType.ARTIFACT}, "{4}"); + this.expansionSetCode = "USG"; + + // At the beginning of your draw step, draw an additional card. + this.addAbility(new BeginningOfDrawTriggeredAbility(new DrawCardSourceControllerEffect(1), + TargetController.YOU, false)); + // At the beginning of your end step, discard your hand. + this.addAbility(new BeginningOfEndStepTriggeredAbility(new DiscardHandControllerEffect(), + TargetController.YOU, false)); + } + + public GraftedSkullcap(final GraftedSkullcap card) { + super(card); + } + + @Override + public GraftedSkullcap copy() { + return new GraftedSkullcap(this); + } +} diff --git a/Mage.Sets/src/mage/sets/weatherlight/SouthernPaladin.java b/Mage.Sets/src/mage/sets/weatherlight/SouthernPaladin.java new file mode 100644 index 00000000000..e8cbffcf3f2 --- /dev/null +++ b/Mage.Sets/src/mage/sets/weatherlight/SouthernPaladin.java @@ -0,0 +1,53 @@ +/* + * 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.weatherlight; + +import java.util.UUID; + +/** + * + * @author LoneFox + + */ +public class SouthernPaladin extends mage.sets.seventhedition.SouthernPaladin { + + public SouthernPaladin(UUID ownerId) { + super(ownerId); + this.cardNumber = 143; + this.expansionSetCode = "WTH"; + } + + public SouthernPaladin(final SouthernPaladin card) { + super(card); + } + + @Override + public SouthernPaladin copy() { + return new SouthernPaladin(this); + } +} From 98782dbacbd12adf4998321740d3f2ace974e1f3 Mon Sep 17 00:00:00 2001 From: LoneFox Date: Sat, 27 Jun 2015 10:28:06 +0300 Subject: [PATCH 4/7] Implement cards: Feroz's Ban, Nocturnal Raid, Shield Wall, and Tainted AEther --- .../src/mage/sets/fifthedition/FerozsBan.java | 65 ++++++++++++++++ .../mage/sets/fifthedition/ShieldWall.java | 55 ++++++++++++++ .../src/mage/sets/homelands/FerozsBan.java | 53 +++++++++++++ .../src/mage/sets/legends/ShieldWall.java | 60 +++++++++++++++ .../src/mage/sets/mirage/NocturnalRaid.java | 68 +++++++++++++++++ .../mage/sets/seventhedition/FerozsBan.java | 53 +++++++++++++ .../sets/seventhedition/NocturnalRaid.java | 53 +++++++++++++ .../mage/sets/seventhedition/ShieldWall.java | 55 ++++++++++++++ .../sets/seventhedition/TaintedAEther.java | 53 +++++++++++++ .../mage/sets/urzassaga/TaintedAEther.java | 74 +++++++++++++++++++ 10 files changed, 589 insertions(+) create mode 100644 Mage.Sets/src/mage/sets/fifthedition/FerozsBan.java create mode 100644 Mage.Sets/src/mage/sets/fifthedition/ShieldWall.java create mode 100644 Mage.Sets/src/mage/sets/homelands/FerozsBan.java create mode 100644 Mage.Sets/src/mage/sets/legends/ShieldWall.java create mode 100644 Mage.Sets/src/mage/sets/mirage/NocturnalRaid.java create mode 100644 Mage.Sets/src/mage/sets/seventhedition/FerozsBan.java create mode 100644 Mage.Sets/src/mage/sets/seventhedition/NocturnalRaid.java create mode 100644 Mage.Sets/src/mage/sets/seventhedition/ShieldWall.java create mode 100644 Mage.Sets/src/mage/sets/seventhedition/TaintedAEther.java create mode 100644 Mage.Sets/src/mage/sets/urzassaga/TaintedAEther.java diff --git a/Mage.Sets/src/mage/sets/fifthedition/FerozsBan.java b/Mage.Sets/src/mage/sets/fifthedition/FerozsBan.java new file mode 100644 index 00000000000..283c78fdc59 --- /dev/null +++ b/Mage.Sets/src/mage/sets/fifthedition/FerozsBan.java @@ -0,0 +1,65 @@ +/* + * 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.fifthedition; + +import java.util.UUID; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.cost.SpellsCostIncreasementAllEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.common.FilterCreatureCard; + +/** + * + * @author LoneFox + + */ +public class FerozsBan extends CardImpl { + + public FerozsBan(UUID ownerId) { + super(ownerId, 370, "Feroz's Ban", Rarity.RARE, new CardType[]{CardType.ARTIFACT}, "{6}"); + this.expansionSetCode = "5ED"; + + // Creature spells cost {2} more to cast. + Effect effect = new SpellsCostIncreasementAllEffect(new FilterCreatureCard(), 2); + effect.setText("Creature spells cost {2} more to cast."); + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect)); + } + + public FerozsBan(final FerozsBan card) { + super(card); + } + + @Override + public FerozsBan copy() { + return new FerozsBan(this); + } +} diff --git a/Mage.Sets/src/mage/sets/fifthedition/ShieldWall.java b/Mage.Sets/src/mage/sets/fifthedition/ShieldWall.java new file mode 100644 index 00000000000..bffa90cf0f3 --- /dev/null +++ b/Mage.Sets/src/mage/sets/fifthedition/ShieldWall.java @@ -0,0 +1,55 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.fifthedition; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author LoneFox + + */ +public class ShieldWall extends mage.sets.legends.ShieldWall { + + public ShieldWall(UUID ownerId) { + super(ownerId); + this.cardNumber = 339; + this.expansionSetCode = "5ED"; + this.rarity = Rarity.COMMON; + } + + public ShieldWall(final ShieldWall card) { + super(card); + } + + @Override + public ShieldWall copy() { + return new ShieldWall(this); + } +} diff --git a/Mage.Sets/src/mage/sets/homelands/FerozsBan.java b/Mage.Sets/src/mage/sets/homelands/FerozsBan.java new file mode 100644 index 00000000000..0a6f8dcf5ac --- /dev/null +++ b/Mage.Sets/src/mage/sets/homelands/FerozsBan.java @@ -0,0 +1,53 @@ +/* + * 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.homelands; + +import java.util.UUID; + +/** + * + * @author LoneFox + + */ +public class FerozsBan extends mage.sets.fifthedition.FerozsBan { + + public FerozsBan(UUID ownerId) { + super(ownerId); + this.cardNumber = 132; + this.expansionSetCode = "HML"; + } + + public FerozsBan(final FerozsBan card) { + super(card); + } + + @Override + public FerozsBan copy() { + return new FerozsBan(this); + } +} diff --git a/Mage.Sets/src/mage/sets/legends/ShieldWall.java b/Mage.Sets/src/mage/sets/legends/ShieldWall.java new file mode 100644 index 00000000000..374a7bcab56 --- /dev/null +++ b/Mage.Sets/src/mage/sets/legends/ShieldWall.java @@ -0,0 +1,60 @@ +/* + * 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.legends; + +import java.util.UUID; +import mage.abilities.effects.common.continuous.BoostControlledEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; + +/** + * + * @author LoneFox + + */ +public class ShieldWall extends CardImpl { + + public ShieldWall(UUID ownerId) { + super(ownerId, 205, "Shield Wall", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{1}{W}"); + this.expansionSetCode = "LEG"; + + // Creatures you control get +0/+2 until end of turn. + this.getSpellAbility().addEffect(new BoostControlledEffect(0, 2, Duration.EndOfTurn)); + } + + public ShieldWall(final ShieldWall card) { + super(card); + } + + @Override + public ShieldWall copy() { + return new ShieldWall(this); + } +} diff --git a/Mage.Sets/src/mage/sets/mirage/NocturnalRaid.java b/Mage.Sets/src/mage/sets/mirage/NocturnalRaid.java new file mode 100644 index 00000000000..8f6df45a8f8 --- /dev/null +++ b/Mage.Sets/src/mage/sets/mirage/NocturnalRaid.java @@ -0,0 +1,68 @@ +/* + * 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; +import mage.ObjectColor; +import mage.abilities.effects.common.continuous.BoostAllEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.ColorPredicate; + +/** + * + * @author LoneFox + + */ +public class NocturnalRaid extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("black creatures"); + static { + filter.add(new ColorPredicate(ObjectColor.BLACK)); + } + + public NocturnalRaid(UUID ownerId) { + super(ownerId, 30, "Nocturnal Raid", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{2}{B}{B}"); + this.expansionSetCode = "MIR"; + + // Black creatures get +2/+0 until end of turn. + this.getSpellAbility().addEffect(new BoostAllEffect(2, 0, Duration.EndOfTurn, filter, false)); + } + + public NocturnalRaid(final NocturnalRaid card) { + super(card); + } + + @Override + public NocturnalRaid copy() { + return new NocturnalRaid(this); + } +} diff --git a/Mage.Sets/src/mage/sets/seventhedition/FerozsBan.java b/Mage.Sets/src/mage/sets/seventhedition/FerozsBan.java new file mode 100644 index 00000000000..f41e36e490d --- /dev/null +++ b/Mage.Sets/src/mage/sets/seventhedition/FerozsBan.java @@ -0,0 +1,53 @@ +/* + * 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.seventhedition; + +import java.util.UUID; + +/** + * + * @author LoneFox + + */ +public class FerozsBan extends mage.sets.fifthedition.FerozsBan { + + public FerozsBan(UUID ownerId) { + super(ownerId); + this.cardNumber = 295; + this.expansionSetCode = "7ED"; + } + + public FerozsBan(final FerozsBan card) { + super(card); + } + + @Override + public FerozsBan copy() { + return new FerozsBan(this); + } +} diff --git a/Mage.Sets/src/mage/sets/seventhedition/NocturnalRaid.java b/Mage.Sets/src/mage/sets/seventhedition/NocturnalRaid.java new file mode 100644 index 00000000000..f5680793e8d --- /dev/null +++ b/Mage.Sets/src/mage/sets/seventhedition/NocturnalRaid.java @@ -0,0 +1,53 @@ +/* + * 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.seventhedition; + +import java.util.UUID; + +/** + * + * @author LoneFox + + */ +public class NocturnalRaid extends mage.sets.mirage.NocturnalRaid { + + public NocturnalRaid(UUID ownerId) { + super(ownerId); + this.cardNumber = 151; + this.expansionSetCode = "7ED"; + } + + public NocturnalRaid(final NocturnalRaid card) { + super(card); + } + + @Override + public NocturnalRaid copy() { + return new NocturnalRaid(this); + } +} diff --git a/Mage.Sets/src/mage/sets/seventhedition/ShieldWall.java b/Mage.Sets/src/mage/sets/seventhedition/ShieldWall.java new file mode 100644 index 00000000000..d35854f792a --- /dev/null +++ b/Mage.Sets/src/mage/sets/seventhedition/ShieldWall.java @@ -0,0 +1,55 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.seventhedition; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author LoneFox + + */ +public class ShieldWall extends mage.sets.legends.ShieldWall { + + public ShieldWall(UUID ownerId) { + super(ownerId); + this.cardNumber = 44; + this.expansionSetCode = "7ED"; + this.rarity = Rarity.COMMON; + } + + public ShieldWall(final ShieldWall card) { + super(card); + } + + @Override + public ShieldWall copy() { + return new ShieldWall(this); + } +} diff --git a/Mage.Sets/src/mage/sets/seventhedition/TaintedAEther.java b/Mage.Sets/src/mage/sets/seventhedition/TaintedAEther.java new file mode 100644 index 00000000000..fa4bf8e3c43 --- /dev/null +++ b/Mage.Sets/src/mage/sets/seventhedition/TaintedAEther.java @@ -0,0 +1,53 @@ +/* + * 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.seventhedition; + +import java.util.UUID; + +/** + * + * @author LoneFox + + */ +public class TaintedAEther extends mage.sets.urzassaga.TaintedAEther { + + public TaintedAEther(UUID ownerId) { + super(ownerId); + this.cardNumber = 167; + this.expansionSetCode = "7ED"; + } + + public TaintedAEther(final TaintedAEther card) { + super(card); + } + + @Override + public TaintedAEther copy() { + return new TaintedAEther(this); + } +} diff --git a/Mage.Sets/src/mage/sets/urzassaga/TaintedAEther.java b/Mage.Sets/src/mage/sets/urzassaga/TaintedAEther.java new file mode 100644 index 00000000000..24a7e00144b --- /dev/null +++ b/Mage.Sets/src/mage/sets/urzassaga/TaintedAEther.java @@ -0,0 +1,74 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.urzassaga; + +import java.util.UUID; +import mage.abilities.common.EntersBattlefieldAllTriggeredAbility; +import mage.abilities.effects.common.SacrificeEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.common.FilterControlledPermanent; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.CardTypePredicate; +import mage.constants.SetTargetPointer; + +/** + * + * @author LoneFox + + */ +public class TaintedAEther extends CardImpl { + + private static final FilterControlledPermanent filter = new FilterControlledPermanent("a creature or a land"); + + static { + filter.add(Predicates.or(new CardTypePredicate(CardType.CREATURE), new CardTypePredicate(CardType.LAND))); + } + + public TaintedAEther(UUID ownerId) { + super(ownerId, 161, "Tainted AEther", Rarity.RARE, new CardType[]{CardType.ENCHANTMENT}, "{2}{B}{B}"); + this.expansionSetCode = "USG"; + + // Whenever a creature enters the battlefield, its controller sacrifices a creature or land. + this.addAbility(new EntersBattlefieldAllTriggeredAbility(Zone.BATTLEFIELD, new SacrificeEffect(filter, 1, ""), + new FilterCreaturePermanent(), false, SetTargetPointer.PLAYER, + "Whenever a creature enters the battlefield, its controller sacrifices a creature or land")); + } + + public TaintedAEther(final TaintedAEther card) { + super(card); + } + + @Override + public TaintedAEther copy() { + return new TaintedAEther(this); + } +} From cbe6dfb60ea42563d1f1b0d99167db54f34fffc1 Mon Sep 17 00:00:00 2001 From: LoneFox Date: Sat, 27 Jun 2015 15:13:41 +0300 Subject: [PATCH 5/7] Implement cards: Bellowing Fiend, Caltrops, Reprocess, and Yawgmoth's Edict --- .../sets/seventhedition/BellowingFiend.java | 53 ++++++++ .../mage/sets/seventhedition/Caltrops.java | 53 ++++++++ .../mage/sets/seventhedition/Reprocess.java | 113 ++++++++++++++++++ .../sets/seventhedition/YawgmothsEdict.java | 53 ++++++++ .../src/mage/sets/tempest/BellowingFiend.java | 108 +++++++++++++++++ .../src/mage/sets/urzasdestiny/Caltrops.java | 66 ++++++++++ .../src/mage/sets/urzassaga/Reprocess.java | 53 ++++++++ .../mage/sets/urzassaga/YawgmothsEdict.java | 80 +++++++++++++ 8 files changed, 579 insertions(+) create mode 100644 Mage.Sets/src/mage/sets/seventhedition/BellowingFiend.java create mode 100644 Mage.Sets/src/mage/sets/seventhedition/Caltrops.java create mode 100644 Mage.Sets/src/mage/sets/seventhedition/Reprocess.java create mode 100644 Mage.Sets/src/mage/sets/seventhedition/YawgmothsEdict.java create mode 100644 Mage.Sets/src/mage/sets/tempest/BellowingFiend.java create mode 100644 Mage.Sets/src/mage/sets/urzasdestiny/Caltrops.java create mode 100644 Mage.Sets/src/mage/sets/urzassaga/Reprocess.java create mode 100644 Mage.Sets/src/mage/sets/urzassaga/YawgmothsEdict.java diff --git a/Mage.Sets/src/mage/sets/seventhedition/BellowingFiend.java b/Mage.Sets/src/mage/sets/seventhedition/BellowingFiend.java new file mode 100644 index 00000000000..770e36f7b87 --- /dev/null +++ b/Mage.Sets/src/mage/sets/seventhedition/BellowingFiend.java @@ -0,0 +1,53 @@ +/* + * 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.seventhedition; + +import java.util.UUID; + +/** + * + * @author LoneFox + + */ +public class BellowingFiend extends mage.sets.tempest.BellowingFiend { + + public BellowingFiend(UUID ownerId) { + super(ownerId); + this.cardNumber = 119; + this.expansionSetCode = "7ED"; + } + + public BellowingFiend(final BellowingFiend card) { + super(card); + } + + @Override + public BellowingFiend copy() { + return new BellowingFiend(this); + } +} diff --git a/Mage.Sets/src/mage/sets/seventhedition/Caltrops.java b/Mage.Sets/src/mage/sets/seventhedition/Caltrops.java new file mode 100644 index 00000000000..4973ea3e7bf --- /dev/null +++ b/Mage.Sets/src/mage/sets/seventhedition/Caltrops.java @@ -0,0 +1,53 @@ +/* + * 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.seventhedition; + +import java.util.UUID; + +/** + * + * @author LoneFox + + */ +public class Caltrops extends mage.sets.urzasdestiny.Caltrops { + + public Caltrops(UUID ownerId) { + super(ownerId); + this.cardNumber = 288; + this.expansionSetCode = "7ED"; + } + + public Caltrops(final Caltrops card) { + super(card); + } + + @Override + public Caltrops copy() { + return new Caltrops(this); + } +} diff --git a/Mage.Sets/src/mage/sets/seventhedition/Reprocess.java b/Mage.Sets/src/mage/sets/seventhedition/Reprocess.java new file mode 100644 index 00000000000..b02114d2ed4 --- /dev/null +++ b/Mage.Sets/src/mage/sets/seventhedition/Reprocess.java @@ -0,0 +1,113 @@ +/* + * 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.seventhedition; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.effects.OneShotEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.filter.common.FilterControlledPermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.CardTypePredicate; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; +import mage.target.common.TargetControlledPermanent; + +/** + * + * @author LoneFox + + */ +public class Reprocess extends CardImpl { + + public Reprocess(UUID ownerId) { + super(ownerId, 159, "Reprocess", Rarity.RARE, new CardType[]{CardType.SORCERY}, "{2}{B}{B}"); + this.expansionSetCode = "7ED"; + + // Sacrifice any number of artifacts, creatures, and/or lands. Draw a card for each permanent sacrificed this way. + this.getSpellAbility().addEffect(new ReprocessEffect()); + } + + public Reprocess(final Reprocess card) { + super(card); + } + + @Override + public Reprocess copy() { + return new Reprocess(this); + } +} + +class ReprocessEffect extends OneShotEffect { + + private static final FilterControlledPermanent filter = new FilterControlledPermanent("artifacts, creatures, and/or lands"); + + static { + filter.add(Predicates.or(new CardTypePredicate(CardType.ARTIFACT), new CardTypePredicate(CardType.CREATURE), + new CardTypePredicate(CardType.LAND))); + } + + public ReprocessEffect() { + super(Outcome.Neutral); + staticText = "Sacrifice any number of artifacts, creatures, and/or lands. Draw a card for each permanent sacrificed this way."; + } + + public ReprocessEffect(final ReprocessEffect effect) { + super(effect); + } + + @Override + public ReprocessEffect copy() { + return new ReprocessEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player player = game.getPlayer(source.getControllerId()); + if (player == null){ + return false; + } + int amount = 0; + TargetControlledPermanent toSacrifice = new TargetControlledPermanent(0, Integer.MAX_VALUE, filter, true); + if(player.chooseTarget(Outcome.Sacrifice, toSacrifice, source, game)) { + for(Object uuid : toSacrifice.getTargets()){ + Permanent permanent = game.getPermanent((UUID)uuid); + if(permanent != null){ + permanent.sacrifice(source.getSourceId(), game); + amount++; + } + } + player.drawCards(amount, game); + } + return true; + } +} diff --git a/Mage.Sets/src/mage/sets/seventhedition/YawgmothsEdict.java b/Mage.Sets/src/mage/sets/seventhedition/YawgmothsEdict.java new file mode 100644 index 00000000000..0c57b335f4b --- /dev/null +++ b/Mage.Sets/src/mage/sets/seventhedition/YawgmothsEdict.java @@ -0,0 +1,53 @@ +/* + * 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.seventhedition; + +import java.util.UUID; + +/** + * + * @author LoneFox + + */ +public class YawgmothsEdict extends mage.sets.urzassaga.YawgmothsEdict { + + public YawgmothsEdict(UUID ownerId) { + super(ownerId); + this.cardNumber = 171; + this.expansionSetCode = "7ED"; + } + + public YawgmothsEdict(final YawgmothsEdict card) { + super(card); + } + + @Override + public YawgmothsEdict copy() { + return new YawgmothsEdict(this); + } +} diff --git a/Mage.Sets/src/mage/sets/tempest/BellowingFiend.java b/Mage.Sets/src/mage/sets/tempest/BellowingFiend.java new file mode 100644 index 00000000000..f0d35ca574b --- /dev/null +++ b/Mage.Sets/src/mage/sets/tempest/BellowingFiend.java @@ -0,0 +1,108 @@ +/* + * 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.tempest; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.DealsDamageToACreatureTriggeredAbility; +import mage.abilities.effects.Effect; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.DamageControllerEffect; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; + +/** + * + * @author LoneFox + + */ +public class BellowingFiend extends CardImpl { + + public BellowingFiend(UUID ownerId) { + super(ownerId, 2, "Bellowing Fiend", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{4}{B}"); + this.expansionSetCode = "TMP"; + this.subtype.add("Spirit"); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + // Whenever Bellowing Fiend deals damage to a creature, Bellowing Fiend deals 3 damage to that creature's controller and 3 damage to you. + Ability ability = new DealsDamageToACreatureTriggeredAbility(new BellowingFiendEffect(), false, false, true); + Effect effect = new DamageControllerEffect(3); + effect.setText("and 3 damage to you"); + ability.addEffect(effect); + this.addAbility(ability); + } + + public BellowingFiend(final BellowingFiend card) { + super(card); + } + + @Override + public BellowingFiend copy() { + return new BellowingFiend(this); + } +} + +class BellowingFiendEffect extends OneShotEffect { + + public BellowingFiendEffect() { + super(Outcome.Detriment); + this.staticText = "{this} deals 3 damage to that creature's controller"; } + + public BellowingFiendEffect(final BellowingFiendEffect effect) { + super(effect); + } + + @Override + public BellowingFiendEffect copy() { + return new BellowingFiendEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + boolean applied = false; + Permanent damagedCreature = game.getPermanentOrLKIBattlefield(targetPointer.getFirst(game, source)); + if(damagedCreature != null) { + Player controller = game.getPlayer(damagedCreature.getControllerId()); + if(controller != null) { + controller.damage(3, source.getSourceId(), game, false, true); applied = true; + } + } + return applied; + } +} diff --git a/Mage.Sets/src/mage/sets/urzasdestiny/Caltrops.java b/Mage.Sets/src/mage/sets/urzasdestiny/Caltrops.java new file mode 100644 index 00000000000..4feb59ccfc9 --- /dev/null +++ b/Mage.Sets/src/mage/sets/urzasdestiny/Caltrops.java @@ -0,0 +1,66 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.urzasdestiny; + +import java.util.UUID; +import mage.abilities.common.AttacksAllTriggeredAbility; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.SetTargetPointer; +import mage.filter.common.FilterCreaturePermanent; + +/** + * + * @author LoneFox + + */ +public class Caltrops extends CardImpl { + + public Caltrops(UUID ownerId) { + super(ownerId, 129, "Caltrops", Rarity.UNCOMMON, new CardType[]{CardType.ARTIFACT}, "{3}"); + this.expansionSetCode = "UDS"; + + // Whenever a creature attacks, Caltrops deals 1 damage to it. + Effect effect = new DamageTargetEffect(1); + effect.setText("{this} deals 1 damage to it"); + this.addAbility(new AttacksAllTriggeredAbility(effect, false, new FilterCreaturePermanent(), + SetTargetPointer.PERMANENT, false)); + } + + public Caltrops(final Caltrops card) { + super(card); + } + + @Override + public Caltrops copy() { + return new Caltrops(this); + } +} diff --git a/Mage.Sets/src/mage/sets/urzassaga/Reprocess.java b/Mage.Sets/src/mage/sets/urzassaga/Reprocess.java new file mode 100644 index 00000000000..b2f8b0a7abc --- /dev/null +++ b/Mage.Sets/src/mage/sets/urzassaga/Reprocess.java @@ -0,0 +1,53 @@ +/* + * 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.urzassaga; + +import java.util.UUID; + +/** + * + * @author LoneFox + + */ +public class Reprocess extends mage.sets.seventhedition.Reprocess { + + public Reprocess(UUID ownerId) { + super(ownerId); + this.cardNumber = 154; + this.expansionSetCode = "USG"; + } + + public Reprocess(final Reprocess card) { + super(card); + } + + @Override + public Reprocess copy() { + return new Reprocess(this); + } +} diff --git a/Mage.Sets/src/mage/sets/urzassaga/YawgmothsEdict.java b/Mage.Sets/src/mage/sets/urzassaga/YawgmothsEdict.java new file mode 100644 index 00000000000..1eb35468b89 --- /dev/null +++ b/Mage.Sets/src/mage/sets/urzassaga/YawgmothsEdict.java @@ -0,0 +1,80 @@ +/* + * 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.urzassaga; + +import java.util.UUID; +import mage.ObjectColor; +import mage.abilities.Ability; +import mage.abilities.common.SpellCastOpponentTriggeredAbility; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.GainLifeEffect; +import mage.abilities.effects.common.LoseLifeTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.SetTargetPointer; +import mage.constants.Zone; +import mage.filter.FilterSpell; +import mage.filter.predicate.mageobject.ColorPredicate; + +/** + * + * @author LoneFox + + */ +public class YawgmothsEdict extends CardImpl { + + private static final FilterSpell filter = new FilterSpell("a white spell"); + + static { + filter.add(new ColorPredicate(ObjectColor.WHITE)); + } + + + public YawgmothsEdict(UUID ownerId) { + super(ownerId, 170, "Yawgmoth's Edict", Rarity.UNCOMMON, new CardType[]{CardType.ENCHANTMENT}, "{1}{B}"); + this.expansionSetCode = "USG"; + + // Whenever an opponent casts a white spell, that player loses 1 life and you gain 1 life. + Ability ability = new SpellCastOpponentTriggeredAbility(Zone.BATTLEFIELD, new LoseLifeTargetEffect(1), + filter, false, SetTargetPointer.PLAYER); + Effect effect = new GainLifeEffect(1); + effect.setText("and you gain 1 life"); + ability.addEffect(effect); + this.addAbility(ability); + } + + public YawgmothsEdict(final YawgmothsEdict card) { + super(card); + } + + @Override + public YawgmothsEdict copy() { + return new YawgmothsEdict(this); + } +} From 98e4266cf5994b8547aae9af613189c89178f1bc Mon Sep 17 00:00:00 2001 From: LoneFox Date: Sat, 27 Jun 2015 22:18:39 +0300 Subject: [PATCH 6/7] Implement cards: Disorder, Impatience, and Thoughtleech --- .../src/mage/sets/iceage/Thoughtleech.java | 53 +++++++++ .../mage/sets/seventhedition/Disorder.java | 110 ++++++++++++++++++ .../mage/sets/seventhedition/Impatience.java | 83 +++++++++++++ .../sets/seventhedition/Thoughtleech.java | 101 ++++++++++++++++ .../mage/sets/urzasdestiny/Impatience.java | 53 +++++++++ .../src/mage/sets/urzassaga/Disorder.java | 53 +++++++++ 6 files changed, 453 insertions(+) create mode 100644 Mage.Sets/src/mage/sets/iceage/Thoughtleech.java create mode 100644 Mage.Sets/src/mage/sets/seventhedition/Disorder.java create mode 100644 Mage.Sets/src/mage/sets/seventhedition/Impatience.java create mode 100644 Mage.Sets/src/mage/sets/seventhedition/Thoughtleech.java create mode 100644 Mage.Sets/src/mage/sets/urzasdestiny/Impatience.java create mode 100644 Mage.Sets/src/mage/sets/urzassaga/Disorder.java diff --git a/Mage.Sets/src/mage/sets/iceage/Thoughtleech.java b/Mage.Sets/src/mage/sets/iceage/Thoughtleech.java new file mode 100644 index 00000000000..4c8d19ea7ea --- /dev/null +++ b/Mage.Sets/src/mage/sets/iceage/Thoughtleech.java @@ -0,0 +1,53 @@ +/* + * 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; + +/** + * + * @author LoneFox + + */ +public class Thoughtleech extends mage.sets.seventhedition.Thoughtleech { + + public Thoughtleech(UUID ownerId) { + super(ownerId); + this.cardNumber = 157; + this.expansionSetCode = "ICE"; + } + + public Thoughtleech(final Thoughtleech card) { + super(card); + } + + @Override + public Thoughtleech copy() { + return new Thoughtleech(this); + } +} diff --git a/Mage.Sets/src/mage/sets/seventhedition/Disorder.java b/Mage.Sets/src/mage/sets/seventhedition/Disorder.java new file mode 100644 index 00000000000..6207775dd47 --- /dev/null +++ b/Mage.Sets/src/mage/sets/seventhedition/Disorder.java @@ -0,0 +1,110 @@ +/* + * 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.seventhedition; + +import java.util.UUID; +import mage.ObjectColor; +import mage.abilities.Ability; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.DamageAllEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.ColorPredicate; +import mage.filter.predicate.permanent.ControllerIdPredicate; +import mage.game.Game; +import mage.players.Player; + +/** + * + * @author LoneFox + + */ +public class Disorder extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("white creature"); + + static { + filter.add(new ColorPredicate(ObjectColor.WHITE)); + } + + public Disorder(UUID ownerId) { + super(ownerId, 179, "Disorder", Rarity.UNCOMMON, new CardType[]{CardType.SORCERY}, "{1}{R}"); + this.expansionSetCode = "7ED"; + + // Disorder deals 2 damage to each white creature and each player who controls a white creature. + this.getSpellAbility().addEffect(new DamageAllEffect(2, filter)); + this.getSpellAbility().addEffect(new DisorderEffect()); + } + + public Disorder(final Disorder card) { + super(card); + } + + @Override + public Disorder copy() { + return new Disorder(this); + } +} + +class DisorderEffect extends OneShotEffect { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("white creature"); + + static { + filter.add(new ColorPredicate(ObjectColor.WHITE)); + } + + public DisorderEffect() { + super(Outcome.Damage); + this.staticText = "and each player who controls a white creature"; } + + public DisorderEffect(final DisorderEffect effect) { + super(effect); + } + + @Override + public DisorderEffect copy() { + return new DisorderEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + for(Player player : game.getPlayers().values()) { + FilterCreaturePermanent filter = new FilterCreaturePermanent(); + filter.add(new ControllerIdPredicate(player.getId())); + filter.add(new ColorPredicate(ObjectColor.WHITE)); + if(game.getBattlefield().count(filter, source.getSourceId(), source.getControllerId(), game) > 0) { + player.damage(2, source.getSourceId(), game, false, true); + } + } + return true; + } +} diff --git a/Mage.Sets/src/mage/sets/seventhedition/Impatience.java b/Mage.Sets/src/mage/sets/seventhedition/Impatience.java new file mode 100644 index 00000000000..1e3ae7e8495 --- /dev/null +++ b/Mage.Sets/src/mage/sets/seventhedition/Impatience.java @@ -0,0 +1,83 @@ +/* + * 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.seventhedition; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.BeginningOfEndStepTriggeredAbility; +import mage.abilities.condition.Condition; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.TargetController; +import mage.constants.Zone; +import mage.game.Game; +import mage.watchers.common.CastSpellLastTurnWatcher; + +/** + * + * @author LoneFox + + */ +public class Impatience extends CardImpl { + + public Impatience(UUID ownerId) { + super(ownerId, 197, "Impatience", Rarity.RARE, new CardType[]{CardType.ENCHANTMENT}, "{2}{R}"); + this.expansionSetCode = "7ED"; + + // At the beginning of each player's end step, if that player didn't cast a spell this turn, Impatience deals 2 damage to him or her. + Effect effect = new DamageTargetEffect(2); + effect.setText("{this} deals 2 damage to him or her."); + this.addAbility(new BeginningOfEndStepTriggeredAbility(Zone.BATTLEFIELD, effect, TargetController.ANY, + new ImpatienceCondition(), false)); + } + + public Impatience(final Impatience card) { + super(card); + } + + @Override + public Impatience copy() { + return new Impatience(this); + } +} + +class ImpatienceCondition implements Condition { + + @Override + public boolean apply(Game game, Ability source) { + CastSpellLastTurnWatcher watcher = (CastSpellLastTurnWatcher) game.getState().getWatchers().get("CastSpellLastTurnWatcher"); + return watcher.getAmountOfSpellsPlayerCastOnCurrentTurn(game.getActivePlayerId()) == 0; + } + + public String toString() { + return "if that player didn't cast a spell this turn"; + } +} diff --git a/Mage.Sets/src/mage/sets/seventhedition/Thoughtleech.java b/Mage.Sets/src/mage/sets/seventhedition/Thoughtleech.java new file mode 100644 index 00000000000..2354dc80e48 --- /dev/null +++ b/Mage.Sets/src/mage/sets/seventhedition/Thoughtleech.java @@ -0,0 +1,101 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.seventhedition; + +import java.util.UUID; +import mage.abilities.TriggeredAbilityImpl; +import mage.abilities.effects.common.GainLifeEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.game.Game; +import mage.game.events.GameEvent.EventType; +import mage.game.events.GameEvent; +import mage.game.permanent.Permanent; + +/** + * + * @author LoneFox + + */ +public class Thoughtleech extends CardImpl { + + public Thoughtleech(UUID ownerId) { + super(ownerId, 274, "Thoughtleech", Rarity.UNCOMMON, new CardType[]{CardType.ENCHANTMENT}, "{G}{G}"); + this.expansionSetCode = "7ED"; + + // Whenever an Island an opponent controls becomes tapped, you may gain 1 life. + this.addAbility(new ThoughtleechTriggeredAbility()); + } + + public Thoughtleech(final Thoughtleech card) { + super(card); + } + + @Override + public Thoughtleech copy() { + return new Thoughtleech(this); + } +} + +class ThoughtleechTriggeredAbility extends TriggeredAbilityImpl { + + ThoughtleechTriggeredAbility() { + super(Zone.BATTLEFIELD, new GainLifeEffect(1), true); + } + + ThoughtleechTriggeredAbility(final ThoughtleechTriggeredAbility ability) { + super(ability); + } + + @Override + public ThoughtleechTriggeredAbility copy() { + return new ThoughtleechTriggeredAbility(this); + } + + @Override + public boolean checkEventType(GameEvent event, Game game) { + return event.getType() == EventType.TAPPED; + } + + @Override + public boolean checkTrigger(GameEvent event, Game game) { + Permanent p = game.getPermanent(event.getTargetId()); + if(p != null && p.getSubtype().contains("Island")) { + if(game.getOpponents(this.controllerId).contains(p.getControllerId())) + return true; + } + return false; + } + + @Override + public String getRule() { + return "Whenever an Island an opponent controls becomes tapped, " + modes.getText(); + } +} diff --git a/Mage.Sets/src/mage/sets/urzasdestiny/Impatience.java b/Mage.Sets/src/mage/sets/urzasdestiny/Impatience.java new file mode 100644 index 00000000000..0726bf975e6 --- /dev/null +++ b/Mage.Sets/src/mage/sets/urzasdestiny/Impatience.java @@ -0,0 +1,53 @@ +/* + * 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.urzasdestiny; + +import java.util.UUID; + +/** + * + * @author LoneFox + + */ +public class Impatience extends mage.sets.seventhedition.Impatience { + + public Impatience(UUID ownerId) { + super(ownerId); + this.cardNumber = 88; + this.expansionSetCode = "UDS"; + } + + public Impatience(final Impatience card) { + super(card); + } + + @Override + public Impatience copy() { + return new Impatience(this); + } +} diff --git a/Mage.Sets/src/mage/sets/urzassaga/Disorder.java b/Mage.Sets/src/mage/sets/urzassaga/Disorder.java new file mode 100644 index 00000000000..61244e35869 --- /dev/null +++ b/Mage.Sets/src/mage/sets/urzassaga/Disorder.java @@ -0,0 +1,53 @@ +/* + * 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.urzassaga; + +import java.util.UUID; + +/** + * + * @author LoneFox + + */ +public class Disorder extends mage.sets.seventhedition.Disorder { + + public Disorder(UUID ownerId) { + super(ownerId); + this.cardNumber = 181; + this.expansionSetCode = "USG"; + } + + public Disorder(final Disorder card) { + super(card); + } + + @Override + public Disorder copy() { + return new Disorder(this); + } +} From b4f3440fbd6e46ce71032d9f7527c363831efff5 Mon Sep 17 00:00:00 2001 From: LoneFox Date: Sun, 28 Jun 2015 10:12:50 +0300 Subject: [PATCH 7/7] Move PermanentsTargetOpponentControlsCount from Gideon, Champion of Justice to its own file. Implement card that uses it: Starlight --- .../gatecrash/GideonChampionOfJustice.java | 37 +--------- Mage.Sets/src/mage/sets/portal/Starlight.java | 53 ++++++++++++++ .../mage/sets/seventhedition/Starlight.java | 72 +++++++++++++++++++ ...PermanentsTargetOpponentControlsCount.java | 67 +++++++++++++++++ 4 files changed, 194 insertions(+), 35 deletions(-) create mode 100644 Mage.Sets/src/mage/sets/portal/Starlight.java create mode 100644 Mage.Sets/src/mage/sets/seventhedition/Starlight.java create mode 100644 Mage/src/mage/abilities/dynamicvalue/common/PermanentsTargetOpponentControlsCount.java diff --git a/Mage.Sets/src/mage/sets/gatecrash/GideonChampionOfJustice.java b/Mage.Sets/src/mage/sets/gatecrash/GideonChampionOfJustice.java index 78e4322ff31..ddff7d83638 100644 --- a/Mage.Sets/src/mage/sets/gatecrash/GideonChampionOfJustice.java +++ b/Mage.Sets/src/mage/sets/gatecrash/GideonChampionOfJustice.java @@ -34,6 +34,7 @@ import mage.abilities.common.EntersBattlefieldAbility; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.dynamicvalue.DynamicValue; import mage.abilities.dynamicvalue.common.CountersCount; +import mage.abilities.dynamicvalue.common.PermanentsTargetOpponentControlsCount; import mage.abilities.effects.Effect; import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.PreventAllDamageToSourceEffect; @@ -45,7 +46,6 @@ import mage.cards.CardImpl; import mage.constants.*; import mage.counters.CounterType; import mage.filter.common.FilterCreaturePermanent; -import mage.filter.predicate.permanent.ControllerIdPredicate; import mage.game.Game; import mage.game.permanent.Permanent; import mage.game.permanent.token.Token; @@ -68,7 +68,7 @@ public class GideonChampionOfJustice extends CardImpl { // +1: Put a loyalty counter on Gideon, Champion of Justice for each creature target opponent controls. LoyaltyAbility ability1 = new LoyaltyAbility( - new AddCountersSourceEffect(CounterType.LOYALTY.createInstance(0), new PermanentsTargetOpponentControlsCount(), true), 1); + new AddCountersSourceEffect(CounterType.LOYALTY.createInstance(0), new PermanentsTargetOpponentControlsCount(new FilterCreaturePermanent()), true), 1); ability1.addTarget(new TargetOpponent()); this.addAbility(ability1); @@ -92,39 +92,6 @@ public class GideonChampionOfJustice extends CardImpl { } } -class PermanentsTargetOpponentControlsCount implements DynamicValue { - - public PermanentsTargetOpponentControlsCount() { - } - - @Override - public int calculate(Game game, Ability sourceAbility, Effect effect) { - if (sourceAbility.getFirstTarget() != null) { - FilterCreaturePermanent filter = new FilterCreaturePermanent(); - filter.add(new ControllerIdPredicate(sourceAbility.getFirstTarget())); - int value = game.getBattlefield().count(filter, sourceAbility.getSourceId(), sourceAbility.getControllerId(), game); - return value; - } else { - return 0; - } - } - - @Override - public DynamicValue copy() { - return new PermanentsTargetOpponentControlsCount(); - } - - @Override - public String toString() { - return "X"; - } - - @Override - public String getMessage() { - return "creature target opponent controls"; - } -} - class GideonExileAllOtherPermanentsEffect extends OneShotEffect { public GideonExileAllOtherPermanentsEffect() { diff --git a/Mage.Sets/src/mage/sets/portal/Starlight.java b/Mage.Sets/src/mage/sets/portal/Starlight.java new file mode 100644 index 00000000000..ecdf6f369b5 --- /dev/null +++ b/Mage.Sets/src/mage/sets/portal/Starlight.java @@ -0,0 +1,53 @@ +/* + * 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.portal; + +import java.util.UUID; + +/** + * + * @author LoneFox + + */ +public class Starlight extends mage.sets.seventhedition.Starlight { + + public Starlight(UUID ownerId) { + super(ownerId); + this.cardNumber = 191; + this.expansionSetCode = "POR"; + } + + public Starlight(final Starlight card) { + super(card); + } + + @Override + public Starlight copy() { + return new Starlight(this); + } +} diff --git a/Mage.Sets/src/mage/sets/seventhedition/Starlight.java b/Mage.Sets/src/mage/sets/seventhedition/Starlight.java new file mode 100644 index 00000000000..e5dfe48fd36 --- /dev/null +++ b/Mage.Sets/src/mage/sets/seventhedition/Starlight.java @@ -0,0 +1,72 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.seventhedition; + +import java.util.UUID; +import mage.ObjectColor; +import mage.abilities.dynamicvalue.common.PermanentsTargetOpponentControlsCount; +import mage.abilities.effects.common.GainLifeEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.ColorPredicate; +import mage.target.common.TargetOpponent; + +/** + * + * @author LoneFox + + */ +public class Starlight extends CardImpl { + + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("black creature"); + + static { + filter.add(new ColorPredicate(ObjectColor.BLACK)); + } + + public Starlight(UUID ownerId) { + super(ownerId, 49, "Starlight", Rarity.UNCOMMON, new CardType[]{CardType.SORCERY}, "{1}{W}"); + this.expansionSetCode = "7ED"; + + // You gain 3 life for each black creature target opponent controls. + this.getSpellAbility().addEffect(new GainLifeEffect(new PermanentsTargetOpponentControlsCount(filter, 3))); + this.getSpellAbility().addTarget(new TargetOpponent()); + } + + public Starlight(final Starlight card) { + super(card); + } + + @Override + public Starlight copy() { + return new Starlight(this); + } +} diff --git a/Mage/src/mage/abilities/dynamicvalue/common/PermanentsTargetOpponentControlsCount.java b/Mage/src/mage/abilities/dynamicvalue/common/PermanentsTargetOpponentControlsCount.java new file mode 100644 index 00000000000..f1f7ef9b874 --- /dev/null +++ b/Mage/src/mage/abilities/dynamicvalue/common/PermanentsTargetOpponentControlsCount.java @@ -0,0 +1,67 @@ +package mage.abilities.dynamicvalue.common; + +import mage.abilities.Ability; +import mage.abilities.dynamicvalue.DynamicValue; +import mage.abilities.effects.Effect; +import mage.filter.FilterPermanent; +import mage.filter.predicate.permanent.ControllerIdPredicate; +import mage.game.Game; + +/** + * + * @author LoneFox + */ + +public class PermanentsTargetOpponentControlsCount implements DynamicValue { + + private FilterPermanent filter; + private Integer multiplier; + + public PermanentsTargetOpponentControlsCount() { + this(new FilterPermanent(), 1); + } + + public PermanentsTargetOpponentControlsCount(FilterPermanent filter) { + this(filter, 1); + } + + public PermanentsTargetOpponentControlsCount(FilterPermanent filter, Integer multiplier) { + this.filter = filter; + this.multiplier = multiplier; + } + + public PermanentsTargetOpponentControlsCount(final PermanentsTargetOpponentControlsCount dynamicValue) { + this.filter = dynamicValue.filter; + this.multiplier = dynamicValue.multiplier; + } + + @Override + public DynamicValue copy() { + return new PermanentsTargetOpponentControlsCount(this); + } + + @Override + public int calculate(Game game, Ability sourceAbility, Effect effect) { + if(sourceAbility.getFirstTarget() != null) { + filter.add(new ControllerIdPredicate(sourceAbility.getFirstTarget())); + int value = game.getBattlefield().count(filter, sourceAbility.getSourceId(), sourceAbility.getControllerId(), game); + return multiplier * value; + } + else { + return 0; + } + } + + @Override + public String toString() { + if(multiplier != null) { + return multiplier.toString(); + } + return "X"; + } + + @Override + public String getMessage() { + return filter.getMessage() + " target opponent controls"; + } +}