From ed12e5d634243b253fb74d121f2230fd6edf371f Mon Sep 17 00:00:00 2001 From: Dustin Conrad Date: Sun, 10 Aug 2014 01:06:31 -0400 Subject: [PATCH] Recover implemented --- Mage.Sets/src/mage/sets/invasion/Recover.java | 69 +++++++++++++++++++ .../src/mage/sets/tempest/KnightOfDusk.java | 1 - .../src/mage/sets/tenth/KnightOfDusk.java | 3 +- Mage.Sets/src/mage/sets/tenth/Recover.java | 52 ++++++++++++++ 4 files changed, 122 insertions(+), 3 deletions(-) create mode 100644 Mage.Sets/src/mage/sets/invasion/Recover.java create mode 100644 Mage.Sets/src/mage/sets/tenth/Recover.java diff --git a/Mage.Sets/src/mage/sets/invasion/Recover.java b/Mage.Sets/src/mage/sets/invasion/Recover.java new file mode 100644 index 00000000000..e7b82d22d0d --- /dev/null +++ b/Mage.Sets/src/mage/sets/invasion/Recover.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.invasion; + +import java.util.UUID; + +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.abilities.effects.common.ReturnToHandTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.common.FilterCreatureCard; +import mage.target.common.TargetCardInYourGraveyard; + +/** + * + * @author dustinconrad + */ +public class Recover extends CardImpl { + + private static FilterCreatureCard filter = new FilterCreatureCard("creature card from your graveyard"); + + public Recover(UUID ownerId) { + super(ownerId, 122, "Recover", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{2}{B}"); + this.expansionSetCode = "INV"; + + this.color.setBlack(true); + + // Return target creature card from your graveyard to your hand. + this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(filter)); + this.getSpellAbility().addEffect(new ReturnToHandTargetEffect()); + // Draw a card. + this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(1)); + } + + public Recover(final Recover card) { + super(card); + } + + @Override + public Recover copy() { + return new Recover(this); + } +} diff --git a/Mage.Sets/src/mage/sets/tempest/KnightOfDusk.java b/Mage.Sets/src/mage/sets/tempest/KnightOfDusk.java index 36df6dc598c..425d53f4395 100644 --- a/Mage.Sets/src/mage/sets/tempest/KnightOfDusk.java +++ b/Mage.Sets/src/mage/sets/tempest/KnightOfDusk.java @@ -46,7 +46,6 @@ import mage.target.common.TargetCreaturePermanent; /** * * @author dustinconrad - */ public class KnightOfDusk extends CardImpl { diff --git a/Mage.Sets/src/mage/sets/tenth/KnightOfDusk.java b/Mage.Sets/src/mage/sets/tenth/KnightOfDusk.java index fda5a6bbe7b..d1a389172ab 100644 --- a/Mage.Sets/src/mage/sets/tenth/KnightOfDusk.java +++ b/Mage.Sets/src/mage/sets/tenth/KnightOfDusk.java @@ -31,8 +31,7 @@ import java.util.UUID; /** * - * @author dustinconrad - + * @author dustinconrad */ public class KnightOfDusk extends mage.sets.tempest.KnightOfDusk { diff --git a/Mage.Sets/src/mage/sets/tenth/Recover.java b/Mage.Sets/src/mage/sets/tenth/Recover.java new file mode 100644 index 00000000000..2de00c99fb9 --- /dev/null +++ b/Mage.Sets/src/mage/sets/tenth/Recover.java @@ -0,0 +1,52 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.tenth; + +import java.util.UUID; + +/** + * + * @author dustinconrad + */ +public class Recover extends mage.sets.invasion.Recover { + + public Recover(UUID ownerId) { + super(ownerId); + this.cardNumber = 172; + this.expansionSetCode = "10E"; + } + + public Recover(final Recover card) { + super(card); + } + + @Override + public Recover copy() { + return new Recover(this); + } +}