From d844c6056a4fbc4d8310a1940490375eebdc97c4 Mon Sep 17 00:00:00 2001 From: fireshoes Date: Wed, 29 Jun 2016 10:01:00 -0500 Subject: [PATCH] [EMN] Added 6/29 spoilers to mtg-cards-data.txt. Implemented several cards (will be testing with the clearImage fix in). --- .../sets/eldritchmoon/AssembledAlphas.java | 70 +++++++++ .../sets/eldritchmoon/DocentOfPerfection.java | 148 ++++++++++++++++++ .../sets/eldritchmoon/EmrakulsInfluence.java | 70 +++++++++ .../sets/eldritchmoon/FinalIteration.java | 103 ++++++++++++ .../eldritchmoon/GalvanicBombardment.java | 113 +++++++++++++ .../sets/eldritchmoon/GrislyAnglerfish.java | 109 +++++++++++++ .../sets/eldritchmoon/GrizzledAngler.java | 112 +++++++++++++ .../mage/sets/eldritchmoon/NiblisOfFrost.java | 93 +++++++++++ .../mage/sets/eldritchmoon/NoosegrafMob.java | 107 +++++++++++++ .../sets/eldritchmoon/SanctifierOfSouls.java | 89 +++++++++++ .../mage/sets/eldritchmoon/TakeInventory.java | 71 +++++++++ .../sets/eldritchmoon/UlvenwaldObserver.java | 75 +++++++++ .../sets/eldritchmoon/Unsubstantiate.java | 68 ++++++++ .../sets/ravnica/WoodwraithStrangler.java | 69 ++++++++ Mage.Sets/src/mage/sets/tempest/Kindle.java | 2 +- .../game/permanent/token/ZombieToken.java | 2 +- Utils/mtg-cards-data.txt | 4 +- 17 files changed, 1302 insertions(+), 3 deletions(-) create mode 100644 Mage.Sets/src/mage/sets/eldritchmoon/AssembledAlphas.java create mode 100644 Mage.Sets/src/mage/sets/eldritchmoon/DocentOfPerfection.java create mode 100644 Mage.Sets/src/mage/sets/eldritchmoon/EmrakulsInfluence.java create mode 100644 Mage.Sets/src/mage/sets/eldritchmoon/FinalIteration.java create mode 100644 Mage.Sets/src/mage/sets/eldritchmoon/GalvanicBombardment.java create mode 100644 Mage.Sets/src/mage/sets/eldritchmoon/GrislyAnglerfish.java create mode 100644 Mage.Sets/src/mage/sets/eldritchmoon/GrizzledAngler.java create mode 100644 Mage.Sets/src/mage/sets/eldritchmoon/NiblisOfFrost.java create mode 100644 Mage.Sets/src/mage/sets/eldritchmoon/NoosegrafMob.java create mode 100644 Mage.Sets/src/mage/sets/eldritchmoon/SanctifierOfSouls.java create mode 100644 Mage.Sets/src/mage/sets/eldritchmoon/TakeInventory.java create mode 100644 Mage.Sets/src/mage/sets/eldritchmoon/UlvenwaldObserver.java create mode 100644 Mage.Sets/src/mage/sets/eldritchmoon/Unsubstantiate.java create mode 100644 Mage.Sets/src/mage/sets/ravnica/WoodwraithStrangler.java diff --git a/Mage.Sets/src/mage/sets/eldritchmoon/AssembledAlphas.java b/Mage.Sets/src/mage/sets/eldritchmoon/AssembledAlphas.java new file mode 100644 index 00000000000..800b22767d7 --- /dev/null +++ b/Mage.Sets/src/mage/sets/eldritchmoon/AssembledAlphas.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.eldritchmoon; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.BlocksOrBecomesBlockedByCreatureTriggeredAbility; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.DamageTargetControllerEffect; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; + +/** + * + * @author fireshoes + */ +public class AssembledAlphas extends CardImpl { + + public AssembledAlphas(UUID ownerId) { + super(ownerId, 117, "Assembled Alphas", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{5}{R}"); + this.expansionSetCode = "EMN"; + this.subtype.add("Wolf"); + this.power = new MageInt(5); + this.toughness = new MageInt(5); + + // Whenever Assembled Alphas blocks or becomes blocked by a creature, Assembled Alphas deals 3 damage to that creature and 3 damage to that creature's controller. + Ability ability = new BlocksOrBecomesBlockedByCreatureTriggeredAbility(new DamageTargetEffect(3, true, "that creature"), false); + Effect effect = new DamageTargetControllerEffect(2); + effect.setText("and 3 damage to that creature's controller"); + ability.addEffect(effect); + this.addAbility(ability); + } + + public AssembledAlphas(final AssembledAlphas card) { + super(card); + } + + @Override + public AssembledAlphas copy() { + return new AssembledAlphas(this); + } +} diff --git a/Mage.Sets/src/mage/sets/eldritchmoon/DocentOfPerfection.java b/Mage.Sets/src/mage/sets/eldritchmoon/DocentOfPerfection.java new file mode 100644 index 00000000000..16c1105c243 --- /dev/null +++ b/Mage.Sets/src/mage/sets/eldritchmoon/DocentOfPerfection.java @@ -0,0 +1,148 @@ +/* + * 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.eldritchmoon; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SpellCastControllerTriggeredAbility; +import mage.abilities.effects.Effect; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.effects.common.TransformSourceEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.abilities.keyword.TransformAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.TargetController; +import mage.filter.FilterPermanent; +import mage.filter.FilterSpell; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.CardTypePredicate; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.filter.predicate.permanent.ControllerPredicate; +import mage.game.Game; +import mage.game.permanent.token.Token; +import mage.players.Player; + +/** + * + * @author fireshoes + */ +public class DocentOfPerfection extends CardImpl { + + private static final FilterSpell filterSpell = new FilterSpell("instant or sorcery spell"); + + static { + filterSpell.add(Predicates.or( + new CardTypePredicate(CardType.INSTANT), + new CardTypePredicate(CardType.SORCERY))); + } + + public DocentOfPerfection(UUID ownerId) { + super(ownerId, 56, "Docent of Perfection", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{3}{U}{U}"); + this.expansionSetCode = "EMN"; + this.subtype.add("Insect"); + this.subtype.add("Horror"); + this.power = new MageInt(5); + this.toughness = new MageInt(4); + + this.canTransform = true; + this.secondSideCard = new FinalIteration(ownerId); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + + // Whenever you cast an instant or sorcery spell, put a 1/1 blue Human Wizard creature token onto the battlefield. + // Then if you control three or more Wizards, transform Docent of Perfection. + this.addAbility(new TransformAbility()); + Effect effect = new DocentOfPerfectionEffect(); + Ability ability = new SpellCastControllerTriggeredAbility(new CreateTokenEffect(new HumanWizardToken()), filterSpell, false); + ability.addEffect(effect); + this.addAbility(ability); + } + + public DocentOfPerfection(final DocentOfPerfection card) { + super(card); + } + + @Override + public DocentOfPerfection copy() { + return new DocentOfPerfection(this); + } +} + +class DocentOfPerfectionEffect extends OneShotEffect { + + private static final FilterPermanent filter = new FilterPermanent("Wizards"); + + static { + filter.add(new SubtypePredicate("Wizards")); + filter.add(new ControllerPredicate(TargetController.YOU)); + } + + public DocentOfPerfectionEffect() { + super(Outcome.Benefit); + staticText = "Then if you control three or more Wizards, transform {this}"; + } + + public DocentOfPerfectionEffect(final DocentOfPerfectionEffect effect) { + super(effect); + } + + @Override + public DocentOfPerfectionEffect copy() { + return new DocentOfPerfectionEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null) { + if (game.getBattlefield().count(filter, source.getSourceId(), source.getControllerId(), game) >= 3) { + return new TransformSourceEffect(true).apply(game, source); + } + } + return false; + } +} + +class HumanWizardToken extends Token { + + public HumanWizardToken() { + super("Human Wizard", "1/1 blue Human Wizard creature token"); + cardType.add(CardType.CREATURE); + subtype.add("Human"); + subtype.add("Wizard"); + color.setBlue(true); + power = new MageInt(1); + toughness = new MageInt(1); + } +} diff --git a/Mage.Sets/src/mage/sets/eldritchmoon/EmrakulsInfluence.java b/Mage.Sets/src/mage/sets/eldritchmoon/EmrakulsInfluence.java new file mode 100644 index 00000000000..3cb97fa6d34 --- /dev/null +++ b/Mage.Sets/src/mage/sets/eldritchmoon/EmrakulsInfluence.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.eldritchmoon; + +import java.util.UUID; +import mage.abilities.common.SpellCastControllerTriggeredAbility; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.Filter; +import mage.filter.FilterSpell; +import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; +import mage.filter.predicate.mageobject.SubtypePredicate; + +/** + * + * @author fireshoes + */ +public class EmrakulsInfluence extends CardImpl { + + private static final FilterSpell filterSpell = new FilterSpell("Eldrazi creature spell with converted mana cost 7 or greater"); + + static { + filterSpell.add(new SubtypePredicate("Eldrazi")); + filterSpell.add(new ConvertedManaCostPredicate(Filter.ComparisonType.GreaterThan, 6)); + } + + public EmrakulsInfluence(UUID ownerId) { + super(ownerId, 157, "Emrakul's Influence", Rarity.UNCOMMON, new CardType[]{CardType.ENCHANTMENT}, "{2}{G}{G}"); + this.expansionSetCode = "EMN"; + + // Whenever you cast an Eldrazi creature spell with converted mana cost 7 or greater, draw two cards. + this.addAbility(new SpellCastControllerTriggeredAbility(new DrawCardSourceControllerEffect(2), filterSpell, false)); + } + + public EmrakulsInfluence(final EmrakulsInfluence card) { + super(card); + } + + @Override + public EmrakulsInfluence copy() { + return new EmrakulsInfluence(this); + } +} diff --git a/Mage.Sets/src/mage/sets/eldritchmoon/FinalIteration.java b/Mage.Sets/src/mage/sets/eldritchmoon/FinalIteration.java new file mode 100644 index 00000000000..b08102f9dbf --- /dev/null +++ b/Mage.Sets/src/mage/sets/eldritchmoon/FinalIteration.java @@ -0,0 +1,103 @@ +/* + * 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.eldritchmoon; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.common.SpellCastControllerTriggeredAbility; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.effects.common.continuous.BoostControlledEffect; +import mage.abilities.effects.common.continuous.GainAbilityAllEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.TargetController; +import mage.constants.Zone; +import mage.filter.FilterSpell; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.CardTypePredicate; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.filter.predicate.permanent.ControllerPredicate; + +/** + * + * @author fireshoes + */ +public class FinalIteration extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Wizards"); + private static final FilterSpell filterSpell = new FilterSpell("instant or sorcery spell"); + + static { + filter.add(new SubtypePredicate("Wizard")); + filter.add(new ControllerPredicate(TargetController.YOU)); + filterSpell.add(Predicates.or( + new CardTypePredicate(CardType.INSTANT), + new CardTypePredicate(CardType.SORCERY))); + } + + public FinalIteration(UUID ownerId) { + super(ownerId, 56, "Final Iteration", Rarity.RARE, new CardType[]{CardType.CREATURE}, ""); + this.expansionSetCode = "EMN"; + this.subtype.add("Eldrazi"); + this.subtype.add("Insect"); + this.power = new MageInt(6); + this.toughness = new MageInt(5); + + // this card is the second face of double-faced card + this.nightCard = true; + + // Flying + this.addAbility(FlyingAbility.getInstance()); + + // Wizards you control get +2/+1 and have flying. + Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostControlledEffect(2, 1, Duration.WhileOnBattlefield, filter, true)); + Effect effect = new GainAbilityAllEffect(FlyingAbility.getInstance(), Duration.WhileOnBattlefield, filter, false); + effect.setText("and have flying"); + ability.addEffect(effect); + this.addAbility(ability); + + // Whenever you cast an instant or sorcery spell, put a 1/1 blue Human Wizard creature token onto the battlefield. + this.addAbility(new SpellCastControllerTriggeredAbility(new CreateTokenEffect(new HumanWizardToken()), filterSpell, false)); + } + + public FinalIteration(final FinalIteration card) { + super(card); + } + + @Override + public FinalIteration copy() { + return new FinalIteration(this); + } +} diff --git a/Mage.Sets/src/mage/sets/eldritchmoon/GalvanicBombardment.java b/Mage.Sets/src/mage/sets/eldritchmoon/GalvanicBombardment.java new file mode 100644 index 00000000000..d0d1039a383 --- /dev/null +++ b/Mage.Sets/src/mage/sets/eldritchmoon/GalvanicBombardment.java @@ -0,0 +1,113 @@ +/* + * 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.eldritchmoon; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.dynamicvalue.DynamicValue; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.FilterCard; +import mage.filter.predicate.mageobject.NamePredicate; +import mage.game.Game; +import mage.players.Player; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author fireshoes + */ +public class GalvanicBombardment extends CardImpl { + + private static final FilterCard filter = new FilterCard("2 plus the number of cards named Galvanic Bombardment"); + + static { + filter.add(new NamePredicate("Galvanic Bombardment")); + } + + public GalvanicBombardment(UUID ownerId) { + super(ownerId, 129, "Galvanic Bombardment", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{R}"); + this.expansionSetCode = "EMN"; + + // Galvanic Bombardment deals X damage to target creature, where X is 2 plus the number of cards named Galvanic Bombardment in your graveyard. + Effect effect = new DamageTargetEffect(new GalvanicBombardmentCardsInControllerGraveyardCount(filter)); + effect.setText("{this} deals X damage to target creature, where X is 2 plus the number of cards named {source} in your graveyard"); + this.getSpellAbility().addEffect(effect); + this.getSpellAbility().addTarget(new TargetCreaturePermanent()); + } + + public GalvanicBombardment(final GalvanicBombardment card) { + super(card); + } + + @Override + public GalvanicBombardment copy() { + return new GalvanicBombardment(this); + } +} + +class GalvanicBombardmentCardsInControllerGraveyardCount implements DynamicValue { + + private final FilterCard filter; + + public GalvanicBombardmentCardsInControllerGraveyardCount(FilterCard filter) { + this.filter = filter; + } + + private GalvanicBombardmentCardsInControllerGraveyardCount(GalvanicBombardmentCardsInControllerGraveyardCount dynamicValue) { + this.filter = dynamicValue.filter; + } + + @Override + public int calculate(Game game, Ability source, Effect effect) { + int amount = 0; + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null) { + amount += controller.getGraveyard().count(filter, source.getSourceId(), source.getControllerId(), game); + } + return amount + 2; + } + + @Override + public GalvanicBombardmentCardsInControllerGraveyardCount copy() { + return new GalvanicBombardmentCardsInControllerGraveyardCount(this); + } + + @Override + public String toString() { + return "1"; + } + + @Override + public String getMessage() { + return filter.getMessage() + " in your graveyard"; + } +} diff --git a/Mage.Sets/src/mage/sets/eldritchmoon/GrislyAnglerfish.java b/Mage.Sets/src/mage/sets/eldritchmoon/GrislyAnglerfish.java new file mode 100644 index 00000000000..bf7da3417c7 --- /dev/null +++ b/Mage.Sets/src/mage/sets/eldritchmoon/GrislyAnglerfish.java @@ -0,0 +1,109 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.eldritchmoon; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.RequirementEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.game.Game; +import mage.game.permanent.Permanent; + +/** + * + * @author fireshoes + */ +public class GrislyAnglerfish extends CardImpl { + + public GrislyAnglerfish(UUID ownerId) { + super(ownerId, 63, "Grisly Anglerfish", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, ""); + this.expansionSetCode = "EMN"; + this.subtype.add("Eldrazi"); + this.subtype.add("Fish"); + this.power = new MageInt(4); + this.toughness = new MageInt(5); + + // this card is the second face of double-faced card + this.nightCard = true; + + // {6}: Creatures your opponents control attack this turn if able. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new GrislyAnglerfishMustAttackEffect(), new ManaCostsImpl("{6}"))); + } + + public GrislyAnglerfish(final GrislyAnglerfish card) { + super(card); + } + + @Override + public GrislyAnglerfish copy() { + return new GrislyAnglerfish(this); + } +} + +class GrislyAnglerfishMustAttackEffect extends RequirementEffect { + + public GrislyAnglerfishMustAttackEffect() { + super(Duration.EndOfTurn); + staticText = "Creatures your opponents control attack this turn if able"; + } + + public GrislyAnglerfishMustAttackEffect(final GrislyAnglerfishMustAttackEffect effect) { + super(effect); + } + + @Override + public GrislyAnglerfishMustAttackEffect copy() { + return new GrislyAnglerfishMustAttackEffect(this); + } + + @Override + public boolean applies(Permanent permanent, Ability source, Game game) { + if (game.getOpponents(source.getControllerId()).contains(permanent.getControllerId())) { + return true; + } + return false; + } + + @Override + public boolean mustAttack(Game game) { + return true; + } + + @Override + public boolean mustBlock(Game game) { + return false; + } + +} diff --git a/Mage.Sets/src/mage/sets/eldritchmoon/GrizzledAngler.java b/Mage.Sets/src/mage/sets/eldritchmoon/GrizzledAngler.java new file mode 100644 index 00000000000..1b59133eefa --- /dev/null +++ b/Mage.Sets/src/mage/sets/eldritchmoon/GrizzledAngler.java @@ -0,0 +1,112 @@ +/* + * 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.eldritchmoon; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.TransformSourceEffect; +import mage.abilities.keyword.TransformAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.common.FilterCreatureCard; +import mage.filter.predicate.mageobject.ColorlessPredicate; +import mage.game.Game; +import mage.players.Player; + +/** + * + * @author fireshoes + */ +public class GrizzledAngler extends CardImpl { + + public GrizzledAngler(UUID ownerId) { + super(ownerId, 63, "Grizzled Angler", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{2}{U}"); + this.expansionSetCode = "EMN"; + this.subtype.add("Human"); + this.power = new MageInt(2); + this.toughness = new MageInt(3); + + this.canTransform = true; + this.secondSideCard = new GrislyAnglerfish(ownerId); + + // {T}: Put the top two cards of your library into your graveyard. Then if there is a colorless creature card in your graveyard, transform Grizzled Angler. + this.addAbility(new TransformAbility()); + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new GrizzledAnglerEffect(), new TapSourceCost())); + } + + public GrizzledAngler(final GrizzledAngler card) { + super(card); + } + + @Override + public GrizzledAngler copy() { + return new GrizzledAngler(this); + } +} + +class GrizzledAnglerEffect extends OneShotEffect { + + private static final FilterCreatureCard filter = new FilterCreatureCard("a colorless creature card in your graveyard"); + + static { + filter.add(new ColorlessPredicate()); + } + + public GrizzledAnglerEffect() { + super(Outcome.Benefit); + staticText = "Put the top two cards of your library into your graveyard. Then if there is a colorless creature card in your graveyard, transform {this}"; + } + + public GrizzledAnglerEffect(final GrizzledAnglerEffect effect) { + super(effect); + } + + @Override + public GrizzledAnglerEffect copy() { + return new GrizzledAnglerEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null) { + controller.moveCards(controller.getLibrary().getTopCards(game, 2), Zone.GRAVEYARD, source, game); + if (controller.getGraveyard().count(filter, source.getSourceId(), source.getControllerId(), game) >= 1) { + return new TransformSourceEffect(true).apply(game, source); + } + } + return false; + } +} diff --git a/Mage.Sets/src/mage/sets/eldritchmoon/NiblisOfFrost.java b/Mage.Sets/src/mage/sets/eldritchmoon/NiblisOfFrost.java new file mode 100644 index 00000000000..35a0c249796 --- /dev/null +++ b/Mage.Sets/src/mage/sets/eldritchmoon/NiblisOfFrost.java @@ -0,0 +1,93 @@ +/* + * 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.eldritchmoon; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SpellCastControllerTriggeredAbility; +import mage.abilities.effects.common.DontUntapInControllersNextUntapStepTargetEffect; +import mage.abilities.effects.common.TapTargetEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.abilities.keyword.ProwessAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.TargetController; +import mage.filter.FilterSpell; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.CardTypePredicate; +import mage.filter.predicate.permanent.ControllerPredicate; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author fireshoes + */ +public class NiblisOfFrost extends CardImpl { + + private static final FilterSpell filterSpell = new FilterSpell("instant or sorcery spell"); + private static final FilterCreaturePermanent filterCreature = new FilterCreaturePermanent("creature an opponent controls"); + + static { + filterCreature.add(new ControllerPredicate(TargetController.OPPONENT)); + filterSpell.add(Predicates.or( + new CardTypePredicate(CardType.INSTANT), + new CardTypePredicate(CardType.SORCERY))); + } + + public NiblisOfFrost(UUID ownerId) { + super(ownerId, 72, "Niblis of Frost", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{2}{U}{U}"); + this.expansionSetCode = "EMN"; + this.subtype.add("Spirit"); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + + // Prowess + this.addAbility(new ProwessAbility()); + + // Whenever you cast an instant or sorcery spell, tap target creature an opponent controls. That creature doesn't untap during its controller's next untap step. + Ability ability = new SpellCastControllerTriggeredAbility(new TapTargetEffect(), filterSpell, false); + ability.addTarget(new TargetCreaturePermanent(filterCreature)); + ability.addEffect(new DontUntapInControllersNextUntapStepTargetEffect("That creature")); + this.addAbility(ability); + } + + public NiblisOfFrost(final NiblisOfFrost card) { + super(card); + } + + @Override + public NiblisOfFrost copy() { + return new NiblisOfFrost(this); + } +} diff --git a/Mage.Sets/src/mage/sets/eldritchmoon/NoosegrafMob.java b/Mage.Sets/src/mage/sets/eldritchmoon/NoosegrafMob.java new file mode 100644 index 00000000000..d6ef211a933 --- /dev/null +++ b/Mage.Sets/src/mage/sets/eldritchmoon/NoosegrafMob.java @@ -0,0 +1,107 @@ +/* + * 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.eldritchmoon; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldAbility; +import mage.abilities.common.SpellCastAllTriggeredAbility; +import mage.abilities.effects.Effect; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.counters.CounterType; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.game.permanent.token.ZombieToken; +import mage.players.Player; + +/** + * + * @author fireshoes + */ +public class NoosegrafMob extends CardImpl { + + public NoosegrafMob(UUID ownerId) { + super(ownerId, 98, "Noosegraf Mob", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{4}{B}{B}"); + this.expansionSetCode = "EMN"; + this.subtype.add("Zombie"); + this.power = new MageInt(0); + this.toughness = new MageInt(0); + + // Noosegraf Mob enters the battlefield with five +1/+1 counters on it. + this.addAbility(new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance(5)), + "{this} enters the battlefield with five +1/+1 counters on it")); + + // Whenever a player casts a spell, remove a +1/+1 counter from Noosegraf Mob. If you do, put a 2/2 black Zombie creature token onto the battlefield. + this.addAbility(new SpellCastAllTriggeredAbility(new NoosegrafMobEffect(), false)); + } + + public NoosegrafMob(final NoosegrafMob card) { + super(card); + } + + @Override + public NoosegrafMob copy() { + return new NoosegrafMob(this); + } +} + +class NoosegrafMobEffect extends OneShotEffect { + + public NoosegrafMobEffect() { + super(Outcome.Benefit); + staticText = "remove a +1/+1 counter from Noosegraf Mob. If you do, put a 2/2 black Zombie creature token onto the battlefield"; + } + + public NoosegrafMobEffect(final NoosegrafMobEffect effect) { + super(effect); + } + + @Override + public NoosegrafMobEffect copy() { + return new NoosegrafMobEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Permanent permanent = game.getPermanent(source.getSourceId()); + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null && permanent != null && permanent.getCounters().getCount(CounterType.P1P1) > 0) { + permanent.removeCounters(CounterType.P1P1.createInstance(), game); + Effect effect = new CreateTokenEffect(new ZombieToken()); + return effect.apply(game, source); + } + return false; + } +} diff --git a/Mage.Sets/src/mage/sets/eldritchmoon/SanctifierOfSouls.java b/Mage.Sets/src/mage/sets/eldritchmoon/SanctifierOfSouls.java new file mode 100644 index 00000000000..f80c39a5cdc --- /dev/null +++ b/Mage.Sets/src/mage/sets/eldritchmoon/SanctifierOfSouls.java @@ -0,0 +1,89 @@ +/* + * 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.eldritchmoon; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.EntersBattlefieldControlledTriggeredAbility; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.ExileFromGraveCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.effects.common.continuous.BoostSourceEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.FilterPermanent; +import mage.filter.common.FilterCreatureCard; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.permanent.AnotherPredicate; +import mage.game.permanent.token.SpiritWhiteToken; +import mage.target.common.TargetCardInYourGraveyard; + +/** + * + * @author fireshoes + */ +public class SanctifierOfSouls extends CardImpl { + + private static final FilterPermanent filter = new FilterCreaturePermanent("another creature"); + + static { + filter.add(new AnotherPredicate()); + } + + public SanctifierOfSouls(UUID ownerId) { + super(ownerId, 39, "Sanctifier of Souls", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{3}{W}"); + this.expansionSetCode = "EMN"; + this.subtype.add("Human"); + this.subtype.add("Cleric"); + this.power = new MageInt(2); + this.toughness = new MageInt(3); + + // Whenever another creature enters the battlefield under your control, Sanctifier of Souls gets +1/+1 until end of turn. + this.addAbility(new EntersBattlefieldControlledTriggeredAbility(new BoostSourceEffect(1, 1, Duration.EndOfTurn), filter)); + + // {2}{W}, Exile a creature card from your graveyard: Put a 1/1 white Spirit creature token with flying onto the battlefield. + SimpleActivatedAbility ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, + new CreateTokenEffect(new SpiritWhiteToken()), + new ManaCostsImpl("{2}{W}")); + ability.addCost(new ExileFromGraveCost(new TargetCardInYourGraveyard(new FilterCreatureCard("a creature card from your graveyard")))); + this.addAbility(ability); + } + + public SanctifierOfSouls(final SanctifierOfSouls card) { + super(card); + } + + @Override + public SanctifierOfSouls copy() { + return new SanctifierOfSouls(this); + } +} diff --git a/Mage.Sets/src/mage/sets/eldritchmoon/TakeInventory.java b/Mage.Sets/src/mage/sets/eldritchmoon/TakeInventory.java new file mode 100644 index 00000000000..d685496e7bc --- /dev/null +++ b/Mage.Sets/src/mage/sets/eldritchmoon/TakeInventory.java @@ -0,0 +1,71 @@ +/* + * 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.eldritchmoon; + +import java.util.UUID; +import mage.abilities.dynamicvalue.common.CardsInControllerGraveyardCount; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.FilterCard; +import mage.filter.predicate.mageobject.NamePredicate; + +/** + * + * @author fireshoes + */ +public class TakeInventory extends CardImpl { + + private static final FilterCard filter = new FilterCard("card named Take Inventory"); + + static { + filter.add(new NamePredicate("Take Inventory")); + } + + public TakeInventory(UUID ownerId) { + super(ownerId, 76, "Take Inventory", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{1}{U}"); + this.expansionSetCode = "EMN"; + + // Draw a card, then draw cards equal to the number of cards named Take Inventory in your graveyard. + this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(1)); + Effect effect = new DrawCardSourceControllerEffect(new CardsInControllerGraveyardCount(filter)); + effect.setText(", then draw cards equal to the number of cards named {source} in your graveyard"); + this.getSpellAbility().addEffect(effect); + } + + public TakeInventory(final TakeInventory card) { + super(card); + } + + @Override + public TakeInventory copy() { + return new TakeInventory(this); + } +} diff --git a/Mage.Sets/src/mage/sets/eldritchmoon/UlvenwaldObserver.java b/Mage.Sets/src/mage/sets/eldritchmoon/UlvenwaldObserver.java new file mode 100644 index 00000000000..3561b27a358 --- /dev/null +++ b/Mage.Sets/src/mage/sets/eldritchmoon/UlvenwaldObserver.java @@ -0,0 +1,75 @@ +/* + * 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.eldritchmoon; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.DiesCreatureTriggeredAbility; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.TargetController; +import mage.filter.Filter; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.ToughnessPredicate; +import mage.filter.predicate.permanent.ControllerPredicate; + +/** + * + * @author fireshoes + */ +public class UlvenwaldObserver extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("a creature you control with toughness 4 or greater"); + + static { + filter.add(new ToughnessPredicate(Filter.ComparisonType.GreaterThan, 3)); + filter.add(new ControllerPredicate(TargetController.YOU)); + } + + public UlvenwaldObserver(UUID ownerId) { + super(ownerId, 176, "Ulvenwald Observer", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{4}{G}{G}"); + this.expansionSetCode = "EMN"; + this.subtype.add("Treefolk"); + this.power = new MageInt(6); + this.toughness = new MageInt(6); + + // Whenever a creature you control with toughness 4 or greater dies, draw a card. + this.addAbility(new DiesCreatureTriggeredAbility(new DrawCardSourceControllerEffect(1), false, filter)); + } + + public UlvenwaldObserver(final UlvenwaldObserver card) { + super(card); + } + + @Override + public UlvenwaldObserver copy() { + return new UlvenwaldObserver(this); + } +} diff --git a/Mage.Sets/src/mage/sets/eldritchmoon/Unsubstantiate.java b/Mage.Sets/src/mage/sets/eldritchmoon/Unsubstantiate.java new file mode 100644 index 00000000000..cbac64a430f --- /dev/null +++ b/Mage.Sets/src/mage/sets/eldritchmoon/Unsubstantiate.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.eldritchmoon; + +import java.util.UUID; +import mage.abilities.effects.common.ReturnToHandTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.common.FilterSpellOrPermanent; +import mage.target.common.TargetSpellOrPermanent; + +/** + * + * @author fireshoes + */ +public class Unsubstantiate extends CardImpl { + + private static final FilterSpellOrPermanent filter = new FilterSpellOrPermanent("spell or creature"); + + static { + filter.setPermanentFilter(new FilterCreaturePermanent()); + } + + public Unsubstantiate(UUID ownerId) { + super(ownerId, 79, "Unsubstantiate", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{1}{U}"); + this.expansionSetCode = "EMN"; + + // Return target spell or creature to its owner's hand. + this.getSpellAbility().addTarget(new TargetSpellOrPermanent(1, 1, filter, false)); + this.getSpellAbility().addEffect(new ReturnToHandTargetEffect()); + } + + public Unsubstantiate(final Unsubstantiate card) { + super(card); + } + + @Override + public Unsubstantiate copy() { + return new Unsubstantiate(this); + } +} diff --git a/Mage.Sets/src/mage/sets/ravnica/WoodwraithStrangler.java b/Mage.Sets/src/mage/sets/ravnica/WoodwraithStrangler.java new file mode 100644 index 00000000000..e19cac7d6f6 --- /dev/null +++ b/Mage.Sets/src/mage/sets/ravnica/WoodwraithStrangler.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.ravnica; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.ExileFromGraveCost; +import mage.abilities.effects.common.RegenerateSourceEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.common.FilterCreatureCard; +import mage.target.common.TargetCardInYourGraveyard; + +/** + * + * @author fireshoes + */ +public class WoodwraithStrangler extends CardImpl { + + public WoodwraithStrangler(UUID ownerId) { + super(ownerId, 241, "Woodwraith Strangler", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{2}{B}{G}"); + this.expansionSetCode = "RAV"; + this.subtype.add("Plant"); + this.subtype.add("Zombie"); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Exile a creature card from your graveyard: Regenerate Woodwraith Strangler. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new RegenerateSourceEffect(), + new ExileFromGraveCost(new TargetCardInYourGraveyard(new FilterCreatureCard("a creature card from your graveyard"))))); + } + + public WoodwraithStrangler(final WoodwraithStrangler card) { + super(card); + } + + @Override + public WoodwraithStrangler copy() { + return new WoodwraithStrangler(this); + } +} diff --git a/Mage.Sets/src/mage/sets/tempest/Kindle.java b/Mage.Sets/src/mage/sets/tempest/Kindle.java index 7a4a1acac86..e5a25737382 100644 --- a/Mage.Sets/src/mage/sets/tempest/Kindle.java +++ b/Mage.Sets/src/mage/sets/tempest/Kindle.java @@ -61,7 +61,7 @@ public class Kindle extends CardImpl { // Kindle deals X damage to target creature or player, where X is 2 plus the number of cards named Kindle in all graveyards. Effect effect = new DamageTargetEffect(new KindleCardsInAllGraveyardsCount(filter)); - effect.setText("{this} deals X damage to target creature or player, where X is 2 plus the number of cards named Kindle in all graveyards"); + effect.setText("{this} deals X damage to target creature or player, where X is 2 plus the number of cards named {source} in all graveyards"); this.getSpellAbility().addEffect(effect); this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); } diff --git a/Mage/src/main/java/mage/game/permanent/token/ZombieToken.java b/Mage/src/main/java/mage/game/permanent/token/ZombieToken.java index e8736132126..3f803a61dad 100644 --- a/Mage/src/main/java/mage/game/permanent/token/ZombieToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/ZombieToken.java @@ -43,7 +43,7 @@ public class ZombieToken extends Token { final static private List tokenImageSets = new ArrayList<>(); static { - tokenImageSets.addAll(Arrays.asList("10E", "M10", "M11", "M12", "M13", "M14", "M15", "MBS", "ALA", "ISD", "C14", "C15", "CNS", "MMA", "BNG", "KTK", "DTK", "ORI", "OGW", "SOI")); + tokenImageSets.addAll(Arrays.asList("10E", "M10", "M11", "M12", "M13", "M14", "M15", "MBS", "ALA", "ISD", "C14", "C15", "CNS", "MMA", "BNG", "KTK", "DTK", "ORI", "OGW", "SOI", "EMN")); } public ZombieToken() { diff --git a/Utils/mtg-cards-data.txt b/Utils/mtg-cards-data.txt index 885f2d16c62..e29c4b90081 100644 --- a/Utils/mtg-cards-data.txt +++ b/Utils/mtg-cards-data.txt @@ -57327,9 +57327,11 @@ Assembled Alphas|Eldritch Moon|117|R|{5}{R}|Creature - Wolf|5|5|Whenever Assembl Galvanic Bombardment|Eldritch Moon|129|C|{R}|Instant|||Galvanic Bombardment deals X damage to target creature, where X is 2 plus the number of cards named Galvanic Bombardment in your graveyard.| Hanweir Garrison|Eldritch Moon|130|R|{2}{R}|Creature - Human Soldier|2|3|Whenever Hanweir Garrison attacks, put two 1/1 red Human creature tokens onto the battlefield tapped and attacking.$(Melds with Hanweir Battlements.)| Hanweir, the Writhing Township|Eldritch Moon|130|R||Legendary Creature - Eldrazi Ooze|7|4|Trample, haste$Whenever Hanweir, the Writhing Township attacks, put two 3/2 colorless Eldrazi Horror creature tokens onto the battlefield tapped and attacking.| -Emrakul's Influence|Eldritch Moon|U|{2}{G}{G}|Enchantment|||Whenever you cast an Eldrazi creature spell with converted mana cost 7 or greater, draw two cards.| +Emrakul's Influence|Eldritch Moon|157|U|{2}{G}{G}|Enchantment|||Whenever you cast an Eldrazi creature spell with converted mana cost 7 or greater, draw two cards.| Gnarlwood Dryad|Eldritch Moon|159|U|{G}|Creature - Dryad Horror|1|1|Deathtouch$Delirium &mdash Gnarlwood Dryad gets +2/+2 as long as there are four or more card types among cards in your graveyard.| Ulvenwald Observer|Eldritch Moon|176|R|{4}{G}{G}|Creature - Treefolk|6|6|Whenever a creature you control with toughness 4 or greater dies, draw a card.| +Bloodhall Priest|Eldritch Moon|181|R|{2}{B}{R}|Creature - Vampire Cleric|4|4|Whenever Bloodhall Priest enters the battlefield or attacks, if you have no cards in hand, Bloodhall Priest deals 2 damage to target creature or player.$Madness {1}{B}{R} (If you discard this card, discard it into exile. When you do, cast it for its madness cost or put it into your graveyard.)| +Gisa and Geralf|Eldritch Moon|183|M|{2}{U}{B}|Legendary Creature - Human Wizard|4|4|When Gisa and Geralf enters the battlefield, put the top four cards of your library into your graveyard.$During each of your turns, you may cast a Zombie creature card from your graveyard.| Ulrich of the Krallenhorde|Eldritch Moon|191|M|{3}{R}{G}|Legendary Creature - Human Werewolf|4|4|Whenever this creature enters the battlefield or transforms into Ulrich of the Krallenhorde, target creature gets +4/+4 until end of turn.$At the beginning of each upkeep, if no spells were cast last turn, transform Ulrich of the Krallenhorde.| Ulrich, Uncontested Alpha|Eldritch Moon|191|M||Legendary Creature - Werewolf|6|6|Whenever this creature transforms into Ulrich, Uncontested Alpha, you may have it fight target non-Werewolf creature you don't control.$At the beginning of each upkeep, if a player cast two or more spells last turn, transform Ulrich, Uncontested Alpha.| Cryptolith Fragment|Eldritch Moon|193|U|{3}|Artifact|||Cryptolith Fragment enters the battlefield tapped.${T}: Add one mana of any color to your mana pool. Each player loses 1 life.$At the beginning of your upkeep, if each player has 10 or less life, transform Cryptolith Fragment.|