diff --git a/Mage.Sets/src/mage/sets/guildpact/TinStreetHooligan.java b/Mage.Sets/src/mage/sets/guildpact/TinStreetHooligan.java new file mode 100644 index 0000000000..97e9cd81b3 --- /dev/null +++ b/Mage.Sets/src/mage/sets/guildpact/TinStreetHooligan.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.guildpact; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.condition.common.ManaWasSpentCondition; +import mage.abilities.decorator.ConditionalOneShotEffect; +import mage.abilities.effects.common.DestroyTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.ColoredManaSymbol; +import mage.constants.Rarity; +import mage.target.common.TargetArtifactPermanent; + +/** + * + * @author LevelX2 + */ +public class TinStreetHooligan extends CardImpl { + + public TinStreetHooligan(UUID ownerId) { + super(ownerId, 78, "Tin Street Hooligan", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{1}{R}"); + this.expansionSetCode = "GPT"; + this.subtype.add("Goblin"); + this.subtype.add("Rogue"); + + this.color.setRed(true); + this.power = new MageInt(2); + this.toughness = new MageInt(1); + + // When Tin Street Hooligan enters the battlefield, if {G} was spent to cast Tin Street Hooligan, destroy target artifact. + Ability ability = new EntersBattlefieldTriggeredAbility(new ConditionalOneShotEffect(new DestroyTargetEffect(), new ManaWasSpentCondition(ColoredManaSymbol.G), + "if {G} was spent to cast {this}, destroy target artifact"), false); + ability.addTarget(new TargetArtifactPermanent(true)); + this.addAbility(ability); + } + + public TinStreetHooligan(final TinStreetHooligan card) { + super(card); + } + + @Override + public TinStreetHooligan copy() { + return new TinStreetHooligan(this); + } +} diff --git a/Mage.Sets/src/mage/sets/magic2010/TimeWarp.java b/Mage.Sets/src/mage/sets/magic2010/TimeWarp.java index 9873ed4ab8..5abb589a60 100644 --- a/Mage.Sets/src/mage/sets/magic2010/TimeWarp.java +++ b/Mage.Sets/src/mage/sets/magic2010/TimeWarp.java @@ -49,7 +49,7 @@ public class TimeWarp extends CardImpl { super(ownerId, 75, "Time Warp", Rarity.MYTHIC, new CardType[]{CardType.SORCERY}, "{3}{U}{U}"); this.expansionSetCode = "M10"; this.color.setBlue(true); - this.getSpellAbility().addTarget(new TargetPlayer()); + this.getSpellAbility().addTarget(new TargetPlayer(true)); this.getSpellAbility().addEffect(new TimeWarpEffect()); } diff --git a/Mage.Sets/src/mage/sets/odyssey/TimeStretch.java b/Mage.Sets/src/mage/sets/odyssey/TimeStretch.java new file mode 100644 index 0000000000..9e8559c326 --- /dev/null +++ b/Mage.Sets/src/mage/sets/odyssey/TimeStretch.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.odyssey; + +import java.util.UUID; + +/** + * + * @author LevelX2 + */ +public class TimeStretch extends mage.sets.tenth.TimeStretch { + + public TimeStretch(UUID ownerId) { + super(ownerId); + this.cardNumber = 108; + this.expansionSetCode = "ODY"; + } + + public TimeStretch(final TimeStretch card) { + super(card); + } + + @Override + public TimeStretch copy() { + return new TimeStretch(this); + } +} diff --git a/Mage.Sets/src/mage/sets/odyssey/Werebear.java b/Mage.Sets/src/mage/sets/odyssey/Werebear.java new file mode 100644 index 0000000000..8cdb13f4a7 --- /dev/null +++ b/Mage.Sets/src/mage/sets/odyssey/Werebear.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.odyssey; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.condition.common.CardsInControllerGraveCondition; +import mage.abilities.decorator.ConditionalContinousEffect; +import mage.abilities.effects.common.continious.BoostSourceEffect; +import mage.abilities.mana.GreenManaAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; + +/** + * + * @author LevelX2 + */ +public class Werebear extends CardImpl { + + public Werebear(UUID ownerId) { + super(ownerId, 282, "Werebear", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{1}{G}"); + this.expansionSetCode = "ODY"; + this.subtype.add("Human"); + this.subtype.add("Bear"); + this.subtype.add("Druid"); + + this.color.setGreen(true); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // {tap}: Add {G} to your mana pool. + this.addAbility(new GreenManaAbility()); + // Threshold - Werebear gets +3/+3 as long as seven or more cards are in your graveyard. + Ability thresholdAbility = new SimpleStaticAbility( + Zone.BATTLEFIELD, + new ConditionalContinousEffect( + new BoostSourceEffect(3, 3, Duration.WhileOnBattlefield), + new CardsInControllerGraveCondition(7), + "Threshold - {this} gets +3/+3 as long as seven or more cards are in your graveyard" + )); + this.addAbility(thresholdAbility); + + } + + public Werebear(final Werebear card) { + super(card); + } + + @Override + public Werebear copy() { + return new Werebear(this); + } +} diff --git a/Mage.Sets/src/mage/sets/odyssey/Zoologist.java b/Mage.Sets/src/mage/sets/odyssey/Zoologist.java new file mode 100644 index 0000000000..5442868e39 --- /dev/null +++ b/Mage.Sets/src/mage/sets/odyssey/Zoologist.java @@ -0,0 +1,119 @@ +/* + * 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.odyssey; + +import java.util.UUID; +import mage.MageInt; +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.cards.Card; +import mage.cards.CardImpl; +import mage.cards.Cards; +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 LevelX2 + */ +public class Zoologist extends CardImpl { + + public Zoologist(UUID ownerId) { + super(ownerId, 285, "Zoologist", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{3}{G}"); + this.expansionSetCode = "ODY"; + this.subtype.add("Human"); + this.subtype.add("Druid"); + + this.color.setGreen(true); + this.power = new MageInt(1); + this.toughness = new MageInt(2); + + // {3}{G}, {tap}: Reveal the top card of your library. If it's a creature card, put it onto the battlefield. Otherwise, put it into your graveyard. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ZoologistEffect(), new ManaCostsImpl("{3}{G}")); + ability.addCost(new TapSourceCost()); + this.addAbility(ability); + } + + public Zoologist(final Zoologist card) { + super(card); + } + + @Override + public Zoologist copy() { + return new Zoologist(this); + } +} + +class ZoologistEffect extends OneShotEffect { + + public ZoologistEffect() { + super(Outcome.PutCreatureInPlay); + this.staticText = "Reveal the top card of your library. If it's a creature card, put it onto the battlefield. Otherwise, put it into your graveyard"; + } + + public ZoologistEffect(final ZoologistEffect effect) { + super(effect); + } + + @Override + public ZoologistEffect copy() { + return new ZoologistEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player player = game.getPlayer(source.getControllerId()); + if (player == null) { + return false; + } + + if (player.getLibrary().size() > 0) { + Card card = player.getLibrary().getFromTop(game); + Cards cards = new CardsImpl(); + cards.add(card); + player.revealCards("Zoologist", cards, game); + + if (card != null) { + if (card.getCardType().contains(CardType.CREATURE)) { + player.putOntoBattlefieldWithInfo(card, game, Zone.LIBRARY, source.getSourceId()); + } else { + player.moveCardToGraveyardWithInfo(card, source.getSourceId(), game, Zone.LIBRARY); + } + } + } + return false; + } +} diff --git a/Mage.Sets/src/mage/sets/tenth/TimeStretch.java b/Mage.Sets/src/mage/sets/tenth/TimeStretch.java new file mode 100644 index 0000000000..6398efb62c --- /dev/null +++ b/Mage.Sets/src/mage/sets/tenth/TimeStretch.java @@ -0,0 +1,91 @@ +/* + * 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; +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.game.Game; +import mage.game.turn.TurnMod; +import mage.target.TargetPlayer; + +/** + * + * @author LevelX2 + */ +public class TimeStretch extends CardImpl { + + public TimeStretch(UUID ownerId) { + super(ownerId, 118, "Time Stretch", Rarity.RARE, new CardType[]{CardType.SORCERY}, "{8}{U}{U}"); + this.expansionSetCode = "10E"; + + this.color.setBlue(true); + + // Target player takes two extra turns after this one. + this.getSpellAbility().addTarget(new TargetPlayer(true)); + this.getSpellAbility().addEffect(new TimeStretchEffect()); + + } + + public TimeStretch(final TimeStretch card) { + super(card); + } + + @Override + public TimeStretch copy() { + return new TimeStretch(this); + } +} + +class TimeStretchEffect extends OneShotEffect { + + public TimeStretchEffect() { + super(Outcome.ExtraTurn); + staticText = "Target player takes two extra turns after this one"; + } + + public TimeStretchEffect(final TimeStretchEffect effect) { + super(effect); + } + + @Override + public TimeStretchEffect copy() { + return new TimeStretchEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + game.getState().getTurnMods().add(new TurnMod(source.getFirstTarget(), false)); + game.getState().getTurnMods().add(new TurnMod(source.getFirstTarget(), false)); + return true; + } +}