diff --git a/Mage.Sets/src/mage/sets/coldsnap/ScryingSheets.java b/Mage.Sets/src/mage/sets/coldsnap/ScryingSheets.java new file mode 100644 index 0000000000..f0a1d5e8b5 --- /dev/null +++ b/Mage.Sets/src/mage/sets/coldsnap/ScryingSheets.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.coldsnap; + +import java.util.UUID; +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.OneShotEffect; +import mage.abilities.mana.ColorlessManaAbility; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.cards.CardsImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.game.Game; +import mage.players.Player; + +/** + * + * @author emerald000 + */ +public class ScryingSheets extends CardImpl { + + public ScryingSheets(UUID ownerId) { + super(ownerId, 149, "Scrying Sheets", Rarity.RARE, new CardType[]{CardType.LAND}, ""); + this.expansionSetCode = "CSP"; + this.supertype.add("Snow"); + + // {tap}: Add {1} to your mana pool. + this.addAbility(new ColorlessManaAbility()); + + // {1}{snow}, {tap}: Look at the top card of your library. If that card is snow, you may reveal it and put it into your hand. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ScryingSheetsEffect(), new ManaCostsImpl<>("{1}{snow}")); + ability.addCost(new TapSourceCost()); + this.addAbility(ability); + } + + public ScryingSheets(final ScryingSheets card) { + super(card); + } + + @Override + public ScryingSheets copy() { + return new ScryingSheets(this); + } +} + +class ScryingSheetsEffect extends OneShotEffect { + + ScryingSheetsEffect() { + super(Outcome.Benefit); + this.staticText = "Look at the top card of your library. If that card is snow, you may reveal it and put it into your hand"; + } + + ScryingSheetsEffect(final ScryingSheetsEffect effect) { + super(effect); + } + + @Override + public ScryingSheetsEffect copy() { + return new ScryingSheetsEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player player = game.getPlayer(source.getControllerId()); + if (player != null && player.getLibrary().size() > 0) { + Card card = player.getLibrary().getFromTop(game); + if (card != null) { + CardsImpl cards = new CardsImpl(); + cards.add(card); + player.lookAtCards("Scrying Sheets", cards, game); + if (card.getSupertype().contains("Snow")) { + if (player.chooseUse(outcome, new StringBuilder("Reveal ").append(card.getName()).append(" and put it into your hand?").toString(), game)) { + card = player.getLibrary().removeFromTop(game); + player.moveCardToHandWithInfo(card, source.getSourceId(), game, Zone.LIBRARY); + player.revealCards("Scrying Sheets", cards, game); + } + } + } + return true; + } + return false; + } +} diff --git a/Mage.Sets/src/mage/sets/commander/DamiaSageOfStone.java b/Mage.Sets/src/mage/sets/commander/DamiaSageOfStone.java new file mode 100644 index 0000000000..6809bc76b7 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander/DamiaSageOfStone.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.commander; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.dynamicvalue.IntPlusDynamicValue; +import mage.abilities.dynamicvalue.MultipliedValue; +import mage.abilities.dynamicvalue.common.CardsInControllerHandCount; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.abilities.effects.common.SkipDrawStepEffect; +import mage.abilities.keyword.DeathtouchAbility; +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 emerald000 + */ +public class DamiaSageOfStone extends CardImpl { + + public DamiaSageOfStone(UUID ownerId) { + super(ownerId, 191, "Damia, Sage of Stone", Rarity.MYTHIC, new CardType[]{CardType.CREATURE}, "{4}{G}{U}{B}"); + this.expansionSetCode = "CMD"; + this.supertype.add("Legendary"); + this.subtype.add("Gorgon"); + this.subtype.add("Wizard"); + + this.color.setBlack(true); + this.color.setGreen(true); + this.color.setBlue(true); + this.power = new MageInt(4); + this.toughness = new MageInt(4); + + // Deathtouch + this.addAbility(DeathtouchAbility.getInstance()); + + // Skip your draw step. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new SkipDrawStepEffect())); + + // At the beginning of your upkeep, if you have fewer than seven cards in hand, draw cards equal to the difference. + this.addAbility(new DamiaSageOfStoneTriggeredAbility()); + } + + public DamiaSageOfStone(final DamiaSageOfStone card) { + super(card); + } + + @Override + public DamiaSageOfStone copy() { + return new DamiaSageOfStone(this); + } +} + +class DamiaSageOfStoneTriggeredAbility extends BeginningOfUpkeepTriggeredAbility { + + DamiaSageOfStoneTriggeredAbility() { + super(new DrawCardSourceControllerEffect(new IntPlusDynamicValue(7, new MultipliedValue(new CardsInControllerHandCount(), -1))), TargetController.YOU, false); + } + + DamiaSageOfStoneTriggeredAbility(final DamiaSageOfStoneTriggeredAbility ability) { + super(ability); + } + + @Override + public DamiaSageOfStoneTriggeredAbility copy() { + return new DamiaSageOfStoneTriggeredAbility(this); + } + + @Override + public boolean checkInterveningIfClause(Game game) { + Player player = game.getPlayer(this.getControllerId()); + if (player != null) { + return player.getHand().size() < 7; + } + return false; + } + + @Override + public String getRule() { + return "At the beginning of your upkeep, if you have fewer than seven cards in hand, draw cards equal to the difference"; + } +} diff --git a/Mage.Sets/src/mage/sets/futuresight/MagusOfTheFuture.java b/Mage.Sets/src/mage/sets/futuresight/MagusOfTheFuture.java new file mode 100644 index 0000000000..b568cbbc4e --- /dev/null +++ b/Mage.Sets/src/mage/sets/futuresight/MagusOfTheFuture.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.futuresight; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.continious.PlayTheTopCardEffect; +import mage.abilities.effects.common.continious.PlayWithTheTopCardRevealedEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.FilterCard; + +/** + * + * @author emerald000 + */ +public class MagusOfTheFuture extends CardImpl { + + public MagusOfTheFuture(UUID ownerId) { + super(ownerId, 40, "Magus of the Future", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{2}{U}{U}{U}"); + this.expansionSetCode = "FUT"; + this.subtype.add("Human"); + this.subtype.add("Wizard"); + + this.color.setBlue(true); + this.power = new MageInt(2); + this.toughness = new MageInt(3); + + // Play with the top card of your library revealed. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new PlayWithTheTopCardRevealedEffect())); + + // You may play the top card of your library. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new PlayTheTopCardEffect(new FilterCard()))); + } + + public MagusOfTheFuture(final MagusOfTheFuture card) { + super(card); + } + + @Override + public MagusOfTheFuture copy() { + return new MagusOfTheFuture(this); + } +} diff --git a/Mage.Sets/src/mage/sets/timespiral/DrainingWhelk.java b/Mage.Sets/src/mage/sets/timespiral/DrainingWhelk.java new file mode 100644 index 0000000000..42f1d44af6 --- /dev/null +++ b/Mage.Sets/src/mage/sets/timespiral/DrainingWhelk.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.timespiral; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.common.CounterTargetEffect; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.abilities.keyword.FlashAbility; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.counters.CounterType; +import mage.game.Game; +import mage.game.stack.Spell; +import mage.target.TargetSpell; + +/** + * + * @author emerald000 + */ +public class DrainingWhelk extends CardImpl { + + public DrainingWhelk(UUID ownerId) { + super(ownerId, 57, "Draining Whelk", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{4}{U}{U}"); + this.expansionSetCode = "TSP"; + this.subtype.add("Illusion"); + + this.color.setBlue(true); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // Flash + this.addAbility(FlashAbility.getInstance()); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + + // When Draining Whelk enters the battlefield, counter target spell. Put X +1/+1 counters on Draining Whelk, where X is that spell's converted mana cost. + Ability ability = new EntersBattlefieldTriggeredAbility(new DrainingWhelkEffect()); + ability.addTarget(new TargetSpell()); + this.addAbility(ability); + } + + public DrainingWhelk(final DrainingWhelk card) { + super(card); + } + + @Override + public DrainingWhelk copy() { + return new DrainingWhelk(this); + } +} + +class DrainingWhelkEffect extends CounterTargetEffect { + + DrainingWhelkEffect() { + super(); + staticText = "counter target spell. Put X +1/+1 counters on Draining Whelk, where X is that spell's converted mana cost"; + } + + DrainingWhelkEffect(final DrainingWhelkEffect effect) { + super(effect); + } + + @Override + public DrainingWhelkEffect copy() { + return new DrainingWhelkEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Spell targetSpell = game.getStack().getSpell(getTargetPointer().getFirst(game, source)); + if (targetSpell != null) { + int spellCMC = targetSpell.getManaCost().convertedManaCost(); + super.apply(game, source); + new AddCountersSourceEffect(CounterType.P1P1.createInstance(spellCMC)).apply(game, source); + return true; + } + return false; + } +}