From 2e21d38416bb8ad9dc213fdbee50a21cf952972a Mon Sep 17 00:00:00 2001 From: North Date: Tue, 27 Sep 2011 23:09:44 +0300 Subject: [PATCH] Added cards --- .../sets/conflux/ControlledInstincts.java | 84 +++++++++++++ .../src/mage/sets/innistrad/AltarsReap.java | 64 ++++++++++ .../src/mage/sets/innistrad/Bramblecrush.java | 70 +++++++++++ .../src/mage/sets/innistrad/CellarDoor.java | 106 +++++++++++++++++ .../mage/sets/innistrad/Claustrophobia.java | 8 +- .../sets/innistrad/DerangedAssistant.java | 111 ++++++++++++++++++ .../mage/sets/innistrad/ElderOfLaurels.java | 77 ++++++++++++ .../mage/sets/innistrad/GhoulcallersBell.java | 98 ++++++++++++++++ .../mage/sets/innistrad/IntoTheMawOfHell.java | 97 +++++++++++++++ .../src/mage/sets/innistrad/Lumberknot.java | 68 +++++++++++ .../mage/sets/innistrad/ManorSkeleton.java | 69 +++++++++++ .../mage/sets/innistrad/MurderOfCrows.java | 100 ++++++++++++++++ .../mage/sets/innistrad/PitchburnDevils.java | 68 +++++++++++ .../src/mage/sets/innistrad/RageThrower.java | 69 +++++++++++ .../mage/sets/innistrad/StromkirkPatrol.java | 67 +++++++++++ .../mage/sets/innistrad/TraitorousBlood.java | 70 +++++++++++ .../mage/sets/innistrad/TributeToHunger.java | 110 +++++++++++++++++ .../src/mage/sets/lorwyn/GlimmerdustNap.java | 80 +++++++++++++ .../mage/sets/magic2010/EntanglingVines.java | 80 +++++++++++++ .../sets/planechase/RockslideElemental.java | 52 ++++++++ .../riseoftheeldrazi/ConsumingVapors.java | 18 +-- .../mage/sets/shardsofalara/AlgaeGharial.java | 68 +++++++++++ .../mage/sets/shardsofalara/Deathgreeter.java | 66 +++++++++++ .../sets/shardsofalara/HissingIguanar.java | 68 +++++++++++ .../shardsofalara/RockslideElemental.java | 68 +++++++++++ .../sets/shardsofalara/ScavengerDrake.java | 68 +++++++++++ .../src/mage/sets/tenth/Dehydration.java | 73 ++++++++++++ .../mage/sets/zendikar/ParalyzingGrasp.java | 9 +- .../common/CreatureDiesTriggeredAbility.java | 85 ++++++++++++++ Mage/src/mage/players/Library.java | 16 +++ 30 files changed, 2068 insertions(+), 19 deletions(-) create mode 100644 Mage.Sets/src/mage/sets/conflux/ControlledInstincts.java create mode 100644 Mage.Sets/src/mage/sets/innistrad/AltarsReap.java create mode 100644 Mage.Sets/src/mage/sets/innistrad/Bramblecrush.java create mode 100644 Mage.Sets/src/mage/sets/innistrad/CellarDoor.java create mode 100644 Mage.Sets/src/mage/sets/innistrad/DerangedAssistant.java create mode 100644 Mage.Sets/src/mage/sets/innistrad/ElderOfLaurels.java create mode 100644 Mage.Sets/src/mage/sets/innistrad/GhoulcallersBell.java create mode 100644 Mage.Sets/src/mage/sets/innistrad/IntoTheMawOfHell.java create mode 100644 Mage.Sets/src/mage/sets/innistrad/Lumberknot.java create mode 100644 Mage.Sets/src/mage/sets/innistrad/ManorSkeleton.java create mode 100644 Mage.Sets/src/mage/sets/innistrad/MurderOfCrows.java create mode 100644 Mage.Sets/src/mage/sets/innistrad/PitchburnDevils.java create mode 100644 Mage.Sets/src/mage/sets/innistrad/RageThrower.java create mode 100644 Mage.Sets/src/mage/sets/innistrad/StromkirkPatrol.java create mode 100644 Mage.Sets/src/mage/sets/innistrad/TraitorousBlood.java create mode 100644 Mage.Sets/src/mage/sets/innistrad/TributeToHunger.java create mode 100644 Mage.Sets/src/mage/sets/lorwyn/GlimmerdustNap.java create mode 100644 Mage.Sets/src/mage/sets/magic2010/EntanglingVines.java create mode 100644 Mage.Sets/src/mage/sets/planechase/RockslideElemental.java create mode 100644 Mage.Sets/src/mage/sets/shardsofalara/AlgaeGharial.java create mode 100644 Mage.Sets/src/mage/sets/shardsofalara/Deathgreeter.java create mode 100644 Mage.Sets/src/mage/sets/shardsofalara/HissingIguanar.java create mode 100644 Mage.Sets/src/mage/sets/shardsofalara/RockslideElemental.java create mode 100644 Mage.Sets/src/mage/sets/shardsofalara/ScavengerDrake.java create mode 100644 Mage.Sets/src/mage/sets/tenth/Dehydration.java create mode 100644 Mage/src/mage/abilities/common/CreatureDiesTriggeredAbility.java diff --git a/Mage.Sets/src/mage/sets/conflux/ControlledInstincts.java b/Mage.Sets/src/mage/sets/conflux/ControlledInstincts.java new file mode 100644 index 00000000000..ae92fc8c99d --- /dev/null +++ b/Mage.Sets/src/mage/sets/conflux/ControlledInstincts.java @@ -0,0 +1,84 @@ +/* + * 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.conflux; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Outcome; +import mage.Constants.Rarity; +import mage.Constants.Zone; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.AttachEffect; +import mage.abilities.effects.common.SkipEnchantedUntapEffect; +import mage.abilities.keyword.EnchantAbility; +import mage.cards.CardImpl; +import mage.filter.Filter.ComparisonScope; +import mage.filter.common.FilterCreaturePermanent; +import mage.target.TargetPermanent; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author North + */ +public class ControlledInstincts extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("red or green creature"); + + static { + filter.getColor().setRed(true); + filter.getColor().setGreen(true); + filter.setUseColor(true); + filter.setScopeColor(ComparisonScope.Any); + } + + public ControlledInstincts(UUID ownerId) { + super(ownerId, 23, "Controlled Instincts", Rarity.UNCOMMON, new CardType[]{CardType.ENCHANTMENT}, "{U}"); + this.expansionSetCode = "CON"; + this.subtype.add("Aura"); + + this.color.setBlue(true); + + // Enchant red or green creature + TargetPermanent auraTarget = new TargetCreaturePermanent(filter); + this.getSpellAbility().addTarget(auraTarget); + this.getSpellAbility().addEffect(new AttachEffect(Outcome.Detriment)); + this.addAbility(new EnchantAbility(auraTarget.getTargetName())); + // Enchanted creature doesn't untap during its controller's untap step. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new SkipEnchantedUntapEffect())); + } + + public ControlledInstincts(final ControlledInstincts card) { + super(card); + } + + @Override + public ControlledInstincts copy() { + return new ControlledInstincts(this); + } +} diff --git a/Mage.Sets/src/mage/sets/innistrad/AltarsReap.java b/Mage.Sets/src/mage/sets/innistrad/AltarsReap.java new file mode 100644 index 00000000000..98e79039c09 --- /dev/null +++ b/Mage.Sets/src/mage/sets/innistrad/AltarsReap.java @@ -0,0 +1,64 @@ +/* + * 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.innistrad; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.abilities.costs.common.SacrificeTargetCost; +import mage.abilities.effects.common.DrawCardControllerEffect; +import mage.cards.CardImpl; +import mage.target.common.TargetControlledCreaturePermanent; + +/** + * + * @author North + */ +public class AltarsReap extends CardImpl { + + public AltarsReap(UUID ownerId) { + super(ownerId, 86, "Altar's Reap", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{1}{B}"); + this.expansionSetCode = "ISD"; + + this.color.setBlack(true); + + // As an additional cost to cast Altar's Reap, sacrifice a creature. + this.getSpellAbility().addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent())); + // Draw two cards. + this.getSpellAbility().addEffect(new DrawCardControllerEffect(2)); + } + + public AltarsReap(final AltarsReap card) { + super(card); + } + + @Override + public AltarsReap copy() { + return new AltarsReap(this); + } +} diff --git a/Mage.Sets/src/mage/sets/innistrad/Bramblecrush.java b/Mage.Sets/src/mage/sets/innistrad/Bramblecrush.java new file mode 100644 index 00000000000..b1bfe66bc57 --- /dev/null +++ b/Mage.Sets/src/mage/sets/innistrad/Bramblecrush.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.innistrad; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.abilities.effects.common.DestroyTargetEffect; +import mage.cards.CardImpl; +import mage.filter.FilterPermanent; +import mage.target.TargetPermanent; + +/** + * + * @author North + */ +public class Bramblecrush extends CardImpl { + + private static final FilterPermanent filter = new FilterPermanent("noncreature permanent"); + + static { + filter.getNotCardType().add(CardType.CREATURE); + filter.setNotCardType(true); + } + + public Bramblecrush(UUID ownerId) { + super(ownerId, 172, "Bramblecrush", Rarity.UNCOMMON, new CardType[]{CardType.SORCERY}, "{2}{G}{G}"); + this.expansionSetCode = "ISD"; + + this.color.setGreen(true); + + // Destroy target noncreature permanent. + this.getSpellAbility().addTarget(new TargetPermanent(filter)); + this.getSpellAbility().addEffect(new DestroyTargetEffect()); + } + + public Bramblecrush(final Bramblecrush card) { + super(card); + } + + @Override + public Bramblecrush copy() { + return new Bramblecrush(this); + } +} diff --git a/Mage.Sets/src/mage/sets/innistrad/CellarDoor.java b/Mage.Sets/src/mage/sets/innistrad/CellarDoor.java new file mode 100644 index 00000000000..d68940ee970 --- /dev/null +++ b/Mage.Sets/src/mage/sets/innistrad/CellarDoor.java @@ -0,0 +1,106 @@ +/* + * 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.innistrad; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Outcome; +import mage.Constants.Rarity; +import mage.Constants.Zone; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.effects.OneShotEffect; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.game.Game; +import mage.game.permanent.token.ZombieToken; +import mage.players.Player; +import mage.target.TargetPlayer; + +/** + * + * @author North + */ +public class CellarDoor extends CardImpl { + + public CellarDoor(UUID ownerId) { + super(ownerId, 218, "Cellar Door", Rarity.UNCOMMON, new CardType[]{CardType.ARTIFACT}, "{2}"); + this.expansionSetCode = "ISD"; + + // {3}, {tap}: Target player puts the bottom card of his or her library into his or her graveyard. If it's a creature card, you put a 2/2 black Zombie creature token onto the battlefield. + SimpleActivatedAbility ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CellarDoorEffect(), new GenericManaCost(3)); + ability.addCost(new TapSourceCost()); + ability.addTarget(new TargetPlayer()); + this.addAbility(ability); + } + + public CellarDoor(final CellarDoor card) { + super(card); + } + + @Override + public CellarDoor copy() { + return new CellarDoor(this); + } +} + +class CellarDoorEffect extends OneShotEffect { + + public CellarDoorEffect() { + super(Outcome.PutCreatureInPlay); + this.staticText = "Target player puts the bottom card of his or her library into his or her graveyard. If it's a creature card, you put a 2/2 black Zombie creature token onto the battlefield"; + } + + public CellarDoorEffect(final CellarDoorEffect effect) { + super(effect); + } + + @Override + public CellarDoorEffect copy() { + return new CellarDoorEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player player = game.getPlayer(source.getFirstTarget()); + if (player != null && player.getLibrary().size() > 0) { + Card card = player.getLibrary().removeFromBottom(game); + if (card != null) { + card.moveToZone(Zone.GRAVEYARD, source.getId(), game, true); + if (card.getCardType().contains(CardType.CREATURE)) { + ZombieToken token = new ZombieToken(); + token.putOntoBattlefield(game, source.getSourceId(), source.getControllerId()); + } + } + return true; + } + return false; + } +} diff --git a/Mage.Sets/src/mage/sets/innistrad/Claustrophobia.java b/Mage.Sets/src/mage/sets/innistrad/Claustrophobia.java index 94a0bf6b411..78695144833 100644 --- a/Mage.Sets/src/mage/sets/innistrad/Claustrophobia.java +++ b/Mage.Sets/src/mage/sets/innistrad/Claustrophobia.java @@ -31,7 +31,9 @@ import java.util.UUID; import mage.Constants; import mage.Constants.CardType; +import mage.Constants.Outcome; import mage.Constants.Rarity; +import mage.Constants.Zone; import mage.abilities.Ability; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.common.SimpleStaticAbility; @@ -60,12 +62,12 @@ public class Claustrophobia extends CardImpl { // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); this.getSpellAbility().addTarget(auraTarget); - this.getSpellAbility().addEffect(new AttachEffect(Constants.Outcome.BoostCreature)); - Ability ability = new EnchantAbility(auraTarget.getTargetName()); + this.getSpellAbility().addEffect(new AttachEffect(Outcome.Detriment)); + this.addAbility(new EnchantAbility(auraTarget.getTargetName())); // When Claustrophobia enters the battlefield, tap enchanted creature. this.addAbility(new EntersBattlefieldTriggeredAbility(new ClaustrophobiaEffect())); // Enchanted creature doesn't untap during its controller's untap step. - this.addAbility(new SimpleStaticAbility(Constants.Zone.BATTLEFIELD, new SkipEnchantedUntapEffect())); + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new SkipEnchantedUntapEffect())); } public Claustrophobia(final Claustrophobia card) { diff --git a/Mage.Sets/src/mage/sets/innistrad/DerangedAssistant.java b/Mage.Sets/src/mage/sets/innistrad/DerangedAssistant.java new file mode 100644 index 00000000000..d3912a4cf98 --- /dev/null +++ b/Mage.Sets/src/mage/sets/innistrad/DerangedAssistant.java @@ -0,0 +1,111 @@ +/* + * 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.innistrad; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.Constants.Zone; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.costs.CostImpl; +import mage.abilities.mana.ColorlessManaAbility; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.game.Game; +import mage.players.Player; + +/** + * + * @author North + */ +public class DerangedAssistant extends CardImpl { + + public DerangedAssistant(UUID ownerId) { + super(ownerId, 52, "Deranged Assistant", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{1}{U}"); + this.expansionSetCode = "ISD"; + this.subtype.add("Human"); + this.subtype.add("Wizard"); + + this.color.setBlue(true); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // {tap}, Put the top card of your library into your graveyard: Add {1} to your mana pool. + ColorlessManaAbility ability = new ColorlessManaAbility(); + ability.addCost(new DerangedAssistantCost()); + this.addAbility(ability); + } + + public DerangedAssistant(final DerangedAssistant card) { + super(card); + } + + @Override + public DerangedAssistant copy() { + return new DerangedAssistant(this); + } +} + +class DerangedAssistantCost extends CostImpl { + + public DerangedAssistantCost() { + this.text = "Put the top card of your library into your graveyard"; + } + + public DerangedAssistantCost(DerangedAssistantCost cost) { + super(cost); + } + + @Override + public boolean pay(Ability ability, Game game, UUID sourceId, UUID controllerId, boolean noMana) { + Player player = game.getPlayer(controllerId); + if (player != null) { + Card card = player.getLibrary().removeFromTop(game); + if (card != null) { + paid = card.moveToZone(Zone.GRAVEYARD, sourceId, game, true); + + } + } + return paid; + } + + @Override + public boolean canPay(UUID sourceId, UUID controllerId, Game game) { + Player player = game.getPlayer(controllerId); + if (player != null && player.getLibrary().size() > 0) { + return true; + } + return false; + } + + @Override + public DerangedAssistantCost copy() { + return new DerangedAssistantCost(this); + } +} diff --git a/Mage.Sets/src/mage/sets/innistrad/ElderOfLaurels.java b/Mage.Sets/src/mage/sets/innistrad/ElderOfLaurels.java new file mode 100644 index 00000000000..ab5647abb91 --- /dev/null +++ b/Mage.Sets/src/mage/sets/innistrad/ElderOfLaurels.java @@ -0,0 +1,77 @@ +/* + * 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.innistrad; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Duration; +import mage.Constants.Rarity; +import mage.Constants.Zone; +import mage.MageInt; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; +import mage.abilities.effects.common.continious.BoostTargetEffect; +import mage.cards.CardImpl; +import mage.filter.common.FilterControlledCreaturePermanent; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author North + */ +public class ElderOfLaurels extends CardImpl { + + public ElderOfLaurels(UUID ownerId) { + super(ownerId, 177, "Elder of Laurels", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{2}{G}"); + this.expansionSetCode = "ISD"; + this.subtype.add("Human"); + this.subtype.add("Advisor"); + + this.color.setGreen(true); + this.power = new MageInt(2); + this.toughness = new MageInt(3); + + // {3}{G}: Target creature gets +X/+X until end of turn, where X is the number of creatures you control. + PermanentsOnBattlefieldCount amount = new PermanentsOnBattlefieldCount(new FilterControlledCreaturePermanent()); + SimpleActivatedAbility ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, + new BoostTargetEffect(amount, amount, Duration.EndOfTurn), + new ManaCostsImpl("{3}{G}")); + ability.addTarget(new TargetCreaturePermanent()); + this.addAbility(ability); + } + + public ElderOfLaurels(final ElderOfLaurels card) { + super(card); + } + + @Override + public ElderOfLaurels copy() { + return new ElderOfLaurels(this); + } +} diff --git a/Mage.Sets/src/mage/sets/innistrad/GhoulcallersBell.java b/Mage.Sets/src/mage/sets/innistrad/GhoulcallersBell.java new file mode 100644 index 00000000000..6783d8f51dc --- /dev/null +++ b/Mage.Sets/src/mage/sets/innistrad/GhoulcallersBell.java @@ -0,0 +1,98 @@ +/* + * 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.innistrad; + +import java.util.Collection; +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Outcome; +import mage.Constants.Rarity; +import mage.Constants.Zone; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.effects.OneShotEffect; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.game.Game; +import mage.players.Player; + +/** + * + * @author North + */ +public class GhoulcallersBell extends CardImpl { + + public GhoulcallersBell(UUID ownerId) { + super(ownerId, 224, "Ghoulcaller's Bell", Rarity.COMMON, new CardType[]{CardType.ARTIFACT}, "{1}"); + this.expansionSetCode = "ISD"; + + // {tap}: Each player puts the top card of his or her library into his or her graveyard. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new GhoulcallersBellEffect(), new TapSourceCost())); + } + + public GhoulcallersBell(final GhoulcallersBell card) { + super(card); + } + + @Override + public GhoulcallersBell copy() { + return new GhoulcallersBell(this); + } +} + +class GhoulcallersBellEffect extends OneShotEffect { + + public GhoulcallersBellEffect() { + super(Outcome.Discard); + this.staticText = "Each player puts the top card of his or her library into his or her graveyard"; + } + + public GhoulcallersBellEffect(final GhoulcallersBellEffect effect) { + super(effect); + } + + @Override + public GhoulcallersBellEffect copy() { + return new GhoulcallersBellEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Collection players = game.getPlayers().values(); + for (Player player : players) { + if (player.getLibrary().size() > 0) { + Card card = player.getLibrary().removeFromTop(game); + if (card != null) { + card.moveToZone(Zone.GRAVEYARD, source.getId(), game, true); + } + } + } + return true; + } +} diff --git a/Mage.Sets/src/mage/sets/innistrad/IntoTheMawOfHell.java b/Mage.Sets/src/mage/sets/innistrad/IntoTheMawOfHell.java new file mode 100644 index 00000000000..95dcfc64ce3 --- /dev/null +++ b/Mage.Sets/src/mage/sets/innistrad/IntoTheMawOfHell.java @@ -0,0 +1,97 @@ +/* + * 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.innistrad; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Outcome; +import mage.Constants.Rarity; +import mage.abilities.Ability; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.DestroyTargetEffect; +import mage.cards.CardImpl; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.target.common.TargetCreaturePermanent; +import mage.target.common.TargetLandPermanent; + +/** + * + * @author North + */ +public class IntoTheMawOfHell extends CardImpl { + + public IntoTheMawOfHell(UUID ownerId) { + super(ownerId, 150, "Into the Maw of Hell", Rarity.UNCOMMON, new CardType[]{CardType.SORCERY}, "{4}{R}{R}"); + this.expansionSetCode = "ISD"; + + this.color.setRed(true); + + // Destroy target land. Into the Maw of Hell deals 13 damage to target creature. + this.getSpellAbility().addTarget(new TargetLandPermanent()); + this.getSpellAbility().addEffect(new DestroyTargetEffect()); + this.getSpellAbility().addTarget(new TargetCreaturePermanent()); + this.getSpellAbility().addEffect(new IntoTheMawOfHellEffect()); + } + + public IntoTheMawOfHell(final IntoTheMawOfHell card) { + super(card); + } + + @Override + public IntoTheMawOfHell copy() { + return new IntoTheMawOfHell(this); + } +} + +class IntoTheMawOfHellEffect extends OneShotEffect { + + public IntoTheMawOfHellEffect() { + super(Outcome.Damage); + this.staticText = "{this} deals 13 damage to target creature"; + } + + public IntoTheMawOfHellEffect(final IntoTheMawOfHellEffect effect) { + super(effect); + } + + @Override + public IntoTheMawOfHellEffect copy() { + return new IntoTheMawOfHellEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Permanent permanent = game.getPermanent(source.getTargets().get(1).getFirstTarget()); + if (permanent != null) { + permanent.damage(13, source.getSourceId(), game, true, false); + return true; + } + return false; + } +} diff --git a/Mage.Sets/src/mage/sets/innistrad/Lumberknot.java b/Mage.Sets/src/mage/sets/innistrad/Lumberknot.java new file mode 100644 index 00000000000..3b046106c5b --- /dev/null +++ b/Mage.Sets/src/mage/sets/innistrad/Lumberknot.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.innistrad; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.MageInt; +import mage.abilities.common.CreatureDiesTriggeredAbility; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.abilities.keyword.HexproofAbility; +import mage.cards.CardImpl; +import mage.counters.CounterType; + +/** + * + * @author North + */ +public class Lumberknot extends CardImpl { + + public Lumberknot(UUID ownerId) { + super(ownerId, 191, "Lumberknot", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{2}{G}{G}"); + this.expansionSetCode = "ISD"; + this.subtype.add("Treefolk"); + + this.color.setGreen(true); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + this.addAbility(new HexproofAbility()); + // Whenever a creature dies, put a +1/+1 counter on Lumberknot. + this.addAbility(new CreatureDiesTriggeredAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance()), false)); + } + + public Lumberknot(final Lumberknot card) { + super(card); + } + + @Override + public Lumberknot copy() { + return new Lumberknot(this); + } +} diff --git a/Mage.Sets/src/mage/sets/innistrad/ManorSkeleton.java b/Mage.Sets/src/mage/sets/innistrad/ManorSkeleton.java new file mode 100644 index 00000000000..a6f3bdfd4b3 --- /dev/null +++ b/Mage.Sets/src/mage/sets/innistrad/ManorSkeleton.java @@ -0,0 +1,69 @@ +/* + * 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.innistrad; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.Constants.Zone; +import mage.MageInt; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.RegenerateSourceEffect; +import mage.abilities.keyword.HasteAbility; +import mage.cards.CardImpl; + +/** + * + * @author North + */ +public class ManorSkeleton extends CardImpl { + + public ManorSkeleton(UUID ownerId) { + super(ownerId, 106, "Manor Skeleton", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{1}{B}"); + this.expansionSetCode = "ISD"; + this.subtype.add("Skeleton"); + + this.color.setBlack(true); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + this.addAbility(HasteAbility.getInstance()); + // {1}{B}: Regenerate Manor Skeleton. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new RegenerateSourceEffect(), new ManaCostsImpl("{1}{B}"))); + } + + public ManorSkeleton(final ManorSkeleton card) { + super(card); + } + + @Override + public ManorSkeleton copy() { + return new ManorSkeleton(this); + } +} diff --git a/Mage.Sets/src/mage/sets/innistrad/MurderOfCrows.java b/Mage.Sets/src/mage/sets/innistrad/MurderOfCrows.java new file mode 100644 index 00000000000..c95fa660b55 --- /dev/null +++ b/Mage.Sets/src/mage/sets/innistrad/MurderOfCrows.java @@ -0,0 +1,100 @@ +/* + * 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.innistrad; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Outcome; +import mage.Constants.Rarity; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.CreatureDiesTriggeredAbility; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.game.Game; +import mage.players.Player; + +/** + * + * @author North + */ +public class MurderOfCrows extends CardImpl { + + public MurderOfCrows(UUID ownerId) { + super(ownerId, 70, "Murder of Crows", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{3}{U}{U}"); + this.expansionSetCode = "ISD"; + this.subtype.add("Bird"); + + this.color.setBlue(true); + this.power = new MageInt(4); + this.toughness = new MageInt(4); + + this.addAbility(FlyingAbility.getInstance()); + // Whenever another creature dies, you may draw a card. If you do, discard a card. + this.addAbility(new CreatureDiesTriggeredAbility(new MurderOfCrowsEffect(), false, true)); + } + + public MurderOfCrows(final MurderOfCrows card) { + super(card); + } + + @Override + public MurderOfCrows copy() { + return new MurderOfCrows(this); + } +} + +class MurderOfCrowsEffect extends OneShotEffect { + + public MurderOfCrowsEffect() { + super(Outcome.DrawCard); + this.staticText = "you may draw a card. If you do, discard a card"; + } + + public MurderOfCrowsEffect(final MurderOfCrowsEffect effect) { + super(effect); + } + + @Override + public MurderOfCrowsEffect copy() { + return new MurderOfCrowsEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player player = game.getPlayer(source.getControllerId()); + if (player != null && player.chooseUse(Outcome.DrawCard, "Do you wish to draw a card? If you do, discard a card.", game)) { + if (player.drawCards(1, game) > 0) { + player.discard(1, source, game); + } + return true; + } + return false; + } +} diff --git a/Mage.Sets/src/mage/sets/innistrad/PitchburnDevils.java b/Mage.Sets/src/mage/sets/innistrad/PitchburnDevils.java new file mode 100644 index 00000000000..a338d61c555 --- /dev/null +++ b/Mage.Sets/src/mage/sets/innistrad/PitchburnDevils.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.innistrad; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.MageInt; +import mage.abilities.common.DiesTriggeredAbility; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.cards.CardImpl; +import mage.target.common.TargetCreatureOrPlayer; + +/** + * + * @author North + */ +public class PitchburnDevils extends CardImpl { + + public PitchburnDevils(UUID ownerId) { + super(ownerId, 156, "Pitchburn Devils", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{4}{R}"); + this.expansionSetCode = "ISD"; + this.subtype.add("Devil"); + + this.color.setRed(true); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // When Pitchburn Devils dies, it deals 3 damage to target creature or player. + DiesTriggeredAbility ability = new DiesTriggeredAbility(new DamageTargetEffect(3)); + ability.addTarget(new TargetCreatureOrPlayer()); + this.addAbility(ability); + } + + public PitchburnDevils(final PitchburnDevils card) { + super(card); + } + + @Override + public PitchburnDevils copy() { + return new PitchburnDevils(this); + } +} diff --git a/Mage.Sets/src/mage/sets/innistrad/RageThrower.java b/Mage.Sets/src/mage/sets/innistrad/RageThrower.java new file mode 100644 index 00000000000..881f864eb33 --- /dev/null +++ b/Mage.Sets/src/mage/sets/innistrad/RageThrower.java @@ -0,0 +1,69 @@ +/* + * 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.innistrad; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.MageInt; +import mage.abilities.common.CreatureDiesTriggeredAbility; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.cards.CardImpl; +import mage.target.TargetPlayer; + +/** + * + * @author North + */ +public class RageThrower extends CardImpl { + + public RageThrower(UUID ownerId) { + super(ownerId, 157, "Rage Thrower", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{5}{R}"); + this.expansionSetCode = "ISD"; + this.subtype.add("Human"); + this.subtype.add("Shaman"); + + this.color.setRed(true); + this.power = new MageInt(4); + this.toughness = new MageInt(2); + + // Whenever another creature dies, Rage Thrower deals 2 damage to target player. + CreatureDiesTriggeredAbility ability = new CreatureDiesTriggeredAbility(new DamageTargetEffect(2), false, true); + ability.addTarget(new TargetPlayer()); + this.addAbility(ability); + } + + public RageThrower(final RageThrower card) { + super(card); + } + + @Override + public RageThrower copy() { + return new RageThrower(this); + } +} diff --git a/Mage.Sets/src/mage/sets/innistrad/StromkirkPatrol.java b/Mage.Sets/src/mage/sets/innistrad/StromkirkPatrol.java new file mode 100644 index 00000000000..da2929ff7be --- /dev/null +++ b/Mage.Sets/src/mage/sets/innistrad/StromkirkPatrol.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.innistrad; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.MageInt; +import mage.abilities.common.DealsCombatDamageToAPlayerTriggeredAbility; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.cards.CardImpl; +import mage.counters.CounterType; + +/** + * + * @author North + */ +public class StromkirkPatrol extends CardImpl { + + public StromkirkPatrol(UUID ownerId) { + super(ownerId, 118, "Stromkirk Patrol", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{4}{B}"); + this.expansionSetCode = "ISD"; + this.subtype.add("Vampire"); + this.subtype.add("Soldier"); + + this.color.setBlack(true); + this.power = new MageInt(4); + this.toughness = new MageInt(3); + + // Whenever Stromkirk Patrol deals combat damage to a player, put a +1/+1 counter on it. + this.addAbility(new DealsCombatDamageToAPlayerTriggeredAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance()), false)); + } + + public StromkirkPatrol(final StromkirkPatrol card) { + super(card); + } + + @Override + public StromkirkPatrol copy() { + return new StromkirkPatrol(this); + } +} diff --git a/Mage.Sets/src/mage/sets/innistrad/TraitorousBlood.java b/Mage.Sets/src/mage/sets/innistrad/TraitorousBlood.java new file mode 100644 index 00000000000..61e1fc0716d --- /dev/null +++ b/Mage.Sets/src/mage/sets/innistrad/TraitorousBlood.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.innistrad; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Duration; +import mage.Constants.Rarity; +import mage.abilities.effects.common.UntapTargetEffect; +import mage.abilities.effects.common.continious.GainAbilityTargetEffect; +import mage.abilities.effects.common.continious.GainControlTargetEffect; +import mage.abilities.keyword.HasteAbility; +import mage.abilities.keyword.TrampleAbility; +import mage.cards.CardImpl; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author North + */ +public class TraitorousBlood extends CardImpl { + + public TraitorousBlood(UUID ownerId) { + super(ownerId, 166, "Traitorous Blood", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{1}{R}{R}"); + this.expansionSetCode = "ISD"; + + this.color.setRed(true); + + // Gain control of target creature until end of turn. Untap it. It gains trample and haste until end of turn. + this.getSpellAbility().addTarget(new TargetCreaturePermanent()); + this.getSpellAbility().addEffect(new GainControlTargetEffect(Duration.EndOfTurn)); + this.getSpellAbility().addEffect(new UntapTargetEffect()); + this.getSpellAbility().addEffect(new GainAbilityTargetEffect(TrampleAbility.getInstance(), Duration.EndOfTurn)); + this.getSpellAbility().addEffect(new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.EndOfTurn)); + } + + public TraitorousBlood(final TraitorousBlood card) { + super(card); + } + + @Override + public TraitorousBlood copy() { + return new TraitorousBlood(this); + } +} diff --git a/Mage.Sets/src/mage/sets/innistrad/TributeToHunger.java b/Mage.Sets/src/mage/sets/innistrad/TributeToHunger.java new file mode 100644 index 00000000000..fb3a3bcd71f --- /dev/null +++ b/Mage.Sets/src/mage/sets/innistrad/TributeToHunger.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.innistrad; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Outcome; +import mage.Constants.Rarity; +import mage.Constants.TargetController; +import mage.abilities.Ability; +import mage.abilities.effects.OneShotEffect; +import mage.cards.CardImpl; +import mage.filter.common.FilterControlledPermanent; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; +import mage.target.common.TargetControlledPermanent; +import mage.target.common.TargetOpponent; + +/** + * + * @author North + */ +public class TributeToHunger extends CardImpl { + + public TributeToHunger(UUID ownerId) { + super(ownerId, 119, "Tribute to Hunger", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{2}{B}"); + this.expansionSetCode = "ISD"; + + this.color.setBlack(true); + + // Target opponent sacrifices a creature. You gain life equal to that creature's toughness. + this.getSpellAbility().addTarget(new TargetOpponent()); + this.getSpellAbility().addEffect(new TributeToHungerEffect()); + } + + public TributeToHunger(final TributeToHunger card) { + super(card); + } + + @Override + public TributeToHunger copy() { + return new TributeToHunger(this); + } +} + +class TributeToHungerEffect extends OneShotEffect { + + TributeToHungerEffect() { + super(Outcome.Sacrifice); + staticText = "Target opponent sacrifices a creature. You gain life equal to that creature's toughness"; + } + + TributeToHungerEffect(TributeToHungerEffect effect) { + super(effect); + } + + @Override + public TributeToHungerEffect copy() { + return new TributeToHungerEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player player = game.getPlayer(source.getTargets().getFirstTarget()); + Player controller = game.getPlayer(source.getControllerId()); + + FilterControlledPermanent filter = new FilterControlledPermanent("creature"); + filter.getCardType().add(CardType.CREATURE); + filter.setTargetController(TargetController.YOU); + TargetControlledPermanent target = new TargetControlledPermanent(1, 1, filter, false); + + if (target.canChoose(player.getId(), game)) { + player.choose(Outcome.Sacrifice, target, game); + + Permanent permanent = game.getPermanent(target.getFirstTarget()); + if (permanent != null) { + controller.gainLife(permanent.getToughness().getValue(), game); + return permanent.sacrifice(source.getId(), game); + } + return true; + } + return false; + } +} diff --git a/Mage.Sets/src/mage/sets/lorwyn/GlimmerdustNap.java b/Mage.Sets/src/mage/sets/lorwyn/GlimmerdustNap.java new file mode 100644 index 00000000000..8e231239b79 --- /dev/null +++ b/Mage.Sets/src/mage/sets/lorwyn/GlimmerdustNap.java @@ -0,0 +1,80 @@ +/* + * 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.Constants.CardType; +import mage.Constants.Outcome; +import mage.Constants.Rarity; +import mage.Constants.Zone; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.AttachEffect; +import mage.abilities.effects.common.SkipEnchantedUntapEffect; +import mage.abilities.keyword.EnchantAbility; +import mage.cards.CardImpl; +import mage.filter.common.FilterCreaturePermanent; +import mage.target.TargetPermanent; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author North + */ +public class GlimmerdustNap extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("tapped creature"); + + static { + filter.setTapped(true); + } + + public GlimmerdustNap(UUID ownerId) { + super(ownerId, 68, "Glimmerdust Nap", Rarity.COMMON, new CardType[]{CardType.ENCHANTMENT}, "{2}{U}"); + this.expansionSetCode = "LRW"; + this.subtype.add("Aura"); + + this.color.setBlue(true); + + // Enchant tapped creature + TargetPermanent auraTarget = new TargetCreaturePermanent(filter); + this.getSpellAbility().addTarget(auraTarget); + this.getSpellAbility().addEffect(new AttachEffect(Outcome.Detriment)); + this.addAbility(new EnchantAbility(auraTarget.getTargetName())); + // Enchanted creature doesn't untap during its controller's untap step. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new SkipEnchantedUntapEffect())); + } + + public GlimmerdustNap(final GlimmerdustNap card) { + super(card); + } + + @Override + public GlimmerdustNap copy() { + return new GlimmerdustNap(this); + } +} diff --git a/Mage.Sets/src/mage/sets/magic2010/EntanglingVines.java b/Mage.Sets/src/mage/sets/magic2010/EntanglingVines.java new file mode 100644 index 00000000000..39d494bcfc9 --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2010/EntanglingVines.java @@ -0,0 +1,80 @@ +/* + * 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.magic2010; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Outcome; +import mage.Constants.Rarity; +import mage.Constants.Zone; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.AttachEffect; +import mage.abilities.effects.common.SkipEnchantedUntapEffect; +import mage.abilities.keyword.EnchantAbility; +import mage.cards.CardImpl; +import mage.filter.common.FilterCreaturePermanent; +import mage.target.TargetPermanent; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author North + */ +public class EntanglingVines extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("tapped creature"); + + static { + filter.setTapped(true); + } + + public EntanglingVines(UUID ownerId) { + super(ownerId, 181, "Entangling Vines", Rarity.COMMON, new CardType[]{CardType.ENCHANTMENT}, "{3}{G}"); + this.expansionSetCode = "M10"; + this.subtype.add("Aura"); + + this.color.setGreen(true); + + // Enchant tapped creature + TargetPermanent auraTarget = new TargetCreaturePermanent(filter); + this.getSpellAbility().addTarget(auraTarget); + this.getSpellAbility().addEffect(new AttachEffect(Outcome.Detriment)); + this.addAbility(new EnchantAbility(auraTarget.getTargetName())); + // Enchanted creature doesn't untap during its controller's untap step. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new SkipEnchantedUntapEffect())); + } + + public EntanglingVines(final EntanglingVines card) { + super(card); + } + + @Override + public EntanglingVines copy() { + return new EntanglingVines(this); + } +} diff --git a/Mage.Sets/src/mage/sets/planechase/RockslideElemental.java b/Mage.Sets/src/mage/sets/planechase/RockslideElemental.java new file mode 100644 index 00000000000..6160be79823 --- /dev/null +++ b/Mage.Sets/src/mage/sets/planechase/RockslideElemental.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.planechase; + +import java.util.UUID; + +/** + * + * @author North + */ +public class RockslideElemental extends mage.sets.shardsofalara.RockslideElemental { + + public RockslideElemental(UUID ownerId) { + super(ownerId); + this.cardNumber = 63; + this.expansionSetCode = "HOP"; + } + + public RockslideElemental(final RockslideElemental card) { + super(card); + } + + @Override + public RockslideElemental copy() { + return new RockslideElemental(this); + } +} diff --git a/Mage.Sets/src/mage/sets/riseoftheeldrazi/ConsumingVapors.java b/Mage.Sets/src/mage/sets/riseoftheeldrazi/ConsumingVapors.java index adb1d649e9d..b310b85a4e8 100644 --- a/Mage.Sets/src/mage/sets/riseoftheeldrazi/ConsumingVapors.java +++ b/Mage.Sets/src/mage/sets/riseoftheeldrazi/ConsumingVapors.java @@ -40,7 +40,6 @@ import mage.filter.common.FilterControlledPermanent; import mage.game.Game; import mage.game.permanent.Permanent; import mage.players.Player; -import mage.target.TargetPermanent; import mage.target.TargetPlayer; import mage.target.common.TargetControlledPermanent; @@ -74,14 +73,6 @@ public class ConsumingVapors extends CardImpl { class ConsumingVaporsEffect extends OneShotEffect { - protected static final FilterControlledPermanent filter; - - static { - filter = new FilterControlledPermanent(); - filter.getCardType().add(CardType.CREATURE); - filter.setMessage(" a creature"); - } - ConsumingVaporsEffect ( ) { super(Outcome.Sacrifice); staticText = "Target player sacrifices a creature. You gain life equal to that creature's toughness"; @@ -95,22 +86,23 @@ class ConsumingVaporsEffect extends OneShotEffect { public boolean apply(Game game, Ability source) { Player player = game.getPlayer(source.getTargets().getFirstTarget()); Player controller = game.getPlayer(source.getControllerId()); + + FilterControlledPermanent filter = new FilterControlledPermanent("creature"); + filter.getCardType().add(CardType.CREATURE); filter.setTargetController(TargetController.YOU); TargetControlledPermanent target = new TargetControlledPermanent(1, 1, filter, false); //A spell or ability could have removed the only legal target this player //had, if thats the case this ability should fizzle. if (target.canChoose(player.getId(), game)) { - while (!target.isChosen()) { - player.choose(Outcome.Sacrifice, target, game); - } + player.choose(Outcome.Sacrifice, target, game); Permanent permanent = game.getPermanent(target.getFirstTarget()); - if ( permanent != null ) { controller.gainLife(permanent.getToughness().getValue(), game); return permanent.sacrifice(source.getId(), game); } + return true; } return false; } diff --git a/Mage.Sets/src/mage/sets/shardsofalara/AlgaeGharial.java b/Mage.Sets/src/mage/sets/shardsofalara/AlgaeGharial.java new file mode 100644 index 00000000000..91e12daecfe --- /dev/null +++ b/Mage.Sets/src/mage/sets/shardsofalara/AlgaeGharial.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.shardsofalara; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.MageInt; +import mage.abilities.common.CreatureDiesTriggeredAbility; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.abilities.keyword.ShroudAbility; +import mage.cards.CardImpl; +import mage.counters.CounterType; + +/** + * + * @author North + */ +public class AlgaeGharial extends CardImpl { + + public AlgaeGharial(UUID ownerId) { + super(ownerId, 123, "Algae Gharial", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{3}{G}"); + this.expansionSetCode = "ALA"; + this.subtype.add("Crocodile"); + + this.color.setGreen(true); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + this.addAbility(ShroudAbility.getInstance()); + // Whenever another creature dies, you may put a +1/+1 counter on Algae Gharial. + this.addAbility(new CreatureDiesTriggeredAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance()), true, true)); + } + + public AlgaeGharial(final AlgaeGharial card) { + super(card); + } + + @Override + public AlgaeGharial copy() { + return new AlgaeGharial(this); + } +} diff --git a/Mage.Sets/src/mage/sets/shardsofalara/Deathgreeter.java b/Mage.Sets/src/mage/sets/shardsofalara/Deathgreeter.java new file mode 100644 index 00000000000..0ef873a6ec1 --- /dev/null +++ b/Mage.Sets/src/mage/sets/shardsofalara/Deathgreeter.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.shardsofalara; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.MageInt; +import mage.abilities.common.CreatureDiesTriggeredAbility; +import mage.abilities.effects.common.GainLifeEffect; +import mage.cards.CardImpl; + +/** + * + * @author North + */ +public class Deathgreeter extends CardImpl { + + public Deathgreeter(UUID ownerId) { + super(ownerId, 71, "Deathgreeter", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{B}"); + this.expansionSetCode = "ALA"; + this.subtype.add("Human"); + this.subtype.add("Shaman"); + + this.color.setBlack(true); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // Whenever another creature dies, you may gain 1 life. + this.addAbility(new CreatureDiesTriggeredAbility(new GainLifeEffect(1), true, true)); + } + + public Deathgreeter(final Deathgreeter card) { + super(card); + } + + @Override + public Deathgreeter copy() { + return new Deathgreeter(this); + } +} diff --git a/Mage.Sets/src/mage/sets/shardsofalara/HissingIguanar.java b/Mage.Sets/src/mage/sets/shardsofalara/HissingIguanar.java new file mode 100644 index 00000000000..d0f9a1c7463 --- /dev/null +++ b/Mage.Sets/src/mage/sets/shardsofalara/HissingIguanar.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.shardsofalara; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.MageInt; +import mage.abilities.common.CreatureDiesTriggeredAbility; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.cards.CardImpl; +import mage.target.TargetPlayer; + +/** + * + * @author North + */ +public class HissingIguanar extends CardImpl { + + public HissingIguanar(UUID ownerId) { + super(ownerId, 104, "Hissing Iguanar", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{2}{R}"); + this.expansionSetCode = "ALA"; + this.subtype.add("Lizard"); + + this.color.setRed(true); + this.power = new MageInt(3); + this.toughness = new MageInt(1); + + // Whenever another creature dies, you may have Hissing Iguanar deal 1 damage to target player. + CreatureDiesTriggeredAbility ability = new CreatureDiesTriggeredAbility(new DamageTargetEffect(1), true, true); + ability.addTarget(new TargetPlayer()); + this.addAbility(ability); + } + + public HissingIguanar(final HissingIguanar card) { + super(card); + } + + @Override + public HissingIguanar copy() { + return new HissingIguanar(this); + } +} diff --git a/Mage.Sets/src/mage/sets/shardsofalara/RockslideElemental.java b/Mage.Sets/src/mage/sets/shardsofalara/RockslideElemental.java new file mode 100644 index 00000000000..9ec5564a31b --- /dev/null +++ b/Mage.Sets/src/mage/sets/shardsofalara/RockslideElemental.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.shardsofalara; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.MageInt; +import mage.abilities.common.CreatureDiesTriggeredAbility; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.abilities.keyword.FirstStrikeAbility; +import mage.cards.CardImpl; +import mage.counters.CounterType; + +/** + * + * @author North + */ +public class RockslideElemental extends CardImpl { + + public RockslideElemental(UUID ownerId) { + super(ownerId, 112, "Rockslide Elemental", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{2}{R}"); + this.expansionSetCode = "ALA"; + this.subtype.add("Elemental"); + + this.color.setRed(true); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + this.addAbility(FirstStrikeAbility.getInstance()); + // Whenever another creature dies, you may put a +1/+1 counter on Rockslide Elemental. + this.addAbility(new CreatureDiesTriggeredAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance()), true, true)); + } + + public RockslideElemental(final RockslideElemental card) { + super(card); + } + + @Override + public RockslideElemental copy() { + return new RockslideElemental(this); + } +} diff --git a/Mage.Sets/src/mage/sets/shardsofalara/ScavengerDrake.java b/Mage.Sets/src/mage/sets/shardsofalara/ScavengerDrake.java new file mode 100644 index 00000000000..a506b42f59b --- /dev/null +++ b/Mage.Sets/src/mage/sets/shardsofalara/ScavengerDrake.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.shardsofalara; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.MageInt; +import mage.abilities.common.CreatureDiesTriggeredAbility; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.counters.CounterType; + +/** + * + * @author North + */ +public class ScavengerDrake extends CardImpl { + + public ScavengerDrake(UUID ownerId) { + super(ownerId, 85, "Scavenger Drake", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{3}{B}"); + this.expansionSetCode = "ALA"; + this.subtype.add("Drake"); + + this.color.setBlack(true); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + this.addAbility(FlyingAbility.getInstance()); + // Whenever another creature dies, you may put a +1/+1 counter on Scavenger Drake. + this.addAbility(new CreatureDiesTriggeredAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance()), true, true)); + } + + public ScavengerDrake(final ScavengerDrake card) { + super(card); + } + + @Override + public ScavengerDrake copy() { + return new ScavengerDrake(this); + } +} diff --git a/Mage.Sets/src/mage/sets/tenth/Dehydration.java b/Mage.Sets/src/mage/sets/tenth/Dehydration.java new file mode 100644 index 00000000000..ed68f787c2c --- /dev/null +++ b/Mage.Sets/src/mage/sets/tenth/Dehydration.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.tenth; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Outcome; +import mage.Constants.Rarity; +import mage.Constants.Zone; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.AttachEffect; +import mage.abilities.effects.common.SkipEnchantedUntapEffect; +import mage.abilities.keyword.EnchantAbility; +import mage.cards.CardImpl; +import mage.target.TargetPermanent; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author North + */ +public class Dehydration extends CardImpl { + + public Dehydration(UUID ownerId) { + super(ownerId, 78, "Dehydration", Rarity.COMMON, new CardType[]{CardType.ENCHANTMENT}, "{3}{U}"); + this.expansionSetCode = "10E"; + this.subtype.add("Aura"); + + this.color.setBlue(true); + + // Enchant creature + TargetPermanent auraTarget = new TargetCreaturePermanent(); + this.getSpellAbility().addTarget(auraTarget); + this.getSpellAbility().addEffect(new AttachEffect(Outcome.Detriment)); + this.addAbility(new EnchantAbility(auraTarget.getTargetName())); + // Enchanted creature doesn't untap during its controller's untap step. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new SkipEnchantedUntapEffect())); + } + + public Dehydration(final Dehydration card) { + super(card); + } + + @Override + public Dehydration copy() { + return new Dehydration(this); + } +} diff --git a/Mage.Sets/src/mage/sets/zendikar/ParalyzingGrasp.java b/Mage.Sets/src/mage/sets/zendikar/ParalyzingGrasp.java index ee58be23350..643be877ef4 100644 --- a/Mage.Sets/src/mage/sets/zendikar/ParalyzingGrasp.java +++ b/Mage.Sets/src/mage/sets/zendikar/ParalyzingGrasp.java @@ -31,6 +31,8 @@ import java.util.UUID; import mage.Constants.CardType; import mage.Constants.Outcome; import mage.Constants.Rarity; +import mage.Constants.Zone; +import mage.abilities.common.SimpleStaticAbility; import mage.abilities.effects.common.AttachEffect; import mage.abilities.effects.common.SkipEnchantedUntapEffect; import mage.abilities.keyword.EnchantAbility; @@ -51,12 +53,13 @@ public class ParalyzingGrasp extends CardImpl { this.color.setBlue(true); + // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); this.getSpellAbility().addTarget(auraTarget); this.getSpellAbility().addEffect(new AttachEffect(Outcome.Detriment)); - EnchantAbility ability = new EnchantAbility(auraTarget.getTargetName()); - ability.addEffect(new SkipEnchantedUntapEffect()); - this.addAbility(ability); + this.addAbility(new EnchantAbility(auraTarget.getTargetName())); + // Enchanted creature doesn't untap during its controller's untap step. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new SkipEnchantedUntapEffect())); } public ParalyzingGrasp(final ParalyzingGrasp card) { diff --git a/Mage/src/mage/abilities/common/CreatureDiesTriggeredAbility.java b/Mage/src/mage/abilities/common/CreatureDiesTriggeredAbility.java new file mode 100644 index 00000000000..c0e6600dd95 --- /dev/null +++ b/Mage/src/mage/abilities/common/CreatureDiesTriggeredAbility.java @@ -0,0 +1,85 @@ +/* + * Copyright 2011 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.abilities.common; + +import mage.Constants.CardType; +import mage.Constants.Zone; +import mage.abilities.TriggeredAbilityImpl; +import mage.abilities.effects.Effect; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.game.events.ZoneChangeEvent; +import mage.game.permanent.Permanent; + +/** + * + * @author North + */ +public class CreatureDiesTriggeredAbility extends TriggeredAbilityImpl { + + protected boolean another; + + public CreatureDiesTriggeredAbility(Effect effect, boolean optional) { + this(effect, optional, false); + } + + public CreatureDiesTriggeredAbility(Effect effect, boolean optional, boolean another) { + super(Zone.BATTLEFIELD, effect, optional); + this.another = another; + } + + public CreatureDiesTriggeredAbility(final CreatureDiesTriggeredAbility ability) { + super(ability); + this.another = ability.another; + } + + @Override + public CreatureDiesTriggeredAbility copy() { + return new CreatureDiesTriggeredAbility(this); + } + + @Override + public boolean checkTrigger(GameEvent event, Game game) { + if (event.getType() == GameEvent.EventType.ZONE_CHANGE) { + ZoneChangeEvent zEvent = (ZoneChangeEvent) event; + if (zEvent.getFromZone() == Zone.BATTLEFIELD && zEvent.getToZone() == Zone.GRAVEYARD) { + Permanent permanent = (Permanent) game.getLastKnownInformation(event.getTargetId(), Zone.BATTLEFIELD); + if (permanent != null && permanent.getCardType().contains(CardType.CREATURE) + && (!another || !permanent.getId().equals(this.getSourceId()))) { + return true; + } + } + } + return false; + } + + @Override + public String getRule() { + return "Whenever " + (another ? "another" : "a") + " creature dies, " + super.getRule(); + } +} diff --git a/Mage/src/mage/players/Library.java b/Mage/src/mage/players/Library.java index 985741af093..52dc0a11994 100644 --- a/Mage/src/mage/players/Library.java +++ b/Mage/src/mage/players/Library.java @@ -98,6 +98,22 @@ public class Library implements Serializable { return card; } + /** + * Removes the bottom card of the Library and returns it + * + * @param game + * @return Card + * @see Card + */ + public Card removeFromBottom(Game game) { + UUID cardId = library.pollLast(); + Card card = game.getCard(cardId); + if (card == null) { + emptyDraw = true; + } + return card; + } + /** * Returns the top card of the Library without removing it *