From 4c363bee2371450ea848cbe86494d4b26cffa855 Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Sat, 9 Jul 2016 15:39:59 +0200 Subject: [PATCH] [EMN] Added the missing green cards. --- .../eldritchmoon/BackwoodsSurvivalists.java | 74 ++++++++++++ .../mage/sets/eldritchmoon/Bloodbriar.java | 76 ++++++++++++ .../src/mage/sets/eldritchmoon/ClearShot.java | 85 +++++++++++++ .../eldritchmoon/CrossroadsConsecrator.java | 81 +++++++++++++ .../sets/eldritchmoon/FibrousEntangler.java | 76 ++++++++++++ .../mage/sets/eldritchmoon/FoulEmissary.java | 113 ++++++++++++++++++ .../mage/sets/eldritchmoon/HowlingChorus.java | 73 +++++++++++ .../mage/sets/eldritchmoon/PrimalDruid.java | 67 +++++++++++ .../mage/sets/eldritchmoon/ShrillHowler.java | 77 ++++++++++++ .../sets/eldritchmoon/SomberwaldStag.java | 79 ++++++++++++ .../sets/eldritchmoon/SpringsageRitual.java | 63 ++++++++++ .../mage/sets/eldritchmoon/SwiftSpinner.java | 66 ++++++++++ .../sets/eldritchmoon/TangleclawWerewolf.java | 77 ++++++++++++ .../mage/sets/eldritchmoon/WaxingMoon.java | 77 ++++++++++++ .../sets/eldritchmoon/WoodcuttersGrit.java | 69 +++++++++++ .../sets/eldritchmoon/WoodlandPatrol.java | 63 ++++++++++ .../mirrodinbesieged/ViridianEmissary.java | 11 +- .../effects/common/TransformSourceEffect.java | 3 - .../effects/common/TransformTargetEffect.java | 91 ++++++++++++++ .../CanBlockAdditionalCreatureEffect.java | 8 +- ...MustBeBlockedByAtLeastOneSourceEffect.java | 44 ++++--- 21 files changed, 1338 insertions(+), 35 deletions(-) create mode 100644 Mage.Sets/src/mage/sets/eldritchmoon/BackwoodsSurvivalists.java create mode 100644 Mage.Sets/src/mage/sets/eldritchmoon/Bloodbriar.java create mode 100644 Mage.Sets/src/mage/sets/eldritchmoon/ClearShot.java create mode 100644 Mage.Sets/src/mage/sets/eldritchmoon/CrossroadsConsecrator.java create mode 100644 Mage.Sets/src/mage/sets/eldritchmoon/FibrousEntangler.java create mode 100644 Mage.Sets/src/mage/sets/eldritchmoon/FoulEmissary.java create mode 100644 Mage.Sets/src/mage/sets/eldritchmoon/HowlingChorus.java create mode 100644 Mage.Sets/src/mage/sets/eldritchmoon/PrimalDruid.java create mode 100644 Mage.Sets/src/mage/sets/eldritchmoon/ShrillHowler.java create mode 100644 Mage.Sets/src/mage/sets/eldritchmoon/SomberwaldStag.java create mode 100644 Mage.Sets/src/mage/sets/eldritchmoon/SpringsageRitual.java create mode 100644 Mage.Sets/src/mage/sets/eldritchmoon/SwiftSpinner.java create mode 100644 Mage.Sets/src/mage/sets/eldritchmoon/TangleclawWerewolf.java create mode 100644 Mage.Sets/src/mage/sets/eldritchmoon/WaxingMoon.java create mode 100644 Mage.Sets/src/mage/sets/eldritchmoon/WoodcuttersGrit.java create mode 100644 Mage.Sets/src/mage/sets/eldritchmoon/WoodlandPatrol.java create mode 100644 Mage/src/main/java/mage/abilities/effects/common/TransformTargetEffect.java diff --git a/Mage.Sets/src/mage/sets/eldritchmoon/BackwoodsSurvivalists.java b/Mage.Sets/src/mage/sets/eldritchmoon/BackwoodsSurvivalists.java new file mode 100644 index 00000000000..f66c50a1fe2 --- /dev/null +++ b/Mage.Sets/src/mage/sets/eldritchmoon/BackwoodsSurvivalists.java @@ -0,0 +1,74 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.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.effects.common.continuous.GainAbilitySourceEffect; +import mage.abilities.keyword.TrampleAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; + +/** + * + * @author LevelX2 + */ +public class BackwoodsSurvivalists extends CardImpl { + + public BackwoodsSurvivalists(UUID ownerId) { + super(ownerId, 150, "Backwoods Survivalists", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{3}{G}"); + this.expansionSetCode = "EMN"; + this.subtype.add("Human"); + this.subtype.add("Warrior"); + this.power = new MageInt(4); + this.toughness = new MageInt(3); + + // Delirium — Backwoods Survivalists gets +1/+1 and has trample as long as there are four or more card types among cards in your graveyard. + ConditionalContinuousEffect effect = new ConditionalContinuousEffect(new BoostSourceEffect(1, 1, Duration.WhileOnBattlefield), DeliriumCondition.getInstance(), "Delirium — {this} gets +1/+1"); + Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, effect); + ability.addEffect(new ConditionalContinuousEffect(new GainAbilitySourceEffect(TrampleAbility.getInstance()), DeliriumCondition.getInstance(), "and has trample as long as there are four or more card types among cards in your graveyard.")); + this.addAbility(ability); + } + + public BackwoodsSurvivalists(final BackwoodsSurvivalists card) { + super(card); + } + + @Override + public BackwoodsSurvivalists copy() { + return new BackwoodsSurvivalists(this); + } +} diff --git a/Mage.Sets/src/mage/sets/eldritchmoon/Bloodbriar.java b/Mage.Sets/src/mage/sets/eldritchmoon/Bloodbriar.java new file mode 100644 index 00000000000..be48ef3b23f --- /dev/null +++ b/Mage.Sets/src/mage/sets/eldritchmoon/Bloodbriar.java @@ -0,0 +1,76 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.eldritchmoon; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SacrificeAllTriggeredAbility; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.TargetController; +import mage.counters.CounterType; +import mage.filter.FilterPermanent; +import mage.filter.predicate.permanent.AnotherPredicate; +import mage.filter.predicate.permanent.ControllerPredicate; + +/** + * + * @author LevelX2 + */ +public class Bloodbriar extends CardImpl { + + private final static FilterPermanent filter = new FilterPermanent("another permanent"); + + static { + filter.add(new ControllerPredicate(TargetController.YOU)); + filter.add(new AnotherPredicate()); + } + + public Bloodbriar(UUID ownerId) { + super(ownerId, 151, "Bloodbriar", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{2}{G}"); + this.expansionSetCode = "EMN"; + this.subtype.add("Plant"); + this.subtype.add("Elemental"); + this.power = new MageInt(2); + this.toughness = new MageInt(3); + + // Whenever you sacrifice another permanent, put a +1/+1 counter on Bloodbriar. + this.addAbility(new SacrificeAllTriggeredAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance()), filter, TargetController.YOU, false)); + } + + public Bloodbriar(final Bloodbriar card) { + super(card); + } + + @Override + public Bloodbriar copy() { + return new Bloodbriar(this); + } +} diff --git a/Mage.Sets/src/mage/sets/eldritchmoon/ClearShot.java b/Mage.Sets/src/mage/sets/eldritchmoon/ClearShot.java new file mode 100644 index 00000000000..b5caf63c757 --- /dev/null +++ b/Mage.Sets/src/mage/sets/eldritchmoon/ClearShot.java @@ -0,0 +1,85 @@ +/* + * 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.TargetPermanentPowerCount; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.abilities.effects.common.continuous.BoostTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.TargetController; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.permanent.ControllerPredicate; +import mage.target.Target; +import mage.target.common.TargetControlledCreaturePermanent; +import mage.target.common.TargetCreaturePermanent; +import mage.target.targetpointer.SecondTargetPointer; + +/** + * + * @author LevelX2 + */ +public class ClearShot extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature you don't control"); + + static { + filter.add(new ControllerPredicate(TargetController.NOT_YOU)); + } + + public ClearShot(UUID ownerId) { + super(ownerId, 152, "Clear Shot", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{2}{G}"); + this.expansionSetCode = "EMN"; + + // Target creature you control gets +1/+1 until end of turn. It deals damage equal to its power to target creature you don't control. + Effect effect = new BoostTargetEffect(1, 1, Duration.EndOfTurn); + effect.setApplyEffectsAfter(); // needed to count the boost for the second effect + this.getSpellAbility().addTarget(new TargetControlledCreaturePermanent()); + this.getSpellAbility().addEffect(effect); + + effect = new DamageTargetEffect(new TargetPermanentPowerCount(), true, "target creature you don't control", true); + effect.setText("It deals damage equal to its power to target creature you don't control"); + effect.setTargetPointer(new SecondTargetPointer()); + this.getSpellAbility().addEffect(effect); + Target target = new TargetCreaturePermanent(filter); + this.getSpellAbility().addTarget(target); + } + + public ClearShot(final ClearShot card) { + super(card); + } + + @Override + public ClearShot copy() { + return new ClearShot(this); + } +} diff --git a/Mage.Sets/src/mage/sets/eldritchmoon/CrossroadsConsecrator.java b/Mage.Sets/src/mage/sets/eldritchmoon/CrossroadsConsecrator.java new file mode 100644 index 00000000000..3643698dc97 --- /dev/null +++ b/Mage.Sets/src/mage/sets/eldritchmoon/CrossroadsConsecrator.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.SimpleActivatedAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.continuous.BoostTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.common.FilterAttackingCreature; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.target.common.TargetAttackingCreature; + +/** + * + * @author LevelX2 + */ +public class CrossroadsConsecrator extends CardImpl { + + private final static FilterAttackingCreature filter = new FilterAttackingCreature("attacking Human"); + + static { + filter.add(new SubtypePredicate("Human")); + } + + public CrossroadsConsecrator(UUID ownerId) { + super(ownerId, 154, "Crossroads Consecrator", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{G}"); + this.expansionSetCode = "EMN"; + this.subtype.add("Human"); + this.subtype.add("Cleric"); + this.power = new MageInt(1); + this.toughness = new MageInt(2); + + // {G}, {T}: Target attacking Human gets +1/+1 until end of turn. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostTargetEffect(1, 1, Duration.EndOfTurn), new ManaCostsImpl<>("{G}")); + ability.addTarget(new TargetAttackingCreature(1, 1, filter, false)); + ability.addCost(new TapSourceCost()); + this.addAbility(ability); + } + + public CrossroadsConsecrator(final CrossroadsConsecrator card) { + super(card); + } + + @Override + public CrossroadsConsecrator copy() { + return new CrossroadsConsecrator(this); + } +} diff --git a/Mage.Sets/src/mage/sets/eldritchmoon/FibrousEntangler.java b/Mage.Sets/src/mage/sets/eldritchmoon/FibrousEntangler.java new file mode 100644 index 00000000000..b6293cfca71 --- /dev/null +++ b/Mage.Sets/src/mage/sets/eldritchmoon/FibrousEntangler.java @@ -0,0 +1,76 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.eldritchmoon; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.combat.CanBlockAdditionalCreatureEffect; +import mage.abilities.effects.common.combat.MustBeBlockedByAtLeastOneSourceEffect; +import mage.abilities.keyword.VigilanceAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; + +/** + * + * @author LevelX2 + */ +public class FibrousEntangler extends CardImpl { + + public FibrousEntangler(UUID ownerId) { + super(ownerId, 174, "Fibrous Entangler", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, ""); + this.expansionSetCode = "EMN"; + this.subtype.add("Eldrazi"); + this.subtype.add("Werewolf"); + this.power = new MageInt(4); + this.toughness = new MageInt(6); + + // this card is the second face of double-faced card + this.nightCard = true; + + // Vigilance + this.addAbility(VigilanceAbility.getInstance()); + // Fibrous Entangler must be blocked if able. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new MustBeBlockedByAtLeastOneSourceEffect(Duration.WhileOnBattlefield))); + + // Fibrous Entangler can block an additional creature each combat. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CanBlockAdditionalCreatureEffect(Duration.WhileOnBattlefield, 1))); + } + + public FibrousEntangler(final FibrousEntangler card) { + super(card); + } + + @Override + public FibrousEntangler copy() { + return new FibrousEntangler(this); + } +} diff --git a/Mage.Sets/src/mage/sets/eldritchmoon/FoulEmissary.java b/Mage.Sets/src/mage/sets/eldritchmoon/FoulEmissary.java new file mode 100644 index 00000000000..c3ec39e2b15 --- /dev/null +++ b/Mage.Sets/src/mage/sets/eldritchmoon/FoulEmissary.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.MageInt; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.common.SacrificeSourceTriggeredAbility; +import mage.abilities.dynamicvalue.common.StaticValue; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.effects.common.LookLibraryAndPickControllerEffect; +import mage.abilities.keyword.EmergeAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.FilterCard; +import mage.filter.predicate.mageobject.CardTypePredicate; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.game.stack.Spell; + +/** + * + * @author LevelX2 + */ +public class FoulEmissary extends CardImpl { + + private static final FilterCard filter = new FilterCard("a creature card"); + + static { + filter.add(new CardTypePredicate(CardType.CREATURE)); + } + + public FoulEmissary(UUID ownerId) { + super(ownerId, 158, "Foul Emissary", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{2}{G}"); + this.expansionSetCode = "EMN"; + this.subtype.add("Human"); + this.subtype.add("Horror"); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // When Foul Emissary enters the battlefield, look at the top four cards of your library. You may reveal a creature card from among them and put it into your hand. Put the rest on the bottom of your library in any order. + this.addAbility(new EntersBattlefieldTriggeredAbility(new LookLibraryAndPickControllerEffect(new StaticValue(4), false, new StaticValue(1), filter, false))); + + // When you sacrifice Foul Emissary while casting a spell with emerge, put a 3/2 colorless Eldrazi Horror creature token onto the battlefield. + this.addAbility(new FoulEmissaryTriggeredAbility(new CreateTokenEffect(new EldraziHorrorToken()), false)); + } + + public FoulEmissary(final FoulEmissary card) { + super(card); + } + + @Override + public FoulEmissary copy() { + return new FoulEmissary(this); + } +} + +class FoulEmissaryTriggeredAbility extends SacrificeSourceTriggeredAbility { + + public FoulEmissaryTriggeredAbility(Effect effect, boolean optional) { + super(effect, optional); + } + + public FoulEmissaryTriggeredAbility(final FoulEmissaryTriggeredAbility ability) { + super(ability); + } + + @Override + public boolean checkTrigger(GameEvent event, Game game) { + if (super.checkTrigger(event, game)) { + Spell spell = game.getStack().getSpell(event.getSourceId()); + return spell != null && spell.getSpellAbility() instanceof EmergeAbility; + } + return false; + } + + @Override + public FoulEmissaryTriggeredAbility copy() { + return new FoulEmissaryTriggeredAbility(this); + } + + @Override + public String getRule() { + return "When you sacrifice {this} while casting a spell with emerge, put a 3/2 colorless Eldrazi Horror creature token onto the battlefield."; + } +} diff --git a/Mage.Sets/src/mage/sets/eldritchmoon/HowlingChorus.java b/Mage.Sets/src/mage/sets/eldritchmoon/HowlingChorus.java new file mode 100644 index 00000000000..f5c6214b4ce --- /dev/null +++ b/Mage.Sets/src/mage/sets/eldritchmoon/HowlingChorus.java @@ -0,0 +1,73 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.eldritchmoon; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.DealsCombatDamageToAPlayerTriggeredAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.effects.common.combat.CantBeBlockedByCreaturesWithLessPowerEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; + +/** + * + * @author LevelX2 + */ +public class HowlingChorus extends CardImpl { + + public HowlingChorus(UUID ownerId) { + super(ownerId, 168, "Howling Chorus", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, ""); + this.expansionSetCode = "EMN"; + this.subtype.add("Eldrazi"); + this.subtype.add("Werewolf"); + this.power = new MageInt(3); + this.toughness = new MageInt(5); + + // this card is the second face of double-faced card + this.nightCard = true; + + // Creatures with power less than Howling Chorus's power can't block it. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CantBeBlockedByCreaturesWithLessPowerEffect())); + + // Whenever Howling Chorus deals combat damage to a player, put a 3/2 colorless Eldrazi Horror creature token onto the battlefield. + this.addAbility(new DealsCombatDamageToAPlayerTriggeredAbility(new CreateTokenEffect(new EldraziHorrorToken()), false)); + } + + public HowlingChorus(final HowlingChorus card) { + super(card); + } + + @Override + public HowlingChorus copy() { + return new HowlingChorus(this); + } +} diff --git a/Mage.Sets/src/mage/sets/eldritchmoon/PrimalDruid.java b/Mage.Sets/src/mage/sets/eldritchmoon/PrimalDruid.java new file mode 100644 index 00000000000..48e367f5ab1 --- /dev/null +++ b/Mage.Sets/src/mage/sets/eldritchmoon/PrimalDruid.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.MageInt; +import mage.abilities.common.DiesTriggeredAbility; +import mage.abilities.effects.common.search.SearchLibraryPutInPlayEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.common.FilterBasicLandCard; +import mage.target.common.TargetCardInLibrary; + +/** + * + * @author LevelX2 + */ +public class PrimalDruid extends CardImpl { + + public PrimalDruid(UUID ownerId) { + super(ownerId, 167, "Primal Druid", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{1}{G}"); + this.expansionSetCode = "EMN"; + this.subtype.add("Human"); + this.subtype.add("Druid"); + this.power = new MageInt(0); + this.toughness = new MageInt(3); + + // When Primal Druid dies, you may search your library for a basic land card, put it onto the battlefield tapped, then shuffle your library. + this.addAbility(new DiesTriggeredAbility(new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(new FilterBasicLandCard()), true), true)); + + } + + public PrimalDruid(final PrimalDruid card) { + super(card); + } + + @Override + public PrimalDruid copy() { + return new PrimalDruid(this); + } +} diff --git a/Mage.Sets/src/mage/sets/eldritchmoon/ShrillHowler.java b/Mage.Sets/src/mage/sets/eldritchmoon/ShrillHowler.java new file mode 100644 index 00000000000..ea7bd28b90c --- /dev/null +++ b/Mage.Sets/src/mage/sets/eldritchmoon/ShrillHowler.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.SimpleActivatedAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.TransformSourceEffect; +import mage.abilities.effects.common.combat.CantBeBlockedByCreaturesWithLessPowerEffect; +import mage.abilities.keyword.TransformAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; + +/** + * + * @author LevelX2 + */ +public class ShrillHowler extends CardImpl { + + public ShrillHowler(UUID ownerId) { + super(ownerId, 168, "Shrill Howler", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{2}{G}"); + this.expansionSetCode = "EMN"; + this.subtype.add("Werewolf"); + this.subtype.add("Horror"); + this.power = new MageInt(3); + this.toughness = new MageInt(1); + + this.canTransform = true; + this.secondSideCard = new HowlingChorus(ownerId); + + // Creatures with power less than Shrill Howler's power can't block it. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CantBeBlockedByCreaturesWithLessPowerEffect())); + + // {5}{G}: Transform Shrill Howler. + this.addAbility(new TransformAbility()); + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new TransformSourceEffect(true), new ManaCostsImpl<>("{5}{G}"))); + + } + + public ShrillHowler(final ShrillHowler card) { + super(card); + } + + @Override + public ShrillHowler copy() { + return new ShrillHowler(this); + } +} diff --git a/Mage.Sets/src/mage/sets/eldritchmoon/SomberwaldStag.java b/Mage.Sets/src/mage/sets/eldritchmoon/SomberwaldStag.java new file mode 100644 index 00000000000..378225d8c66 --- /dev/null +++ b/Mage.Sets/src/mage/sets/eldritchmoon/SomberwaldStag.java @@ -0,0 +1,79 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.eldritchmoon; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.FightTargetSourceEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.TargetController; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.permanent.ControllerPredicate; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LevelX2 + */ +public class SomberwaldStag extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature you don't control"); + + static { + filter.add(new ControllerPredicate(TargetController.NOT_YOU)); + } + + public SomberwaldStag(UUID ownerId) { + super(ownerId, 169, "Somberwald Stag", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{3}{G}{G}"); + this.expansionSetCode = "EMN"; + this.subtype.add("Elk"); + this.power = new MageInt(4); + this.toughness = new MageInt(3); + + // When Somberwald Stag enters the battlefield, you may have it fight target creature you don't control. + Effect effect = new FightTargetSourceEffect(); + effect.setText("you may have it fight target creature you don't control"); + Ability ability = new EntersBattlefieldTriggeredAbility(effect, true); + ability.addTarget(new TargetCreaturePermanent(filter)); + this.addAbility(ability); + } + + public SomberwaldStag(final SomberwaldStag card) { + super(card); + } + + @Override + public SomberwaldStag copy() { + return new SomberwaldStag(this); + } +} diff --git a/Mage.Sets/src/mage/sets/eldritchmoon/SpringsageRitual.java b/Mage.Sets/src/mage/sets/eldritchmoon/SpringsageRitual.java new file mode 100644 index 00000000000..06bed2c812f --- /dev/null +++ b/Mage.Sets/src/mage/sets/eldritchmoon/SpringsageRitual.java @@ -0,0 +1,63 @@ +/* + * 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.DestroyTargetEffect; +import mage.abilities.effects.common.GainLifeEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.common.FilterArtifactOrEnchantmentPermanent; +import mage.target.TargetPermanent; + +/** + * + * @author LevelX2 + */ +public class SpringsageRitual extends CardImpl { + + public SpringsageRitual(UUID ownerId) { + super(ownerId, 172, "Springsage Ritual", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{3}{G}"); + this.expansionSetCode = "EMN"; + + // Destroy target artifact or enchantment. You gain 4 life. + this.getSpellAbility().addTarget(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent())); + this.getSpellAbility().addEffect(new DestroyTargetEffect()); + this.getSpellAbility().addEffect(new GainLifeEffect(4)); + } + + public SpringsageRitual(final SpringsageRitual card) { + super(card); + } + + @Override + public SpringsageRitual copy() { + return new SpringsageRitual(this); + } +} diff --git a/Mage.Sets/src/mage/sets/eldritchmoon/SwiftSpinner.java b/Mage.Sets/src/mage/sets/eldritchmoon/SwiftSpinner.java new file mode 100644 index 00000000000..93a473b2703 --- /dev/null +++ b/Mage.Sets/src/mage/sets/eldritchmoon/SwiftSpinner.java @@ -0,0 +1,66 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.eldritchmoon; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.keyword.FlashAbility; +import mage.abilities.keyword.ReachAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; + +/** + * + * @author LevelX2 + */ +public class SwiftSpinner extends CardImpl { + + public SwiftSpinner(UUID ownerId) { + super(ownerId, 173, "Swift Spinner", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{3}{G}"); + this.expansionSetCode = "EMN"; + this.subtype.add("Spider"); + this.power = new MageInt(2); + this.toughness = new MageInt(3); + + // Flash (You may cast this spell any time you could cast an instant.) + this.addAbility(FlashAbility.getInstance()); + + // Reach + this.addAbility(ReachAbility.getInstance()); + } + + public SwiftSpinner(final SwiftSpinner card) { + super(card); + } + + @Override + public SwiftSpinner copy() { + return new SwiftSpinner(this); + } +} diff --git a/Mage.Sets/src/mage/sets/eldritchmoon/TangleclawWerewolf.java b/Mage.Sets/src/mage/sets/eldritchmoon/TangleclawWerewolf.java new file mode 100644 index 00000000000..1e5b9ced787 --- /dev/null +++ b/Mage.Sets/src/mage/sets/eldritchmoon/TangleclawWerewolf.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.SimpleActivatedAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.TransformSourceEffect; +import mage.abilities.effects.common.combat.CanBlockAdditionalCreatureEffect; +import mage.abilities.keyword.TransformAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; + +/** + * + * @author LevelX2 + */ +public class TangleclawWerewolf extends CardImpl { + + public TangleclawWerewolf(UUID ownerId) { + super(ownerId, 174, "Tangleclaw Werewolf", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{2}{G}{G}"); + this.expansionSetCode = "EMN"; + this.subtype.add("Werewolf"); + this.subtype.add("Horror"); + this.power = new MageInt(2); + this.toughness = new MageInt(4); + + this.canTransform = true; + this.secondSideCard = new FibrousEntangler(ownerId); + + // Tangleclaw Werewolf can block an additional creature each combat. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CanBlockAdditionalCreatureEffect(Duration.WhileOnBattlefield, 1))); + + // {6}{G}: Transform Tangleclaw Werewolf. + this.addAbility(new TransformAbility()); + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new TransformSourceEffect(true), new ManaCostsImpl<>("{6}{G}"))); + } + + public TangleclawWerewolf(final TangleclawWerewolf card) { + super(card); + } + + @Override + public TangleclawWerewolf copy() { + return new TangleclawWerewolf(this); + } +} diff --git a/Mage.Sets/src/mage/sets/eldritchmoon/WaxingMoon.java b/Mage.Sets/src/mage/sets/eldritchmoon/WaxingMoon.java new file mode 100644 index 00000000000..480cb9fa307 --- /dev/null +++ b/Mage.Sets/src/mage/sets/eldritchmoon/WaxingMoon.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.abilities.effects.common.TransformTargetEffect; +import mage.abilities.effects.common.continuous.GainAbilityAllEffect; +import mage.abilities.keyword.TrampleAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.TargetController; +import mage.filter.common.FilterControlledCreaturePermanent; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.filter.predicate.permanent.ControllerPredicate; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LevelX2 + */ +public class WaxingMoon extends CardImpl { + + private final static FilterCreaturePermanent filter = new FilterCreaturePermanent("Werewolf you control"); + + static { + filter.add(new SubtypePredicate("Werewolf")); + filter.add(new ControllerPredicate(TargetController.YOU)); + } + + public WaxingMoon(UUID ownerId) { + super(ownerId, 177, "Waxing Moon", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{1}{G}"); + this.expansionSetCode = "EMN"; + + // Transform up to one target Werewolf you control. + this.getSpellAbility().addEffect(new TransformTargetEffect(false)); + this.getSpellAbility().addTarget(new TargetCreaturePermanent(0, 1, filter, false)); + // Creatures you control gain trample until end of turn. + this.getSpellAbility().addEffect(new GainAbilityAllEffect(TrampleAbility.getInstance(), Duration.EndOfTurn, new FilterControlledCreaturePermanent(), "Creatures you control gain trample until end of turn")); + } + + public WaxingMoon(final WaxingMoon card) { + super(card); + } + + @Override + public WaxingMoon copy() { + return new WaxingMoon(this); + } +} diff --git a/Mage.Sets/src/mage/sets/eldritchmoon/WoodcuttersGrit.java b/Mage.Sets/src/mage/sets/eldritchmoon/WoodcuttersGrit.java new file mode 100644 index 00000000000..a0709742cde --- /dev/null +++ b/Mage.Sets/src/mage/sets/eldritchmoon/WoodcuttersGrit.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.eldritchmoon; + +import java.util.UUID; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.continuous.BoostTargetEffect; +import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; +import mage.abilities.keyword.HexproofAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.target.common.TargetControlledCreaturePermanent; + +/** + * + * @author LevelX2 + */ +public class WoodcuttersGrit extends CardImpl { + + public WoodcuttersGrit(UUID ownerId) { + super(ownerId, 179, "Woodcutter's Grit", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{2}{G}"); + this.expansionSetCode = "EMN"; + + // Target creature you control gets +3/+3 and gains hexproof until end of turn. (It can't be the target of spells or abilities your opponents control.) + this.getSpellAbility().addTarget(new TargetControlledCreaturePermanent()); + Effect effect = new BoostTargetEffect(3, 3, Duration.EndOfTurn); + effect.setText("Target creature you control gets +3/+3"); + this.getSpellAbility().addEffect(effect); + effect = new GainAbilityTargetEffect(HexproofAbility.getInstance(), Duration.EndOfTurn); + effect.setText("and gains hexproof until end of turn. (It can't be the target of spells or abilities your opponents control.)"); + this.getSpellAbility().addEffect(effect); + } + + public WoodcuttersGrit(final WoodcuttersGrit card) { + super(card); + } + + @Override + public WoodcuttersGrit copy() { + return new WoodcuttersGrit(this); + } +} diff --git a/Mage.Sets/src/mage/sets/eldritchmoon/WoodlandPatrol.java b/Mage.Sets/src/mage/sets/eldritchmoon/WoodlandPatrol.java new file mode 100644 index 00000000000..27b6af10c7e --- /dev/null +++ b/Mage.Sets/src/mage/sets/eldritchmoon/WoodlandPatrol.java @@ -0,0 +1,63 @@ +/* + * 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.VigilanceAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; + +/** + * + * @author LevelX2 + */ +public class WoodlandPatrol extends CardImpl { + + public WoodlandPatrol(UUID ownerId) { + super(ownerId, 180, "Woodland Patrol", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{2}{G}"); + this.expansionSetCode = "EMN"; + this.subtype.add("Human"); + this.subtype.add("Scout"); + this.power = new MageInt(3); + this.toughness = new MageInt(2); + + // Vigilance + this.addAbility(VigilanceAbility.getInstance()); + } + + public WoodlandPatrol(final WoodlandPatrol card) { + super(card); + } + + @Override + public WoodlandPatrol copy() { + return new WoodlandPatrol(this); + } +} diff --git a/Mage.Sets/src/mage/sets/mirrodinbesieged/ViridianEmissary.java b/Mage.Sets/src/mage/sets/mirrodinbesieged/ViridianEmissary.java index 2a8690cbc3f..5a51a2af8a2 100644 --- a/Mage.Sets/src/mage/sets/mirrodinbesieged/ViridianEmissary.java +++ b/Mage.Sets/src/mage/sets/mirrodinbesieged/ViridianEmissary.java @@ -25,16 +25,15 @@ * authors and should not be interpreted as representing official policies, either expressed * or implied, of BetaSteward_at_googlemail.com. */ - package mage.sets.mirrodinbesieged; import java.util.UUID; -import mage.constants.CardType; -import mage.constants.Rarity; import mage.MageInt; import mage.abilities.common.DiesTriggeredAbility; import mage.abilities.effects.common.search.SearchLibraryPutInPlayEffect; import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; import mage.filter.common.FilterBasicLandCard; import mage.target.common.TargetCardInLibrary; @@ -44,7 +43,7 @@ import mage.target.common.TargetCardInLibrary; */ public class ViridianEmissary extends CardImpl { - public ViridianEmissary (UUID ownerId) { + public ViridianEmissary(UUID ownerId) { super(ownerId, 95, "Viridian Emissary", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{1}{G}"); this.expansionSetCode = "MBS"; this.subtype.add("Elf"); @@ -52,10 +51,12 @@ public class ViridianEmissary extends CardImpl { this.power = new MageInt(2); this.toughness = new MageInt(1); + + // When Viridian Emissary dies, you may search your library for a basic land card, put it onto the battlefield tapped, then shuffle your library. this.addAbility(new DiesTriggeredAbility(new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(new FilterBasicLandCard()), true), true)); } - public ViridianEmissary (final ViridianEmissary card) { + public ViridianEmissary(final ViridianEmissary card) { super(card); } diff --git a/Mage/src/main/java/mage/abilities/effects/common/TransformSourceEffect.java b/Mage/src/main/java/mage/abilities/effects/common/TransformSourceEffect.java index 9ac6c1405f9..8102c8bf935 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/TransformSourceEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/TransformSourceEffect.java @@ -33,7 +33,6 @@ import mage.constants.Outcome; import mage.game.Game; import mage.game.permanent.Permanent; import mage.game.permanent.PermanentCard; -import org.apache.log4j.Logger; /** * @@ -41,8 +40,6 @@ import org.apache.log4j.Logger; */ public class TransformSourceEffect extends OneShotEffect { - private static final Logger logger = Logger.getLogger(TransformSourceEffect.class); - private boolean withoutTrigger; private boolean fromDayToNight; diff --git a/Mage/src/main/java/mage/abilities/effects/common/TransformTargetEffect.java b/Mage/src/main/java/mage/abilities/effects/common/TransformTargetEffect.java new file mode 100644 index 00000000000..450abd84355 --- /dev/null +++ b/Mage/src/main/java/mage/abilities/effects/common/TransformTargetEffect.java @@ -0,0 +1,91 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package mage.abilities.effects.common; + +import mage.abilities.Ability; +import mage.abilities.Mode; +import mage.abilities.effects.OneShotEffect; +import mage.constants.Outcome; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.game.permanent.PermanentCard; +import mage.target.Target; +import mage.util.CardUtil; + +/** + * + * @author LevelX2 + */ +public class TransformTargetEffect extends OneShotEffect { + + private boolean withoutTrigger; + + public TransformTargetEffect() { + this(true); + } + + public TransformTargetEffect(boolean withoutTrigger) { + super(Outcome.Transform); + this.withoutTrigger = withoutTrigger; + } + + public TransformTargetEffect(final TransformTargetEffect effect) { + super(effect); + this.withoutTrigger = effect.withoutTrigger; + } + + @Override + public TransformTargetEffect copy() { + return new TransformTargetEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Permanent permanent = game.getPermanent(getTargetPointer().getFirst(game, source)); + if (permanent != null) { + if (permanent.canTransform(game)) { + // check not to transform twice the same side + if (withoutTrigger) { + permanent.setTransformed(!permanent.isTransformed()); + } else { + permanent.transform(game); + } + if (!game.isSimulation()) { + if (permanent.isTransformed()) { + if (permanent.getSecondCardFace() != null) { + if (permanent instanceof PermanentCard) { + game.informPlayers(((PermanentCard) permanent).getCard().getLogName() + " transforms into " + permanent.getSecondCardFace().getLogName()); + } + } + } else { + game.informPlayers(permanent.getSecondCardFace().getLogName() + " transforms into " + permanent.getLogName()); + } + } + } + + return true; + } + return false; + } + + @Override + public String getText(Mode mode) { + if (staticText != null && staticText.length() > 0) { + return staticText; + } + + Target target = mode.getTargets().get(0); + if (target.getMaxNumberOfTargets() > 1) { + if (target.getMaxNumberOfTargets() == target.getNumberOfTargets()) { + return "transform " + CardUtil.numberToText(target.getNumberOfTargets()) + " target " + target.getTargetName(); + } else { + return "transform up to " + CardUtil.numberToText(target.getMaxNumberOfTargets()) + " target " + target.getTargetName(); + } + } else { + return "transform target " + mode.getTargets().get(0).getTargetName(); + } + } +} diff --git a/Mage/src/main/java/mage/abilities/effects/common/combat/CanBlockAdditionalCreatureEffect.java b/Mage/src/main/java/mage/abilities/effects/common/combat/CanBlockAdditionalCreatureEffect.java index a425e53a6c4..f10d6d0305f 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/combat/CanBlockAdditionalCreatureEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/combat/CanBlockAdditionalCreatureEffect.java @@ -41,7 +41,6 @@ import mage.util.CardUtil; * * @author LevelX2 */ - public class CanBlockAdditionalCreatureEffect extends ContinuousEffectImpl { protected int amount; @@ -97,16 +96,19 @@ public class CanBlockAdditionalCreatureEffect extends ContinuousEffectImpl { private String setText() { String text = "{this} can block "; - switch(amount) { + switch (amount) { case 0: text += "any number of creatures"; break; default: text += CardUtil.numberToText(amount, "an") + " additional creature" + (amount > 1 ? "s" : ""); } - if(duration == Duration.EndOfTurn) { + if (duration.equals(Duration.EndOfTurn)) { text += " this turn"; } + if (duration.equals(Duration.WhileOnBattlefield)) { + text += " each combat"; + } return text; } diff --git a/Mage/src/main/java/mage/abilities/effects/common/combat/MustBeBlockedByAtLeastOneSourceEffect.java b/Mage/src/main/java/mage/abilities/effects/common/combat/MustBeBlockedByAtLeastOneSourceEffect.java index 929b4cc03e0..f150a28cd08 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/combat/MustBeBlockedByAtLeastOneSourceEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/combat/MustBeBlockedByAtLeastOneSourceEffect.java @@ -25,7 +25,6 @@ * authors and should not be interpreted as representing official policies, either expressed * or implied, of BetaSteward_at_googlemail.com. */ - package mage.abilities.effects.common.combat; import java.util.UUID; @@ -35,32 +34,29 @@ import mage.constants.Duration; import mage.game.Game; import mage.game.permanent.Permanent; - /** * http://tappedout.net/mtg-questions/must-be-blocked-if-able-effect-makes-other-attacking-creatures-essentially-unblockable/ * - * When you Declare Blockers, you choose an arrangement for your blockers, - * then check to see if there are any restrictions or requirements. + * When you Declare Blockers, you choose an arrangement for your blockers, then + * check to see if there are any restrictions or requirements. * - * If any restrictions are violated, the block is illegal. (For example, - * trying to block with Sightless Ghoul) - * If any requirements are violated, the least possible number of requirements - * must be violated, otherwise the block is illegal. (For example, your opponent - * control two creatures that he has cast Deadly Allure on, but you control only - * one creature. Blocking either one will violate a requirement, "This creature - * must be blocked this turn if able", but it will also violate the least - * possible number of requirements, thus it is legal.) - * If the block is illegal, the game state backs up and you declare blockers - * again. (Note that while you can, in some cases, circumvent requirements - * such as "This creature must be blocked" or "This creature must block - * any attacking creature" you can never circumvent restrictions: "This creature - * can't block" or "Only one creature may block this turn.") - * Because you declare ALL your blockers at once, THEN check for - * restrictions/requirements, you may block Deadly Allure'd creatures - * with only one creature, if you choose. - * This still works with Lure: This card sets up a requirement that ALL - * creatures must block it if able. Any block that violates more than - * the minimum number of requirements is still illegal. + * If any restrictions are violated, the block is illegal. (For example, trying + * to block with Sightless Ghoul) If any requirements are violated, the least + * possible number of requirements must be violated, otherwise the block is + * illegal. (For example, your opponent control two creatures that he has cast + * Deadly Allure on, but you control only one creature. Blocking either one will + * violate a requirement, "This creature must be blocked this turn if able", but + * it will also violate the least possible number of requirements, thus it is + * legal.) If the block is illegal, the game state backs up and you declare + * blockers again. (Note that while you can, in some cases, circumvent + * requirements such as "This creature must be blocked" or "This creature must + * block any attacking creature" you can never circumvent restrictions: "This + * creature can't block" or "Only one creature may block this turn.") Because + * you declare ALL your blockers at once, THEN check for + * restrictions/requirements, you may block Deadly Allure'd creatures with only + * one creature, if you choose. This still works with Lure: This card sets up a + * requirement that ALL creatures must block it if able. Any block that violates + * more than the minimum number of requirements is still illegal. * * @author LevelX2 */ @@ -72,7 +68,7 @@ public class MustBeBlockedByAtLeastOneSourceEffect extends RequirementEffect { public MustBeBlockedByAtLeastOneSourceEffect(Duration duration) { super(duration); - staticText = "{this} must be blocked this turn if able"; + staticText = "{this} must be blocked " + (duration.equals(Duration.EndOfTurn) ? "this turn " : "") + "if able"; } public MustBeBlockedByAtLeastOneSourceEffect(final MustBeBlockedByAtLeastOneSourceEffect effect) {