diff --git a/Mage.Sets/src/mage/sets/ajanivsnicolbolas/LoxodonHierarch.java b/Mage.Sets/src/mage/sets/ajanivsnicolbolas/LoxodonHierarch.java new file mode 100644 index 00000000000..bed1426e281 --- /dev/null +++ b/Mage.Sets/src/mage/sets/ajanivsnicolbolas/LoxodonHierarch.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.ajanivsnicolbolas; + +import java.util.UUID; + +/** + * + * @author dustinconrad + */ +public class LoxodonHierarch extends mage.sets.ravnika.LoxodonHierarch { + + public LoxodonHierarch(UUID ownerId) { + super(ownerId); + this.cardNumber = 15; + this.expansionSetCode = "DDH"; + } + + public LoxodonHierarch(final LoxodonHierarch card) { + super(card); + } + + @Override + public LoxodonHierarch copy() { + return new LoxodonHierarch(this); + } +} diff --git a/Mage.Sets/src/mage/sets/coldsnap/SoulSpike.java b/Mage.Sets/src/mage/sets/coldsnap/SoulSpike.java new file mode 100644 index 00000000000..9eb34d24b92 --- /dev/null +++ b/Mage.Sets/src/mage/sets/coldsnap/SoulSpike.java @@ -0,0 +1,79 @@ +/* + * 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.ObjectColor; +import mage.abilities.costs.AlternativeCostSourceAbility; +import mage.abilities.costs.common.ExileFromHandCost; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.abilities.effects.common.GainLifeEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.FilterCard; +import mage.filter.predicate.mageobject.ColorPredicate; +import mage.target.common.TargetCardInHand; +import mage.target.common.TargetCreatureOrPlayer; + +/** + * + * @author dustinconrad + */ +public class SoulSpike extends CardImpl { + + private static final FilterCard filter = new FilterCard("two black cards"); + + static { + filter.add(new ColorPredicate(ObjectColor.BLACK)); + } + + public SoulSpike(UUID ownerId) { + super(ownerId, 70, "Soul Spike", Rarity.RARE, new CardType[]{CardType.INSTANT}, "{5}{B}{B}"); + this.expansionSetCode = "CSP"; + + this.color.setBlack(true); + + // You may exile two black cards from your hand rather than pay Soul Spike's mana cost. + this.addAbility(new AlternativeCostSourceAbility(new ExileFromHandCost(new TargetCardInHand(2, filter)))); + // Soul Spike deals 4 damage to target creature or player and you gain 4 life. + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + this.getSpellAbility().addEffect(new DamageTargetEffect(4)); + this.getSpellAbility().addEffect(new GainLifeEffect(4)); + } + + public SoulSpike(final SoulSpike card) { + super(card); + } + + @Override + public SoulSpike copy() { + return new SoulSpike(this); + } +} diff --git a/Mage.Sets/src/mage/sets/exodus/Forbid.java b/Mage.Sets/src/mage/sets/exodus/Forbid.java new file mode 100644 index 00000000000..6a91935817a --- /dev/null +++ b/Mage.Sets/src/mage/sets/exodus/Forbid.java @@ -0,0 +1,70 @@ +/* + * 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.exodus; + +import java.util.UUID; + +import mage.abilities.costs.common.DiscardCardCost; +import mage.abilities.costs.common.DiscardTargetCost; +import mage.abilities.effects.common.CounterTargetEffect; +import mage.abilities.keyword.BuybackAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.FilterCard; +import mage.target.TargetSpell; +import mage.target.common.TargetCardInHand; + +/** + * + * @author dustinconrad + */ +public class Forbid extends CardImpl { + + public Forbid(UUID ownerId) { + super(ownerId, 35, "Forbid", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{1}{U}{U}"); + this.expansionSetCode = "EXO"; + + this.color.setBlue(true); + + // Buyback-Discard two cards. + this.addAbility(new BuybackAbility(new DiscardTargetCost(new TargetCardInHand(2, new FilterCard("two cards"))))); + // Counter target spell. + this.getSpellAbility().addEffect(new CounterTargetEffect()); + this.getSpellAbility().addTarget(new TargetSpell()); + } + + public Forbid(final Forbid card) { + super(card); + } + + @Override + public Forbid copy() { + return new Forbid(this); + } +} diff --git a/Mage.Sets/src/mage/sets/guildpact/Castigate.java b/Mage.Sets/src/mage/sets/guildpact/Castigate.java new file mode 100644 index 00000000000..59a72c111f3 --- /dev/null +++ b/Mage.Sets/src/mage/sets/guildpact/Castigate.java @@ -0,0 +1,76 @@ +/* + * 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.abilities.effects.common.ExileCardYouChooseTargetOpponentEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.Filter; +import mage.filter.FilterCard; +import mage.filter.common.FilterCreatureCard; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.CardTypePredicate; +import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; +import mage.target.common.TargetOpponent; + +/** + * + * @author dustinconrad + */ +public class Castigate extends CardImpl { + + private static final FilterCard filter = new FilterCard("a nonland card"); + + static { + filter.add(Predicates.not(new CardTypePredicate(CardType.LAND))); + } + + public Castigate(UUID ownerId) { + super(ownerId, 106, "Castigate", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{W}{B}"); + this.expansionSetCode = "GPT"; + + this.color.setBlack(true); + this.color.setWhite(true); + + // Target opponent reveals his or her hand. You choose a nonland card from it and exile that card. + this.getSpellAbility().addEffect(new ExileCardYouChooseTargetOpponentEffect(filter)); + this.getSpellAbility().addTarget(new TargetOpponent()); + } + + public Castigate(final Castigate card) { + super(card); + } + + @Override + public Castigate copy() { + return new Castigate(this); + } +} diff --git a/Mage.Sets/src/mage/sets/lorwyn/ForcedFruition.java b/Mage.Sets/src/mage/sets/lorwyn/ForcedFruition.java new file mode 100644 index 00000000000..1d8e716864d --- /dev/null +++ b/Mage.Sets/src/mage/sets/lorwyn/ForcedFruition.java @@ -0,0 +1,67 @@ +/* + * 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.lorwyn; + +import java.util.UUID; + +import mage.abilities.common.SpellCastOpponentTriggeredAbility; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.DrawCardTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.SetTargetPointer; +import mage.constants.Zone; +import mage.filter.FilterSpell; + +/** + * + * @author dustinconrad + */ +public class ForcedFruition extends CardImpl { + + public ForcedFruition(UUID ownerId) { + super(ownerId, 66, "Forced Fruition", Rarity.RARE, new CardType[]{CardType.ENCHANTMENT}, "{4}{U}{U}"); + this.expansionSetCode = "LRW"; + + this.color.setBlue(true); + + // Whenever an opponent casts a spell, that player draws seven cards. + this.addAbility(new SpellCastOpponentTriggeredAbility(Zone.BATTLEFIELD, new DrawCardTargetEffect(7), + new FilterSpell(), false, SetTargetPointer.PLAYER)); + } + + public ForcedFruition(final ForcedFruition card) { + super(card); + } + + @Override + public ForcedFruition copy() { + return new ForcedFruition(this); + } +} diff --git a/Mage.Sets/src/mage/sets/portal/CruelTutor.java b/Mage.Sets/src/mage/sets/portal/CruelTutor.java new file mode 100644 index 00000000000..bb4793132e9 --- /dev/null +++ b/Mage.Sets/src/mage/sets/portal/CruelTutor.java @@ -0,0 +1,66 @@ +/* + * 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.portal; + +import java.util.UUID; + +import mage.abilities.effects.common.LoseLifeSourceControllerEffect; +import mage.abilities.effects.common.search.SearchLibraryPutInHandEffect; +import mage.abilities.effects.common.search.SearchLibraryPutOnLibraryEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.target.common.TargetCardInLibrary; + +/** + * + * @author dustinconrad + */ +public class CruelTutor extends CardImpl { + + public CruelTutor(UUID ownerId) { + super(ownerId, 9, "Cruel Tutor", Rarity.RARE, new CardType[]{CardType.SORCERY}, "{2}{B}"); + this.expansionSetCode = "POR"; + + this.color.setBlack(true); + + // Search your library for a card, then shuffle your library and put that card on top of it. You lose 2 life. + TargetCardInLibrary target = new TargetCardInLibrary(); + this.getSpellAbility().addEffect(new SearchLibraryPutOnLibraryEffect(target, false, true)); + this.getSpellAbility().addEffect(new LoseLifeSourceControllerEffect(2)); + } + + public CruelTutor(final CruelTutor card) { + super(card); + } + + @Override + public CruelTutor copy() { + return new CruelTutor(this); + } +} diff --git a/Mage.Sets/src/mage/sets/ravnika/LoxodonHierarch.java b/Mage.Sets/src/mage/sets/ravnika/LoxodonHierarch.java new file mode 100644 index 00000000000..d38c84fc20d --- /dev/null +++ b/Mage.Sets/src/mage/sets/ravnika/LoxodonHierarch.java @@ -0,0 +1,88 @@ +/* + * 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.ravnika; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldAbility; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.SacrificeSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.GainLifeEffect; +import mage.abilities.effects.common.RegenerateAllEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.TargetController; +import mage.constants.Zone; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.permanent.ControllerPredicate; + +/** + * + * @author dustinconrad + */ +public class LoxodonHierarch extends CardImpl { + + private static FilterCreaturePermanent filter = new FilterCreaturePermanent("each creature you control"); + + static { + filter.add(new ControllerPredicate(TargetController.YOU)); + } + + public LoxodonHierarch(UUID ownerId) { + super(ownerId, 214, "Loxodon Hierarch", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{2}{G}{W}"); + this.expansionSetCode = "RAV"; + this.subtype.add("Elephant"); + this.subtype.add("Cleric"); + + this.color.setGreen(true); + this.color.setWhite(true); + this.power = new MageInt(4); + this.toughness = new MageInt(4); + + // When Loxodon Hierarch enters the battlefield, you gain 4 life. + Ability etbAbility = new EntersBattlefieldTriggeredAbility(new GainLifeEffect(4)); + this.addAbility(etbAbility); + // {G}{W}, Sacrifice Loxodon Hierarch: Regenerate each creature you control. + Ability activated = new SimpleActivatedAbility(Zone.BATTLEFIELD, new RegenerateAllEffect(filter), new ManaCostsImpl("{G}{W}")); + activated.addCost(new SacrificeSourceCost()); + this.addAbility(activated); + } + + public LoxodonHierarch(final LoxodonHierarch card) { + super(card); + } + + @Override + public LoxodonHierarch copy() { + return new LoxodonHierarch(this); + } +} diff --git a/Mage.Sets/src/mage/sets/saviorsofkamigawa/FootstepsOfTheGoryo.java b/Mage.Sets/src/mage/sets/saviorsofkamigawa/FootstepsOfTheGoryo.java new file mode 100644 index 00000000000..6d4a3d644b6 --- /dev/null +++ b/Mage.Sets/src/mage/sets/saviorsofkamigawa/FootstepsOfTheGoryo.java @@ -0,0 +1,122 @@ +/* + * 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.saviorsofkamigawa; + +import java.util.UUID; + +import mage.abilities.Ability; +import mage.abilities.DelayedTriggeredAbility; +import mage.abilities.common.delayed.AtEndOfTurnDelayedTriggeredAbility; +import mage.abilities.effects.ContinuousEffect; +import mage.abilities.effects.Effect; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.CreateDelayedTriggeredAbilityEffect; +import mage.abilities.effects.common.ExileTargetEffect; +import mage.abilities.effects.common.ReturnFromGraveyardToBattlefieldTargetEffect; +import mage.abilities.effects.common.SacrificeTargetEffect; +import mage.abilities.effects.common.continious.GainAbilityTargetEffect; +import mage.abilities.keyword.HasteAbility; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.constants.*; +import mage.filter.common.FilterCreatureCard; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; +import mage.target.common.TargetCardInYourGraveyard; +import mage.target.targetpointer.FixedTarget; + +/** + * + * @author dustinconrad + */ +public class FootstepsOfTheGoryo extends CardImpl { + + public FootstepsOfTheGoryo(UUID ownerId) { + super(ownerId, 68, "Footsteps of the Goryo", Rarity.UNCOMMON, new CardType[]{CardType.SORCERY}, "{2}{B}"); + this.expansionSetCode = "SOK"; + this.subtype.add("Arcane"); + + this.color.setBlack(true); + + // Return target creature card from your graveyard to the battlefield. Sacrifice that creature at the beginning of the next end step. + this.getSpellAbility().addEffect(new FootstepsOfTheGoryoEffect()); + this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(new FilterCreatureCard())); + } + + public FootstepsOfTheGoryo(final FootstepsOfTheGoryo card) { + super(card); + } + + @Override + public FootstepsOfTheGoryo copy() { + return new FootstepsOfTheGoryo(this); + } +} + +class FootstepsOfTheGoryoEffect extends OneShotEffect { + + public FootstepsOfTheGoryoEffect() { + super(Outcome.PutCardInPlay); + this.staticText = "Return target creature card from your graveyard to the battlefield. Sacrifice that creature at the beginning of the next end step"; + } + + public FootstepsOfTheGoryoEffect(final FootstepsOfTheGoryoEffect effect) { + super(effect); + } + + @Override + public FootstepsOfTheGoryoEffect copy() { + return new FootstepsOfTheGoryoEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null) { + Card card = game.getCard(getTargetPointer().getFirst(game, source)); + if (card != null) { + if (controller.putOntoBattlefieldWithInfo(card, game, Zone.GRAVEYARD, source.getSourceId())) { + Permanent permanent = game.getPermanent(card.getId()); + if (permanent != null) { + // Sacrifice it at end of turn + Effect sacrificeEffect = new SacrificeTargetEffect("Sacrifice that creature at the beginning of next end step"); + sacrificeEffect.setTargetPointer(new FixedTarget(card.getId())); + DelayedTriggeredAbility delayedAbility = new AtEndOfTurnDelayedTriggeredAbility(sacrificeEffect); + delayedAbility.setSourceId(source.getSourceId()); + delayedAbility.setControllerId(source.getControllerId()); + game.addDelayedTriggeredAbility(delayedAbility); + return true; + + } + } + } + } + return false; + } +}