diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/AdverseConditions.java b/Mage.Sets/src/mage/sets/battleforzendikar/AdverseConditions.java index 501c68e7d87..bc2a92d7430 100644 --- a/Mage.Sets/src/mage/sets/battleforzendikar/AdverseConditions.java +++ b/Mage.Sets/src/mage/sets/battleforzendikar/AdverseConditions.java @@ -58,7 +58,7 @@ public class AdverseConditions extends CardImpl { // Tap up to two target creatures. Those creatures don't untap during their controller's next untap step. this.getSpellAbility().addEffect(new TapTargetEffect()); this.getSpellAbility().addTarget(new TargetCreaturePermanent(0, 2)); - this.getSpellAbility().addEffect(new DontUntapInControllersNextUntapStepTargetEffect()); + this.getSpellAbility().addEffect(new DontUntapInControllersNextUntapStepTargetEffect("Those creatures")); // Put a 1/1 colorless Eldrazi Scion creature token onto the battlefield. It has "Sacrifice this creature: Add {C} to your mana pool." Effect effect = new CreateTokenEffect(new EldraziScionToken()); effect.setText("put a 1/1 colorless Eldrazi Scion creature token onto the battlefield. It has \"Sacrifice this creature: Add {C} to your mana pool.\""); diff --git a/Mage.Sets/src/mage/sets/bornofthegods/SuddenStorm.java b/Mage.Sets/src/mage/sets/bornofthegods/SuddenStorm.java index 320a21cad05..dc874b4c8c4 100644 --- a/Mage.Sets/src/mage/sets/bornofthegods/SuddenStorm.java +++ b/Mage.Sets/src/mage/sets/bornofthegods/SuddenStorm.java @@ -28,9 +28,9 @@ package mage.sets.bornofthegods; import java.util.UUID; -import mage.abilities.effects.keyword.ScryEffect; import mage.abilities.effects.common.DontUntapInControllersNextUntapStepTargetEffect; import mage.abilities.effects.common.TapTargetEffect; +import mage.abilities.effects.keyword.ScryEffect; import mage.cards.CardImpl; import mage.constants.CardType; import mage.constants.Rarity; @@ -50,7 +50,7 @@ public class SuddenStorm extends CardImpl { // Tap up to two target creatures. Those creatures don't untap during their controllers' next untap steps. Scry 1. this.getSpellAbility().addEffect(new TapTargetEffect()); this.getSpellAbility().addTarget(new TargetCreaturePermanent(0, 2)); - this.getSpellAbility().addEffect(new DontUntapInControllersNextUntapStepTargetEffect()); + this.getSpellAbility().addEffect(new DontUntapInControllersNextUntapStepTargetEffect("Those creatures")); this.getSpellAbility().addEffect(new ScryEffect(1)); } diff --git a/Mage.Sets/src/mage/sets/darkascension/ChaliceOfDeath.java b/Mage.Sets/src/mage/sets/darkascension/ChaliceOfDeath.java index b1638323554..f4997e607d9 100644 --- a/Mage.Sets/src/mage/sets/darkascension/ChaliceOfDeath.java +++ b/Mage.Sets/src/mage/sets/darkascension/ChaliceOfDeath.java @@ -28,14 +28,13 @@ package mage.sets.darkascension; import java.util.UUID; - -import mage.constants.CardType; -import mage.constants.Rarity; import mage.abilities.Ability; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.common.TapSourceCost; import mage.abilities.effects.common.LoseLifeTargetEffect; import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; import mage.constants.Zone; import mage.target.TargetPlayer; @@ -51,7 +50,6 @@ public class ChaliceOfDeath extends CardImpl { // this card is the second face of double-faced card this.nightCard = true; - this.canTransform = true; // {tap}: Target player loses 5 life. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new LoseLifeTargetEffect(5), new TapSourceCost()); diff --git a/Mage.Sets/src/mage/sets/eldritchmoon/AuroraOfEmrakul.java b/Mage.Sets/src/mage/sets/eldritchmoon/AuroraOfEmrakul.java new file mode 100644 index 00000000000..aea5f12ea0c --- /dev/null +++ b/Mage.Sets/src/mage/sets/eldritchmoon/AuroraOfEmrakul.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.AttacksTriggeredAbility; +import mage.abilities.effects.common.LoseLifeOpponentsEffect; +import mage.abilities.keyword.DeathtouchAbility; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; + +/** + * + * @author fireshoes + */ +public class AuroraOfEmrakul extends CardImpl { + + public AuroraOfEmrakul(UUID ownerId) { + super(ownerId, 193, "Aurora of Emrakul", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, ""); + this.expansionSetCode = "EMN"; + this.subtype.add("Eldrazi"); + this.subtype.add("Reflection"); + this.power = new MageInt(1); + this.toughness = new MageInt(4); + + // this card is the second face of double-faced card + this.nightCard = true; + + // Flying + this.addAbility(FlyingAbility.getInstance()); + + // Deathtouch + this.addAbility(DeathtouchAbility.getInstance()); + + // Whenever Aurora of Emrakul attacks, each opponent loses 3 life. + this.addAbility(new AttacksTriggeredAbility(new LoseLifeOpponentsEffect(3),false)); + } + + public AuroraOfEmrakul(final AuroraOfEmrakul card) { + super(card); + } + + @Override + public AuroraOfEmrakul copy() { + return new AuroraOfEmrakul(this); + } +} diff --git a/Mage.Sets/src/mage/sets/eldritchmoon/BrunaTheFadingLight.java b/Mage.Sets/src/mage/sets/eldritchmoon/BrunaTheFadingLight.java new file mode 100644 index 00000000000..9023411f2dd --- /dev/null +++ b/Mage.Sets/src/mage/sets/eldritchmoon/BrunaTheFadingLight.java @@ -0,0 +1,91 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.eldritchmoon; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.effects.common.CastSourceTriggeredAbility; +import mage.abilities.effects.common.ReturnFromGraveyardToBattlefieldTargetEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.abilities.keyword.VigilanceAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.FilterCard; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.CardTypePredicate; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.target.common.TargetCardInYourGraveyard; + +/** + * + * @author fireshoes + */ +public class BrunaTheFadingLight extends CardImpl { + + private static final FilterCard filter = new FilterCard("Angel or Human creature card"); + + static { + filter.add(Predicates.and(new CardTypePredicate(CardType.CREATURE), + (Predicates.or(new SubtypePredicate("Human"), + (new SubtypePredicate("Angel")))))); + } + + public BrunaTheFadingLight(UUID ownerId) { + super(ownerId, 15, "Bruna, the Fading Light", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{5}{W}{W}"); + this.expansionSetCode = "EMN"; + this.supertype.add("Legendary"); + this.subtype.add("Angel"); + this.subtype.add("Horror"); + this.power = new MageInt(5); + this.toughness = new MageInt(7); + + // When you cast Bruna, the Fading Light, you may return target Angel or Human creature card from your graveyard to the battlefield. + Ability ability = new CastSourceTriggeredAbility(new ReturnFromGraveyardToBattlefieldTargetEffect(), true); + ability.addTarget(new TargetCardInYourGraveyard(filter)); + this.addAbility(ability); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + + // Vigilance + this.addAbility(VigilanceAbility.getInstance()); + + // (Melds with Gisela, the Broken Blade.) + } + + public BrunaTheFadingLight(final BrunaTheFadingLight card) { + super(card); + } + + @Override + public BrunaTheFadingLight copy() { + return new BrunaTheFadingLight(this); + } +} diff --git a/Mage.Sets/src/mage/sets/eldritchmoon/CemeteryRecruitment.java b/Mage.Sets/src/mage/sets/eldritchmoon/CemeteryRecruitment.java new file mode 100644 index 00000000000..64ca11e0617 --- /dev/null +++ b/Mage.Sets/src/mage/sets/eldritchmoon/CemeteryRecruitment.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.eldritchmoon; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.effects.OneShotEffect; +import mage.cards.Card; +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.game.Game; +import mage.players.Player; +import mage.target.common.TargetCardInYourGraveyard; + +/** + * + * @author fireshoes + */ +public class CemeteryRecruitment extends CardImpl { + + public CemeteryRecruitment(UUID ownerId) { + super(ownerId, 83, "Cemetery Recruitment", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{1}{B}"); + this.expansionSetCode = "EMN"; + + // Return target creature card from your graveyard to your hand. If it's a Zombie card, draw a card. + this.getSpellAbility().addEffect(new CemeteryRecruitmentEffect()); + this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(0, 1, new FilterCreatureCard("creature card from your graveyard"))); + } + + public CemeteryRecruitment(final CemeteryRecruitment card) { + super(card); + } + + @Override + public CemeteryRecruitment copy() { + return new CemeteryRecruitment(this); + } +} + +class CemeteryRecruitmentEffect extends OneShotEffect { + + public CemeteryRecruitmentEffect() { + super(Outcome.Benefit); + staticText = "Return target creature card from your graveyard to your hand. If it's a Zombie card, draw a card"; + } + + public CemeteryRecruitmentEffect(final CemeteryRecruitmentEffect effect) { + super(effect); + } + + @Override + public CemeteryRecruitmentEffect copy() { + return new CemeteryRecruitmentEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null) { + Card card = game.getCard(targetPointer.getFirst(game, source)); + if (card != null) { + if (controller.moveCards(card, Zone.HAND, source, game) + && card.getSubtype().contains("Zombie")) { + controller.drawCards(1, game); + } + } + return true; + } + return false; + } +} diff --git a/Mage.Sets/src/mage/sets/eldritchmoon/ChillingGrasp.java b/Mage.Sets/src/mage/sets/eldritchmoon/ChillingGrasp.java new file mode 100644 index 00000000000..3c2131dd449 --- /dev/null +++ b/Mage.Sets/src/mage/sets/eldritchmoon/ChillingGrasp.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.eldritchmoon; + +import java.util.UUID; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.DontUntapInControllersNextUntapStepTargetEffect; +import mage.abilities.effects.common.TapTargetEffect; +import mage.abilities.keyword.MadnessAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author fireshoes + */ +public class ChillingGrasp extends CardImpl { + + public ChillingGrasp(UUID ownerId) { + super(ownerId, 50, "Chilling Grasp", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{2}{U}"); + this.expansionSetCode = "EMN"; + + // Tap up to two target creatures. Those creatures don't untap during their controller's next uptap step. + this.getSpellAbility().addEffect(new TapTargetEffect()); + this.getSpellAbility().addTarget(new TargetCreaturePermanent(0, 2)); + this.getSpellAbility().addEffect(new DontUntapInControllersNextUntapStepTargetEffect("Those creatures")); + + // Madness {3}{U} + this.addAbility(new MadnessAbility(this, new ManaCostsImpl("{3}{U}"))); + } + + public ChillingGrasp(final ChillingGrasp card) { + super(card); + } + + @Override + public ChillingGrasp copy() { + return new ChillingGrasp(this); + } +} diff --git a/Mage.Sets/src/mage/sets/eldritchmoon/CryptolithFragment.java b/Mage.Sets/src/mage/sets/eldritchmoon/CryptolithFragment.java new file mode 100644 index 00000000000..fd9734f806b --- /dev/null +++ b/Mage.Sets/src/mage/sets/eldritchmoon/CryptolithFragment.java @@ -0,0 +1,82 @@ +/* + * 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.common.BeginningOfUpkeepTriggeredAbility; +import mage.abilities.common.EntersBattlefieldTappedAbility; +import mage.abilities.condition.common.TenOrLessLifeCondition; +import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.effects.common.LoseLifeAllPlayersEffect; +import mage.abilities.effects.common.TransformSourceEffect; +import mage.abilities.keyword.TransformAbility; +import mage.abilities.mana.AnyColorManaAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.TargetController; + +/** + * + * @author fireshoes + */ +public class CryptolithFragment extends CardImpl { + + public CryptolithFragment(UUID ownerId) { + super(ownerId, 193, "Cryptolith Fragment", Rarity.UNCOMMON, new CardType[]{CardType.ARTIFACT}, "{3}"); + this.expansionSetCode = "EMN"; + + this.canTransform = true; + this.secondSideCard = new AuroraOfEmrakul(ownerId); + + // Cryptolith Fragment enters the battlefield tapped. + this.addAbility(new EntersBattlefieldTappedAbility()); + + // {T}: Add one mana of any color to your mana pool. Each player loses 1 life. + Ability AnyColorManaAbility = new AnyColorManaAbility(); + AnyColorManaAbility.addEffect(new LoseLifeAllPlayersEffect(1)); + this.addAbility(AnyColorManaAbility); + + // At the beginning of your upkeep, if each player has 10 or less life, transform Cryptolith Fragment. + this.addAbility(new TransformAbility()); + this.addAbility(new ConditionalTriggeredAbility( + new BeginningOfUpkeepTriggeredAbility(new TransformSourceEffect(true), TargetController.YOU, false), + new TenOrLessLifeCondition(TenOrLessLifeCondition.CheckType.EACH_PLAYER), + "At the beginning of your upkeep, if each player has 10 or less life, transform Cryptolith Fragment.")); + } + + public CryptolithFragment(final CryptolithFragment card) { + super(card); + } + + @Override + public CryptolithFragment copy() { + return new CryptolithFragment(this); + } +} diff --git a/Mage.Sets/src/mage/sets/eldritchmoon/DawnGryff.java b/Mage.Sets/src/mage/sets/eldritchmoon/DawnGryff.java new file mode 100644 index 00000000000..2ba43d32035 --- /dev/null +++ b/Mage.Sets/src/mage/sets/eldritchmoon/DawnGryff.java @@ -0,0 +1,62 @@ +/* + * 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.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; + +/** + * + * @author fireshoes + */ +public class DawnGryff extends CardImpl { + + public DawnGryff(UUID ownerId) { + super(ownerId, 19, "Dawn Gryff", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{2}{W}"); + this.expansionSetCode = "EMN"; + this.subtype.add("Hippogriff"); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + } + + public DawnGryff(final DawnGryff card) { + super(card); + } + + @Override + public DawnGryff copy() { + return new DawnGryff(this); + } +} diff --git a/Mage.Sets/src/mage/sets/eldritchmoon/GnarlwoodDryad.java b/Mage.Sets/src/mage/sets/eldritchmoon/GnarlwoodDryad.java new file mode 100644 index 00000000000..80ea32dc998 --- /dev/null +++ b/Mage.Sets/src/mage/sets/eldritchmoon/GnarlwoodDryad.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.eldritchmoon; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.condition.common.DeliriumCondition; +import mage.abilities.decorator.ConditionalContinuousEffect; +import mage.abilities.effects.common.continuous.BoostSourceEffect; +import mage.abilities.keyword.DeathtouchAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; + +/** + * + * @author fireshoes + */ +public class GnarlwoodDryad extends CardImpl { + + public GnarlwoodDryad(UUID ownerId) { + super(ownerId, 159, "Gnarlwood Dryad", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{G}"); + this.expansionSetCode = "EMN"; + this.subtype.add("Dryad"); + this.subtype.add("Horror"); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // Deathtouch + this.addAbility(DeathtouchAbility.getInstance()); + + // Delirium &mdash Gnarlwood Dryad gets +2/+2 as long as there are four or more card types among cards in your graveyard. + ConditionalContinuousEffect effect = new ConditionalContinuousEffect( + new BoostSourceEffect(2, 2, Duration.WhileOnBattlefield), DeliriumCondition.getInstance(), + "Delirium — {this} gets +2/+2 as long as there are four or more card types among cards in your graveyard."); + Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, effect); + this.addAbility(ability); + } + + public GnarlwoodDryad(final GnarlwoodDryad card) { + super(card); + } + + @Override + public GnarlwoodDryad copy() { + return new GnarlwoodDryad(this); + } +} diff --git a/Mage.Sets/src/mage/sets/eldritchmoon/HanweirGarrison.java b/Mage.Sets/src/mage/sets/eldritchmoon/HanweirGarrison.java new file mode 100644 index 00000000000..4bf7ecf3a7c --- /dev/null +++ b/Mage.Sets/src/mage/sets/eldritchmoon/HanweirGarrison.java @@ -0,0 +1,81 @@ +/* + * 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.ObjectColor; +import mage.abilities.common.AttacksTriggeredAbility; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.game.permanent.token.Token; + +/** + * + * @author fireshoes + */ +public class HanweirGarrison extends CardImpl { + + public HanweirGarrison(UUID ownerId) { + super(ownerId, 130, "Hanweir Garrison", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{2}{R}"); + this.expansionSetCode = "EMN"; + this.subtype.add("Human"); + this.subtype.add("Soldier"); + this.power = new MageInt(2); + this.toughness = new MageInt(3); + + // Whenever Hanweir Garrison attacks, put two 1/1 red Human creature tokens onto the battlefield tapped and attacking. + this.addAbility(new AttacksTriggeredAbility(new CreateTokenEffect(new RedHumanToken(), 2, true, true), false)); + + // (Melds with Hanweir Battlements.) + } + + public HanweirGarrison(final HanweirGarrison card) { + super(card); + } + + @Override + public HanweirGarrison copy() { + return new HanweirGarrison(this); + } +} + +class RedHumanToken extends Token { + + public RedHumanToken() { + super("Human", "1/1 red Human creature token"); + this.cardType.add(CardType.CREATURE); + this.subtype.add("Human"); + + this.color = ObjectColor.RED; + this.power = new MageInt(1); + this.toughness = new MageInt(1); + } +} diff --git a/Mage.Sets/src/mage/sets/eldritchmoon/LongRoadHome.java b/Mage.Sets/src/mage/sets/eldritchmoon/LongRoadHome.java new file mode 100644 index 00000000000..7e95f34d55a --- /dev/null +++ b/Mage.Sets/src/mage/sets/eldritchmoon/LongRoadHome.java @@ -0,0 +1,200 @@ +/* + * 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.MageObjectReference; +import mage.abilities.Ability; +import mage.abilities.DelayedTriggeredAbility; +import mage.abilities.common.delayed.AtTheBeginOfNextEndStepDelayedTriggeredAbility; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.ReplacementEffectImpl; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.counters.CounterType; +import mage.game.ExileZone; +import mage.game.Game; +import mage.game.events.EntersTheBattlefieldEvent; +import mage.game.events.GameEvent; +import mage.game.events.GameEvent.EventType; +import mage.game.permanent.Permanent; +import mage.players.Player; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author fireshoes + */ +public class LongRoadHome extends CardImpl { + + public LongRoadHome(UUID ownerId) { + super(ownerId, 34, "Long Road Home", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{1}{W}"); + this.expansionSetCode = "EMN"; + + // Exile target creature. At the beginning of the next end step, return that card to the battlefield under its owner's control with a +1/+1 counter on it. + this.getSpellAbility().addEffect(new LongRoadHomeEffect()); + this.getSpellAbility().addTarget(new TargetCreaturePermanent()); + } + + public LongRoadHome(final LongRoadHome card) { + super(card); + } + + @Override + public LongRoadHome copy() { + return new LongRoadHome(this); + } +} + +class LongRoadHomeEffect extends OneShotEffect { + + private static final String effectText = "Exile target creature. At the beginning of the next end step, return that card to the battlefield under its owner's control with a +1/+1 counter on it"; + + LongRoadHomeEffect() { + super(Outcome.Benefit); + staticText = effectText; + } + + LongRoadHomeEffect(LongRoadHomeEffect effect) { + super(effect); + } + + @Override + public boolean apply(Game game, Ability source) { + Permanent permanent = game.getPermanent(source.getFirstTarget()); + if (permanent != null) { + if (permanent.moveToExile(source.getSourceId(), "Otherworldly Journey", source.getSourceId(), game)) { + ExileZone exile = game.getExile().getExileZone(source.getSourceId()); + // only if permanent is in exile (tokens would be stop to exist) + if (exile != null && !exile.isEmpty()) { + Card card = game.getCard(permanent.getId()); + if (card != null) { + //create delayed triggered ability + DelayedTriggeredAbility delayedAbility + = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(new LongRoadHomeReturnFromExileEffect(new MageObjectReference(card, game))); + delayedAbility.setSourceId(source.getSourceId()); + delayedAbility.setControllerId(source.getControllerId()); + delayedAbility.setSourceObject(source.getSourceObject(game), game); + game.addDelayedTriggeredAbility(delayedAbility); + } + } + return true; + } + } + return false; + } + + @Override + public LongRoadHomeEffect copy() { + return new LongRoadHomeEffect(this); + } + +} + +class LongRoadHomeReturnFromExileEffect extends OneShotEffect { + + MageObjectReference objectToReturn; + + public LongRoadHomeReturnFromExileEffect(MageObjectReference objectToReturn) { + super(Outcome.PutCardInPlay); + this.objectToReturn = objectToReturn; + staticText = "return that card to the battlefield under its owner's control with a +1/+1 counter on it"; + } + + public LongRoadHomeReturnFromExileEffect(final LongRoadHomeReturnFromExileEffect effect) { + super(effect); + this.objectToReturn = effect.objectToReturn; + } + + @Override + public LongRoadHomeReturnFromExileEffect copy() { + return new LongRoadHomeReturnFromExileEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Card card = game.getCard(objectToReturn.getSourceId()); + if (card != null && objectToReturn.refersTo(card, game)) { + Player owner = game.getPlayer(card.getOwnerId()); + if (owner != null) { + game.addEffect(new LongRoadHomeEntersBattlefieldEffect(objectToReturn), source); + owner.moveCards(card, Zone.BATTLEFIELD, source, game, false, false, true, null); + } + } + return true; + } +} + +class LongRoadHomeEntersBattlefieldEffect extends ReplacementEffectImpl { + + MageObjectReference objectToReturn; + + public LongRoadHomeEntersBattlefieldEffect(MageObjectReference objectToReturn) { + super(Duration.Custom, Outcome.BoostCreature); + this.objectToReturn = objectToReturn; + staticText = "that card returns to the battlefield with a +1/+1 counter on it"; + } + + public LongRoadHomeEntersBattlefieldEffect(LongRoadHomeEntersBattlefieldEffect effect) { + super(effect); + this.objectToReturn = effect.objectToReturn; + } + + @Override + public boolean checksEventType(GameEvent event, Game game) { + return EventType.ENTERS_THE_BATTLEFIELD.equals(event.getType()); + } + + @Override + public boolean applies(GameEvent event, Ability source, Game game) { + if (event.getType() == EventType.ENTERS_THE_BATTLEFIELD) { + return event.getTargetId().equals(objectToReturn.getSourceId()); + } + return false; + } + + @Override + public boolean replaceEvent(GameEvent event, Ability source, Game game) { + Permanent permanent = ((EntersTheBattlefieldEvent) event).getTarget(); + if (permanent != null) { + permanent.addCounters(CounterType.P1P1.createInstance(), game); + discard(); // use only once + } + return false; + } + + @Override + public LongRoadHomeEntersBattlefieldEffect copy() { + return new LongRoadHomeEntersBattlefieldEffect(this); + } +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/eldritchmoon/MidnightScavengers.java b/Mage.Sets/src/mage/sets/eldritchmoon/MidnightScavengers.java new file mode 100644 index 00000000000..b03beb3e676 --- /dev/null +++ b/Mage.Sets/src/mage/sets/eldritchmoon/MidnightScavengers.java @@ -0,0 +1,81 @@ +/* + * 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.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.common.ReturnFromGraveyardToHandTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.Filter; +import mage.filter.common.FilterCreatureCard; +import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; +import mage.target.Target; +import mage.target.common.TargetCardInYourGraveyard; + +/** + * + * @author fireshoes + */ +public class MidnightScavengers extends CardImpl { + + private static final FilterCreatureCard filter = new FilterCreatureCard("creature card with converted mana cost 3 or less from your graveyard"); + + static { + filter.add(new ConvertedManaCostPredicate(Filter.ComparisonType.LessThan, 4)); + } + + public MidnightScavengers(UUID ownerId) { + super(ownerId, 96, "Midnight Scavengers", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{4}{B}"); + this.expansionSetCode = "EMN"; + this.subtype.add("Human"); + this.subtype.add("Rogue"); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // When Midnight Scavengers enters the battlefield, you may return target creature card with converted mana cost 3 or less from your graveyard to your hand. + Ability ability = new EntersBattlefieldTriggeredAbility(new ReturnFromGraveyardToHandTargetEffect(), true); + Target target = new TargetCardInYourGraveyard(filter); + ability.addTarget(target); + this.addAbility(ability); + + // (Melds with Graf Rats.) + } + + public MidnightScavengers(final MidnightScavengers card) { + super(card); + } + + @Override + public MidnightScavengers copy() { + return new MidnightScavengers(this); + } +} diff --git a/Mage.Sets/src/mage/sets/eldritchmoon/ThaliasLancers.java b/Mage.Sets/src/mage/sets/eldritchmoon/ThaliasLancers.java new file mode 100644 index 00000000000..c3d75aa52df --- /dev/null +++ b/Mage.Sets/src/mage/sets/eldritchmoon/ThaliasLancers.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.eldritchmoon; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.common.search.SearchLibraryPutInHandEffect; +import mage.abilities.keyword.FirstStrikeAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.FilterCard; +import mage.filter.predicate.mageobject.SupertypePredicate; +import mage.target.common.TargetCardInLibrary; + +/** + * + * @author fireshoes + */ +public class ThaliasLancers extends CardImpl { + + private static final FilterCard filter = new FilterCard("legendary card"); + + static { + filter.add(new SupertypePredicate("Legendary")); + } + + public ThaliasLancers(UUID ownerId) { + super(ownerId, 57, "Thalia's Lancers", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{3}{W}{W}"); + this.expansionSetCode = "EMN"; + this.subtype.add("Human"); + this.subtype.add("Knight"); + this.power = new MageInt(4); + this.toughness = new MageInt(4); + + // First strike + this.addAbility(FirstStrikeAbility.getInstance()); + + // When Thalia's Lancers enters the battlefield, you may search your library for a legendary card, reveal it, put it into your hand, then shuffle your library. + this.addAbility(new EntersBattlefieldTriggeredAbility(new SearchLibraryPutInHandEffect(new TargetCardInLibrary(0, 1, filter), true, true), true)); + } + + public ThaliasLancers(final ThaliasLancers card) { + super(card); + } + + @Override + public ThaliasLancers copy() { + return new ThaliasLancers(this); + } +} diff --git a/Mage.Sets/src/mage/sets/fatereforged/WillOfTheNaga.java b/Mage.Sets/src/mage/sets/fatereforged/WillOfTheNaga.java index 4c7e739d019..fd2742e572b 100644 --- a/Mage.Sets/src/mage/sets/fatereforged/WillOfTheNaga.java +++ b/Mage.Sets/src/mage/sets/fatereforged/WillOfTheNaga.java @@ -51,7 +51,7 @@ public class WillOfTheNaga extends CardImpl { // Tap up to two target creatures. Those creatures don't untap during their controller's next untap step. this.getSpellAbility().addEffect(new TapTargetEffect()); this.getSpellAbility().addTarget(new TargetCreaturePermanent(0, 2)); - this.getSpellAbility().addEffect(new DontUntapInControllersNextUntapStepTargetEffect()); + this.getSpellAbility().addEffect(new DontUntapInControllersNextUntapStepTargetEffect("Those creatures")); } public WillOfTheNaga(final WillOfTheNaga card) { diff --git a/Mage.Sets/src/mage/sets/magic2012/FrostBreath.java b/Mage.Sets/src/mage/sets/magic2012/FrostBreath.java index 7f5215bbd6f..4d6e0e2b670 100644 --- a/Mage.Sets/src/mage/sets/magic2012/FrostBreath.java +++ b/Mage.Sets/src/mage/sets/magic2012/FrostBreath.java @@ -28,11 +28,11 @@ package mage.sets.magic2012; import java.util.UUID; -import mage.constants.CardType; -import mage.constants.Rarity; import mage.abilities.effects.common.DontUntapInControllersNextUntapStepTargetEffect; import mage.abilities.effects.common.TapTargetEffect; import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; import mage.target.common.TargetCreaturePermanent; /** @@ -49,7 +49,7 @@ public class FrostBreath extends CardImpl { // Tap up to two target creatures. Those creatures don't untap during their controller's next untap step. this.getSpellAbility().addEffect(new TapTargetEffect()); this.getSpellAbility().addTarget(new TargetCreaturePermanent(0, 2)); - this.getSpellAbility().addEffect(new DontUntapInControllersNextUntapStepTargetEffect()); + this.getSpellAbility().addEffect(new DontUntapInControllersNextUntapStepTargetEffect("Those creatures")); } public FrostBreath(final FrostBreath card) { diff --git a/Mage/src/main/java/mage/abilities/condition/common/TenOrLessLifeCondition.java b/Mage/src/main/java/mage/abilities/condition/common/TenOrLessLifeCondition.java index d8c7bfe6e85..8b727aa593e 100644 --- a/Mage/src/main/java/mage/abilities/condition/common/TenOrLessLifeCondition.java +++ b/Mage/src/main/java/mage/abilities/condition/common/TenOrLessLifeCondition.java @@ -31,6 +31,8 @@ import java.util.UUID; import mage.abilities.Ability; import mage.abilities.condition.Condition; import mage.game.Game; +import mage.players.Player; +import mage.players.PlayerList; /** * @@ -38,7 +40,7 @@ import mage.game.Game; */ public class TenOrLessLifeCondition implements Condition { - public static enum CheckType { AN_OPPONENT, CONTROLLER, TARGET_OPPONENT }; + public static enum CheckType { AN_OPPONENT, CONTROLLER, TARGET_OPPONENT, EACH_PLAYER }; private final CheckType type; @@ -62,6 +64,19 @@ public class TenOrLessLifeCondition implements Condition { case TARGET_OPPONENT: //TODO: Implement this. break; + case EACH_PLAYER: + int maxLife = 0; + PlayerList playerList = game.getState().getPlayersInRange(source.getControllerId(), game); + for ( UUID pid : playerList ) { + Player p = game.getPlayer(pid); + if (p != null) { + if (maxLife < p.getLife()) { + maxLife = p.getLife(); + } + } + } + conditionApplies |= maxLife <= 10; + break; } return conditionApplies; diff --git a/Utils/mtg-cards-data.txt b/Utils/mtg-cards-data.txt index 5ec8340a5ff..6ec07ffe905 100644 --- a/Utils/mtg-cards-data.txt +++ b/Utils/mtg-cards-data.txt @@ -52320,7 +52320,7 @@ Sandsteppe Mastodon|Launch Party|29|R|{5}{G}{G}|Creature - Elephant|5|5|Reach$Wh Deathbringer Regent|Launch Party|30|R|{5}{B}{B}|Creature - Dragon|5|6|Flying$When Deathbringer Regent enters the battlefield, if you cast it from your hand and there are five or more other creatures on the battlefield, destroy all other creatures.| Mizzium Meddler|Launch Party|31|R|{2}{U}|Creature - Vedalken Wizard|1|4|Flash (You may cast this spell any time you could cast an instant.)$When Mizzium Meddler enters the battlefield, you may change a target of target spell or ability to Mizzium Meddler.| Blight Herder|Launch Party|32|R|{5}|Creature - Eldrazi Processor|4|5|When you cast Blight Herder, you may put two cards your opponents own from exile into their owners' graveyards. If you do, put three 1/1 colorless Eldrazi Scion creature tokens onto the battlefield. They have "Sacrifice this creature: Add {C} to your mana pool."| -Identity Impersonator|Launch Party|33|R|{2}{U}{U}|Creature - Shapeshifter|0|3|Whenever Identity Impersonator attacks, you may exile another target non-token creature. If you do, Identity Impersonator becomes a copy of that creature until end of turn. Return the exiled card to the battlefield under its owner's control at the beginning of the next end step.| +Identity Thief|Launch Party|33|R|{2}{U}{U}|Creature - Shapeshifter|0|3|Whenever Identity Thief attacks, you may exile another target non-token creature. If you do, Identity Thief becomes a copy of that creature until end of turn. Return the exiled card to the battlefield under its owner's control at the beginning of the next end step.| Ancestral Recall|Vintage Masters|1|Bonus|{U}|Instant|||Target player draws three cards.| Afterlife|Vintage Masters|10|C|{2}{W}|Instant|||Destroy target creature. It can't be regenerated. Its controller puts a 1/1 white Spirit creature token with flying onto the battlefield.| Upheaval|Vintage Masters|100|M|{4}{U}{U}|Sorcery|||Return all permanents to their owners' hands.| @@ -57304,14 +57304,16 @@ Dawn Gryff|Eldritch Moon|19|C|{2}{W}|Creature - Hippogriff|2|2|Flying| Gisela, the Broken Blade|Eldritch Moon|28|M|{2}{W}{W}|Legendary Creature - Angel Horror|4|3|Flying, first strike, lifelink$At the beginning of your end step, if you both own and control Gisela, the Broken Blade and a creature named Bruna, the Fading Light, exile them, then meld them into Brisela, Voice of Nightmares.| Long Road Home|Eldritch Moon|34|U|{1}{W}|Instant|||Exile target creature. At the beginning of the next end step, return that card to the battlefield under its owner's control with a +1/+1 counter on it.| Thalia, Heretic Cathar|Eldritch Moon|46|R|{2}{W}|Legendary Creature - Human Soldier|3|2|First strike$Creatures and nonbasic lands your opponents control enter the battlefield tapped.| +Thalia's Lancers|Eldritch Moon|57|R|{3}{W}{W}|Creature - Human Knight|4|4|First strike$When Thalia's Lancers enters the battlefield, you may search your library for a legendary card, reveal it, put it into your hand, then shuffle your library.| Chilling Grasp|Eldritch Moon|50|U|{2}{U}|Instant|||Tap up to two target creatures. Those creatures don't untap during their controller's next uptap step.$Madness {3}{U} (If you discard this card, discard it into exile. When you do, cast it for its madness cost or put it into your graveyard.)| Coax from the Blind Eternities|Eldritch Moon|51|R|{2}{U}|Sorcery|||You may choose an Eldrazi card you own from outside the game or in exile, reveal that card, and put it into your hand.| -Identity Impersonator|Eldritch Moon|64|R|{2}{U}{U}|Creature - Shapeshifter|0|3|Whenever Identity Impersonator attacks, you may exile another target non-token creature. If you do, Identity Impersonator becomes a copy of that creature until end of turn. Return the exiled card to the battlefield under its owner's control at the beginning of the next end step.| +Identity Thief|Eldritch Moon|64|R|{2}{U}{U}|Creature - Shapeshifter|0|3|Whenever Identity Thief attacks, you may exile another target non-token creature. If you do, Identity Thief becomes a copy of that creature until end of turn. Return the exiled card to the battlefield under its owner's control at the beginning of the next end step.| +Unsubstantiate|Eldritch Moon|79|U|{1}{U}|Instant|||Return target spell or creature to its owner's hand.| Borrowed Malevolence|Eldritch Moon|82|C|{B}|Instant|||Escalate {2} (Pay this cost for each mode chosen beyond the first.)$Choose one or both &mdash Target creature gets +1/+1 until end of turn. Target creature gets -1/-1 until end of turn.| Cemetery Recruitment|Eldritch Moon|83|C|{1}{B}|Sorcery|||Return target creature card from your graveyard to your hand. If it's a Zombie card, draw a card.| Graf Rats|Eldritch Moon|91|C|{1}{B}|Creature - Rat|2|1|At the beginning of combat on your turn, if you both own and control Graf Rats and a creature named Midnight Scavengers, exile them, then meld them into Chittering Host.| Midnight Scavengers|Eldritch Moon|96|C|{4}{B}|Creature - Human Rogue|3|3|When Midnight Scavengers enters the battlefield, you may return target creature card with converted mana cost 3 or less from your graveyard to your hand.$(Melds with Graf Rats.)| -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 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.| 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.| 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.|