From bdea6e0a70c884fe5400b31548c4f169ee0875ca Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Tue, 1 Jan 2013 14:56:33 +0100 Subject: [PATCH] 4 cards of planechase 2012. --- .../sets/guildpact/SilhanaLedgewalker.java | 110 ++++++++++++++++ .../sets/planechase2012/IllusoryAngel.java | 115 +++++++++++++++++ .../sets/planechase2012/ShardlessAgent.java | 68 ++++++++++ .../planechase2012/SilhanaLedgewalker.java | 52 ++++++++ .../mage/sets/planechase2012/SunkenHope.java | 52 ++++++++ .../src/mage/sets/planeshift/SunkenHope.java | 120 ++++++++++++++++++ Mage.Sets/src/mage/sets/tenth/SunkenHope.java | 52 ++++++++ 7 files changed, 569 insertions(+) create mode 100644 Mage.Sets/src/mage/sets/guildpact/SilhanaLedgewalker.java create mode 100644 Mage.Sets/src/mage/sets/planechase2012/IllusoryAngel.java create mode 100644 Mage.Sets/src/mage/sets/planechase2012/ShardlessAgent.java create mode 100644 Mage.Sets/src/mage/sets/planechase2012/SilhanaLedgewalker.java create mode 100644 Mage.Sets/src/mage/sets/planechase2012/SunkenHope.java create mode 100644 Mage.Sets/src/mage/sets/planeshift/SunkenHope.java create mode 100644 Mage.Sets/src/mage/sets/tenth/SunkenHope.java diff --git a/Mage.Sets/src/mage/sets/guildpact/SilhanaLedgewalker.java b/Mage.Sets/src/mage/sets/guildpact/SilhanaLedgewalker.java new file mode 100644 index 0000000000..2b51111bc0 --- /dev/null +++ b/Mage.Sets/src/mage/sets/guildpact/SilhanaLedgewalker.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.guildpact; + +import java.util.UUID; +import mage.Constants; +import mage.Constants.CardType; +import mage.Constants.Duration; +import mage.Constants.Rarity; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.RestrictionEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.abilities.keyword.HexproofAbility; +import mage.cards.CardImpl; +import mage.game.Game; +import mage.game.permanent.Permanent; + +/** + * + * @author LevelX2 + */ +public class SilhanaLedgewalker extends CardImpl { + + public SilhanaLedgewalker (UUID ownerId) { + super(ownerId, 94, "Silhana Ledgewalker", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{1}{G}"); + this.expansionSetCode = "GPT"; + this.subtype.add("Elf"); + this.subtype.add("Rogue"); + this.color.setGreen(true); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // Hexproof (This creature can't be the target of spells or abilities your opponents control.) + this.addAbility(HexproofAbility.getInstance()); + + // Silhana Ledgewalker can't be blocked except by creatures with flying. + this.addAbility(new SimpleStaticAbility(Constants.Zone.BATTLEFIELD, new SilhanaLedgewalkerEffect())); + } + + public SilhanaLedgewalker (final SilhanaLedgewalker card) { + super(card); + } + + @Override + public SilhanaLedgewalker copy() { + return new SilhanaLedgewalker(this); + } + +} + +class SilhanaLedgewalkerEffect extends RestrictionEffect { + + public SilhanaLedgewalkerEffect() { + super(Duration.WhileOnBattlefield); + staticText = "{this} can't be blocked except by creatures with flying"; + } + + public SilhanaLedgewalkerEffect(final SilhanaLedgewalkerEffect effect) { + super(effect); + } + + @Override + public boolean applies(Permanent permanent, Ability source, Game game) { + if (source.getSourceId().equals(permanent.getId())) { + return true; + } + return false; + } + + @Override + public boolean canBeBlocked(Permanent attacker, Permanent blocker, Ability source, Game game) { + if (blocker.getAbilities().contains(FlyingAbility.getInstance())) { + return true; + } + return false; + } + + @Override + public SilhanaLedgewalkerEffect copy() { + return new SilhanaLedgewalkerEffect(this); + } +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/planechase2012/IllusoryAngel.java b/Mage.Sets/src/mage/sets/planechase2012/IllusoryAngel.java new file mode 100644 index 0000000000..6d3aaba9f8 --- /dev/null +++ b/Mage.Sets/src/mage/sets/planechase2012/IllusoryAngel.java @@ -0,0 +1,115 @@ +/* +* 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.planechase2012; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Duration; +import mage.Constants.Outcome; +import mage.Constants.Rarity; +import mage.Constants.Zone; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.ReplacementEffectImpl; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.watchers.common.CastSpellLastTurnWatcher; + +/** +* +* @author LevelX2 +*/ +public class IllusoryAngel extends CardImpl { + + public IllusoryAngel(UUID ownerId) { + super(ownerId, 19, "Illusory Angel", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{2}{U}"); + this.expansionSetCode = "PC2"; + this.subtype.add("Angel"); + this.subtype.add("Illusion"); + + this.color.setBlue(true); + this.power = new MageInt(4); + this.toughness = new MageInt(4); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + + // Cast Illusory Angel only if you've cast another spell this turn. + this.addAbility(new SimpleStaticAbility(Zone.ALL, new IllusoryAngelEffect())); + } + + public IllusoryAngel(final IllusoryAngel card) { + super(card); + } + + @Override + public IllusoryAngel copy() { + return new IllusoryAngel(this); + } +} + +class IllusoryAngelEffect extends ReplacementEffectImpl { + IllusoryAngelEffect() { + super(Duration.EndOfGame, Outcome.Detriment); + staticText = "Cast Illusory Angel only if you've cast another spell this turn"; + } + + IllusoryAngelEffect(final IllusoryAngelEffect effect) { + super(effect); + } + + @Override + public boolean replaceEvent(GameEvent event, Ability source, Game game) { + return true; + } + + @Override + public boolean applies(GameEvent event, Ability source, Game game) { + if (event.getType() == GameEvent.EventType.CAST_SPELL && event.getSourceId().equals(source.getSourceId())) { + CastSpellLastTurnWatcher watcher = (CastSpellLastTurnWatcher) game.getState().getWatchers().get("CastSpellLastTurnWatcher"); + if (watcher != null && watcher.getAmountOfSpellsPlayerCastOnCurrentTurn(source.getControllerId()) == 0) { + return true; + } + } + return false; + + } + + @Override + public boolean apply(Game game, Ability source) { + return true; + } + + @Override + public IllusoryAngelEffect copy() { + return new IllusoryAngelEffect(this); + } +} diff --git a/Mage.Sets/src/mage/sets/planechase2012/ShardlessAgent.java b/Mage.Sets/src/mage/sets/planechase2012/ShardlessAgent.java new file mode 100644 index 0000000000..7cbd39d5b0 --- /dev/null +++ b/Mage.Sets/src/mage/sets/planechase2012/ShardlessAgent.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.planechase2012; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.MageInt; +import mage.abilities.keyword.CascadeAbility; +import mage.cards.CardImpl; + +/** +* +* @author LevelX2 +*/ +public class ShardlessAgent extends CardImpl { + + public ShardlessAgent(UUID ownerId) { + super(ownerId, 104, "Shardless Agent", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{1}{G}{U}"); + this.expansionSetCode = "PC2"; + this.subtype.add("Human"); + this.subtype.add("Rogue"); + + this.color.setGreen(true); + this.color.setBlue(true); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Cascade + this.addAbility(new CascadeAbility()); + + } + + public ShardlessAgent(final ShardlessAgent card) { + super(card); + } + + @Override + public ShardlessAgent copy() { + return new ShardlessAgent(this); + } +} + diff --git a/Mage.Sets/src/mage/sets/planechase2012/SilhanaLedgewalker.java b/Mage.Sets/src/mage/sets/planechase2012/SilhanaLedgewalker.java new file mode 100644 index 0000000000..bf4b7653fe --- /dev/null +++ b/Mage.Sets/src/mage/sets/planechase2012/SilhanaLedgewalker.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.planechase2012; + +import java.util.UUID; + +/** + * + * @author LevelX2 + */ +public class SilhanaLedgewalker extends mage.sets.guildpact.SilhanaLedgewalker { + + public SilhanaLedgewalker(UUID ownerId) { + super(ownerId); + this.cardNumber = 77; + this.expansionSetCode = "PC2"; + } + + public SilhanaLedgewalker(final SilhanaLedgewalker card) { + super(card); + } + + @Override + public SilhanaLedgewalker copy() { + return new SilhanaLedgewalker(this); + } +} diff --git a/Mage.Sets/src/mage/sets/planechase2012/SunkenHope.java b/Mage.Sets/src/mage/sets/planechase2012/SunkenHope.java new file mode 100644 index 0000000000..b9d80269f8 --- /dev/null +++ b/Mage.Sets/src/mage/sets/planechase2012/SunkenHope.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.planechase2012; + +import java.util.UUID; + +/** + * + * @author LevelX2 + */ +public class SunkenHope extends mage.sets.planeshift.SunkenHope { + + public SunkenHope(UUID ownerId) { + super(ownerId); + this.cardNumber = 26; + this.expansionSetCode = "PC2"; + } + + public SunkenHope(final SunkenHope card) { + super(card); + } + + @Override + public SunkenHope copy() { + return new SunkenHope(this); + } +} diff --git a/Mage.Sets/src/mage/sets/planeshift/SunkenHope.java b/Mage.Sets/src/mage/sets/planeshift/SunkenHope.java new file mode 100644 index 0000000000..8dae138d1c --- /dev/null +++ b/Mage.Sets/src/mage/sets/planeshift/SunkenHope.java @@ -0,0 +1,120 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.planeshift; + +import java.util.UUID; +import mage.Constants; +import mage.Constants.CardType; +import mage.Constants.Outcome; +import mage.Constants.Rarity; +import mage.Constants.TargetController; +import mage.Constants.Zone; +import mage.abilities.Ability; +import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; +import mage.abilities.effects.OneShotEffect; +import mage.cards.CardImpl; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.permanent.ControllerPredicate; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; +import mage.target.Target; +import mage.target.common.TargetControlledCreaturePermanent; +import mage.target.common.TargetControlledPermanent; + +/** + * + * @author LevelX2 + */ +public class SunkenHope extends CardImpl { + + public SunkenHope(UUID ownerId) { + super(ownerId, 37, "Sunken Hope", Rarity.RARE, new CardType[]{CardType.ENCHANTMENT}, "{3}{U}{U}"); + this.expansionSetCode = "PLS"; + + this.color.setBlue(true); + + // At the beginning of each player's upkeep, that player returns a creature he or she controls to its owner's hand. + this.addAbility(new BeginningOfUpkeepTriggeredAbility(Constants.Zone.BATTLEFIELD, new ReturnToHandEffect(), TargetController.ANY, false, true)); + } + + public SunkenHope(final SunkenHope card) { + super(card); + } + + @Override + public SunkenHope copy() { + return new SunkenHope(this); + } +} + +class ReturnToHandEffect extends OneShotEffect { + + public ReturnToHandEffect() { + super(Outcome.ReturnToHand); + staticText = "that player returns a creature he or she controls to its owner's hand"; + } + + public ReturnToHandEffect(final ReturnToHandEffect effect) { + super(effect); + } + + @Override + public ReturnToHandEffect copy() { + return new ReturnToHandEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + boolean result = false; + + Player player = game.getPlayer(targetPointer.getFirst(game, source)); + if (player == null) { + return false; + } + + FilterCreaturePermanent filter = new FilterCreaturePermanent(); + filter.add(new ControllerPredicate(Constants.TargetController.YOU)); + Target target = new TargetControlledPermanent(1, 1, filter, true); + target.setRequired(true); + + if (target.canChoose(player.getId(), game)) { + while (!target.isChosen() && target.canChoose(player.getId(), game)) { + player.chooseTarget(Outcome.ReturnToHand, target, source, game); + } + + for (UUID targetId: target.getTargets()) { + Permanent permanent = game.getPermanent(targetId); + if (permanent != null) { + result |= permanent.moveToZone(Zone.HAND, source.getSourceId(), game, false); + } + } + } + return result; + } +} diff --git a/Mage.Sets/src/mage/sets/tenth/SunkenHope.java b/Mage.Sets/src/mage/sets/tenth/SunkenHope.java new file mode 100644 index 0000000000..b92b43f979 --- /dev/null +++ b/Mage.Sets/src/mage/sets/tenth/SunkenHope.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 LevelX2 + */ +public class SunkenHope extends mage.sets.planeshift.SunkenHope { + + public SunkenHope(UUID ownerId) { + super(ownerId); + this.cardNumber = 112; + this.expansionSetCode = "10E"; + } + + public SunkenHope(final SunkenHope card) { + super(card); + } + + @Override + public SunkenHope copy() { + return new SunkenHope(this); + } +}