diff --git a/Mage.Sets/src/mage/sets/jacevschandra/Gush.java b/Mage.Sets/src/mage/sets/jacevschandra/Gush.java new file mode 100644 index 0000000000..013d9405b8 --- /dev/null +++ b/Mage.Sets/src/mage/sets/jacevschandra/Gush.java @@ -0,0 +1,73 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.jacevschandra; + +import java.util.UUID; +import mage.abilities.costs.AlternativeCostSourceAbility; +import mage.abilities.costs.common.ReturnToHandTargetCost; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.common.FilterControlledLandPermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.target.common.TargetControlledPermanent; + +/** + * + * @author Plopman + */ +public class Gush extends CardImpl { + + private static final FilterControlledLandPermanent filter = new FilterControlledLandPermanent("Island"); + static{ + filter.add(new SubtypePredicate("Island")); + } + public Gush(UUID ownerId) { + super(ownerId, 27, "Gush", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{4}{U}"); + this.expansionSetCode = "DD2"; + + this.color.setBlue(true); + + // You may return two Islands you control to their owner's hand rather than pay Gush's mana cost. + AlternativeCostSourceAbility ability; + ability = new AlternativeCostSourceAbility(new ReturnToHandTargetCost(new TargetControlledPermanent(2, 2, filter, true))); + this.addAbility(ability); + // Draw two cards. + this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(2)); + } + + public Gush(final Gush card) { + super(card); + } + + @Override + public Gush copy() { + return new Gush(this); + } +} diff --git a/Mage.Sets/src/mage/sets/mercadianmasques/Gush.java b/Mage.Sets/src/mage/sets/mercadianmasques/Gush.java new file mode 100644 index 0000000000..6dd08adfca --- /dev/null +++ b/Mage.Sets/src/mage/sets/mercadianmasques/Gush.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.mercadianmasques; + +import java.util.UUID; + +/** + * + * @author Plopman + */ +public class Gush extends mage.sets.jacevschandra.Gush { + + public Gush(UUID ownerId) { + super(ownerId); + this.cardNumber = 82; + this.expansionSetCode = "MMQ"; + } + + public Gush(final Gush card) { + super(card); + } + + @Override + public Gush copy() { + return new Gush(this); + } +} diff --git a/Mage.Sets/src/mage/sets/onslaught/Gigapede.java b/Mage.Sets/src/mage/sets/onslaught/Gigapede.java new file mode 100644 index 0000000000..32d7cfc8a0 --- /dev/null +++ b/Mage.Sets/src/mage/sets/onslaught/Gigapede.java @@ -0,0 +1,109 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.onslaught; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; +import mage.abilities.costs.common.DiscardCardCost; +import mage.abilities.effects.common.ReturnSourceFromGraveyardToHandEffect; +import mage.abilities.keyword.ShroudAbility; +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.players.Player; + +/** + * + * @author Plopman + */ +public class Gigapede extends CardImpl { + + public Gigapede(UUID ownerId) { + super(ownerId, 264, "Gigapede", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{3}{G}{G}"); + this.expansionSetCode = "ONS"; + this.subtype.add("Insect"); + + this.color.setGreen(true); + this.power = new MageInt(6); + this.toughness = new MageInt(1); + + // Shroud + this.addAbility(ShroudAbility.getInstance()); + // At the beginning of your upkeep, if Gigapede is in your graveyard, you may discard a card. If you do, return Gigapede to your hand. + this.addAbility(new GigapedeTriggerdAbility()); + } + + public Gigapede(final Gigapede card) { + super(card); + } + + @Override + public Gigapede copy() { + return new Gigapede(this); + } +} + + +class GigapedeTriggerdAbility extends BeginningOfUpkeepTriggeredAbility{ + + public GigapedeTriggerdAbility(){ + super(Zone.GRAVEYARD, new ReturnSourceFromGraveyardToHandEffect(), TargetController.YOU, true); + this.addCost(new DiscardCardCost()); + } + + public GigapedeTriggerdAbility(GigapedeTriggerdAbility ability) { + super(ability); + } + + @Override + public BeginningOfUpkeepTriggeredAbility copy() { + return new GigapedeTriggerdAbility(this); + } + + + @Override + public boolean checkInterveningIfClause(Game game) { + Player controller = game.getPlayer(controllerId); + if(controller != null && controller.getGraveyard().contains(sourceId)){ + return super.checkInterveningIfClause(game); + } + return false; + } + + @Override + public String getRule() { + return "At the beginning of your upkeep, if {source} is in your graveyard, you may discard a card. If you do, return {source} to your hand"; + } + + + +} \ No newline at end of file