diff --git a/Mage.Sets/src/mage/sets/betrayersofkamigawa/KamiOfFalseHope.java b/Mage.Sets/src/mage/sets/betrayersofkamigawa/KamiOfFalseHope.java
index 073a038a16..fc75cc5949 100644
--- a/Mage.Sets/src/mage/sets/betrayersofkamigawa/KamiOfFalseHope.java
+++ b/Mage.Sets/src/mage/sets/betrayersofkamigawa/KamiOfFalseHope.java
@@ -36,7 +36,7 @@ import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.SacrificeSourceCost;
-import mage.abilities.effects.common.PreventAllDamageByAllEffect;
+import mage.abilities.effects.common.PreventAllDamageByAllPermanentsEffect;
import mage.cards.CardImpl;
import mage.constants.Duration;
@@ -55,7 +55,7 @@ public class KamiOfFalseHope extends CardImpl {
this.toughness = new MageInt(1);
// Sacrifice Kami of False Hope: Prevent all combat damage that would be dealt this turn.
- Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new PreventAllDamageByAllEffect(Duration.EndOfTurn, true), new SacrificeSourceCost());
+ Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new PreventAllDamageByAllPermanentsEffect(Duration.EndOfTurn, true), new SacrificeSourceCost());
this.addAbility(ability);
}
diff --git a/Mage.Sets/src/mage/sets/championsofkamigawa/EtherealHaze.java b/Mage.Sets/src/mage/sets/championsofkamigawa/EtherealHaze.java
index 308de9cef8..7e064eae6f 100644
--- a/Mage.Sets/src/mage/sets/championsofkamigawa/EtherealHaze.java
+++ b/Mage.Sets/src/mage/sets/championsofkamigawa/EtherealHaze.java
@@ -32,7 +32,7 @@ import java.util.UUID;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Rarity;
-import mage.abilities.effects.common.PreventAllDamageByAllEffect;
+import mage.abilities.effects.common.PreventAllDamageByAllPermanentsEffect;
import mage.cards.CardImpl;
import mage.filter.common.FilterCreaturePermanent;
@@ -48,7 +48,7 @@ public class EtherealHaze extends CardImpl {
this.subtype.add("Arcane");
// Prevent all damage that would be dealt by creatures this turn.
- this.getSpellAbility().addEffect(new PreventAllDamageByAllEffect(new FilterCreaturePermanent("creatures"), Duration.EndOfTurn, false));
+ this.getSpellAbility().addEffect(new PreventAllDamageByAllPermanentsEffect(new FilterCreaturePermanent("creatures"), Duration.EndOfTurn, false));
}
diff --git a/Mage.Sets/src/mage/sets/commander/PollenLullaby.java b/Mage.Sets/src/mage/sets/commander/PollenLullaby.java
index 64c9c0b625..8d5616e0d6 100644
--- a/Mage.Sets/src/mage/sets/commander/PollenLullaby.java
+++ b/Mage.Sets/src/mage/sets/commander/PollenLullaby.java
@@ -35,7 +35,7 @@ import mage.abilities.effects.ContinuousEffect;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.DoIfClashWonEffect;
import mage.abilities.effects.common.DontUntapInControllersNextUntapStepTargetEffect;
-import mage.abilities.effects.common.PreventAllDamageByAllEffect;
+import mage.abilities.effects.common.PreventAllDamageByAllPermanentsEffect;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Duration;
@@ -58,7 +58,7 @@ public class PollenLullaby extends CardImpl {
this.expansionSetCode = "CMD";
// Prevent all combat damage that would be dealt this turn. Clash with an opponent. If you win, creatures that player controls don't untap during the player's next untap step.
- this.getSpellAbility().addEffect(new PreventAllDamageByAllEffect(Duration.EndOfTurn, true));
+ this.getSpellAbility().addEffect(new PreventAllDamageByAllPermanentsEffect(Duration.EndOfTurn, true));
this.getSpellAbility().addEffect(new DoIfClashWonEffect(new PollenLullabyEffect(), true, null));
}
diff --git a/Mage.Sets/src/mage/sets/commander2015/Arachnogenesis.java b/Mage.Sets/src/mage/sets/commander2015/Arachnogenesis.java
index 3f500fc132..d8acafa654 100644
--- a/Mage.Sets/src/mage/sets/commander2015/Arachnogenesis.java
+++ b/Mage.Sets/src/mage/sets/commander2015/Arachnogenesis.java
@@ -32,7 +32,7 @@ import mage.abilities.Ability;
import mage.abilities.dynamicvalue.DynamicValue;
import mage.abilities.effects.Effect;
import mage.abilities.effects.common.CreateTokenEffect;
-import mage.abilities.effects.common.PreventAllDamageByAllEffect;
+import mage.abilities.effects.common.PreventAllDamageByAllPermanentsEffect;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Duration;
@@ -66,7 +66,7 @@ public class Arachnogenesis extends CardImpl {
this.getSpellAbility().addEffect(effect);
// Prevent all combat damage that would be dealt this turn by non-Spider creatures.
- this.getSpellAbility().addEffect(new PreventAllDamageByAllEffect(filter, Duration.EndOfTurn, true));
+ this.getSpellAbility().addEffect(new PreventAllDamageByAllPermanentsEffect(filter, Duration.EndOfTurn, true));
}
public Arachnogenesis(final Arachnogenesis card) {
diff --git a/Mage.Sets/src/mage/sets/darkascension/ClingingMists.java b/Mage.Sets/src/mage/sets/darkascension/ClingingMists.java
index dc58486637..9d6b0a33af 100644
--- a/Mage.Sets/src/mage/sets/darkascension/ClingingMists.java
+++ b/Mage.Sets/src/mage/sets/darkascension/ClingingMists.java
@@ -36,7 +36,7 @@ import mage.abilities.decorator.ConditionalOneShotEffect;
import mage.abilities.effects.ContinuousEffect;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.DontUntapInControllersNextUntapStepTargetEffect;
-import mage.abilities.effects.common.PreventAllDamageByAllEffect;
+import mage.abilities.effects.common.PreventAllDamageByAllPermanentsEffect;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Duration;
@@ -58,7 +58,7 @@ public class ClingingMists extends CardImpl {
this.expansionSetCode = "DKA";
// Prevent all combat damage that would be dealt this turn.
- this.getSpellAbility().addEffect(new PreventAllDamageByAllEffect(null, Duration.EndOfTurn, true));
+ this.getSpellAbility().addEffect(new PreventAllDamageByAllPermanentsEffect(null, Duration.EndOfTurn, true));
// Fateful hour - If you have 5 or less life, tap all attacking creatures. Those creatures don't untap during their controller's next untap step.
this.getSpellAbility().addEffect(new ConditionalOneShotEffect(new ClingingMistsEffect(),
diff --git a/Mage.Sets/src/mage/sets/dragonsoftarkir/RevealingWind.java b/Mage.Sets/src/mage/sets/dragonsoftarkir/RevealingWind.java
index fe833d671e..061693d1e9 100644
--- a/Mage.Sets/src/mage/sets/dragonsoftarkir/RevealingWind.java
+++ b/Mage.Sets/src/mage/sets/dragonsoftarkir/RevealingWind.java
@@ -31,7 +31,7 @@ import java.util.UUID;
import mage.MageObject;
import mage.abilities.Ability;
import mage.abilities.effects.OneShotEffect;
-import mage.abilities.effects.common.PreventAllDamageByAllEffect;
+import mage.abilities.effects.common.PreventAllDamageByAllPermanentsEffect;
import mage.cards.Card;
import mage.cards.CardImpl;
import mage.cards.Cards;
@@ -59,7 +59,7 @@ public class RevealingWind extends CardImpl {
this.expansionSetCode = "DTK";
// Prevent all combat damage that would be dealt this turn. You may look at each face-down creature that's attacking or blocking.
- this.getSpellAbility().addEffect(new PreventAllDamageByAllEffect(Duration.EndOfTurn, true));
+ this.getSpellAbility().addEffect(new PreventAllDamageByAllPermanentsEffect(Duration.EndOfTurn, true));
this.getSpellAbility().addEffect(new RevealingWindEffect());
}
diff --git a/Mage.Sets/src/mage/sets/eldritchmoon/BorrowedGrace.java b/Mage.Sets/src/mage/sets/eldritchmoon/BorrowedGrace.java
new file mode 100644
index 0000000000..7b401c432b
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/eldritchmoon/BorrowedGrace.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.abilities.Mode;
+import mage.abilities.costs.mana.ManaCostsImpl;
+import mage.abilities.effects.common.continuous.BoostControlledEffect;
+import mage.abilities.keyword.EscalateAbility;
+import mage.cards.CardImpl;
+import mage.constants.CardType;
+import mage.constants.Duration;
+import mage.constants.Rarity;
+
+/**
+ *
+ * @author LevelX2
+ */
+public class BorrowedGrace extends CardImpl {
+
+ public BorrowedGrace(UUID ownerId) {
+ super(ownerId, 14, "Borrowed Grace", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{2}{W}");
+ this.expansionSetCode = "EMN";
+
+ // Escalate {1}{W}
+ this.addAbility(new EscalateAbility(new ManaCostsImpl<>("{1}{W}")));
+
+ // Choose one or both —
+ this.getSpellAbility().getModes().setMinModes(1);
+ this.getSpellAbility().getModes().setMaxModes(2);
+
+ // Creatures you control get +2/+0 until end of turn.;
+ this.getSpellAbility().addEffect(new BoostControlledEffect(2, 0, Duration.EndOfTurn));
+
+ // Creatures you control get +0/+2 until end of turn.
+ Mode mode = new Mode();
+ mode.getEffects().add(new BoostControlledEffect(0, 2, Duration.EndOfTurn));
+ this.getSpellAbility().addMode(mode);
+ }
+
+ public BorrowedGrace(final BorrowedGrace card) {
+ super(card);
+ }
+
+ @Override
+ public BorrowedGrace copy() {
+ return new BorrowedGrace(this);
+ }
+}
diff --git a/Mage.Sets/src/mage/sets/eldritchmoon/BriselaVoiceOfNightmares.java b/Mage.Sets/src/mage/sets/eldritchmoon/BriselaVoiceOfNightmares.java
new file mode 100644
index 0000000000..bb0f475e3e
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/eldritchmoon/BriselaVoiceOfNightmares.java
@@ -0,0 +1,133 @@
+/*
+ * 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.MageObject;
+import mage.abilities.Ability;
+import mage.abilities.common.SimpleStaticAbility;
+import mage.abilities.effects.ContinuousRuleModifyingEffectImpl;
+import mage.abilities.keyword.FirstStrikeAbility;
+import mage.abilities.keyword.FlyingAbility;
+import mage.abilities.keyword.LifelinkAbility;
+import mage.abilities.keyword.VigilanceAbility;
+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.game.Game;
+import mage.game.events.GameEvent;
+import mage.game.events.GameEvent.EventType;
+import mage.game.stack.Spell;
+
+/**
+ *
+ * @author LevelX2
+ */
+public class BriselaVoiceOfNightmares extends CardImpl {
+
+ public BriselaVoiceOfNightmares(UUID ownerId) {
+ super(ownerId, 15, "Brisela, Voice of Nightmares", Rarity.MYTHIC, new CardType[]{CardType.CREATURE}, "");
+ this.expansionSetCode = "EMN";
+ this.supertype.add("Legendary");
+ this.subtype.add("Eldrazi");
+ this.subtype.add("Angel");
+ this.power = new MageInt(9);
+ this.toughness = new MageInt(10);
+
+ // Flying
+ this.addAbility(FlyingAbility.getInstance());
+ // First strike
+ this.addAbility(FirstStrikeAbility.getInstance());
+ // Vigilance
+ this.addAbility(VigilanceAbility.getInstance());
+ // Lifelink
+ this.addAbility(LifelinkAbility.getInstance());
+ // Your opponents can't cast spells with converted mana cost 3 or less.
+ this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BriselaVoiceOfNightmaresCantCastEffect()));
+ }
+
+ public BriselaVoiceOfNightmares(final BriselaVoiceOfNightmares card) {
+ super(card);
+ }
+
+ @Override
+ public BriselaVoiceOfNightmares copy() {
+ return new BriselaVoiceOfNightmares(this);
+ }
+}
+
+class BriselaVoiceOfNightmaresCantCastEffect extends ContinuousRuleModifyingEffectImpl {
+
+ public BriselaVoiceOfNightmaresCantCastEffect() {
+ super(Duration.WhileOnBattlefield, Outcome.Benefit);
+ staticText = "Your opponents can't cast spells with converted mana cost 3 or less";
+ }
+
+ public BriselaVoiceOfNightmaresCantCastEffect(final BriselaVoiceOfNightmaresCantCastEffect effect) {
+ super(effect);
+ }
+
+ @Override
+ public BriselaVoiceOfNightmaresCantCastEffect copy() {
+ return new BriselaVoiceOfNightmaresCantCastEffect(this);
+ }
+
+ @Override
+ public boolean apply(Game game, Ability source) {
+ return true;
+ }
+
+ @Override
+ public String getInfoMessage(Ability source, GameEvent event, Game game) {
+ MageObject mageObject = game.getObject(source.getSourceId());
+ if (mageObject != null) {
+ return "You can't cast spells with converted mana cost 3 or less (" + mageObject.getIdName() + ").";
+ }
+ return null;
+ }
+
+ @Override
+ public boolean checksEventType(GameEvent event, Game game) {
+ return event.getType() == EventType.CAST_SPELL_LATE;
+ }
+
+ @Override
+ public boolean applies(GameEvent event, Ability source, Game game) {
+ if (game.getOpponents(source.getControllerId()).contains(event.getPlayerId())) {
+ Spell spell = game.getStack().getSpell(event.getTargetId());
+ if (spell != null) {
+ return spell.getConvertedManaCost() < 4;
+ }
+ }
+ return false;
+ }
+}
diff --git a/Mage.Sets/src/mage/sets/eldritchmoon/ChokingRestraints.java b/Mage.Sets/src/mage/sets/eldritchmoon/ChokingRestraints.java
new file mode 100644
index 0000000000..e476bebd97
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/eldritchmoon/ChokingRestraints.java
@@ -0,0 +1,117 @@
+/*
+ * 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.SimpleActivatedAbility;
+import mage.abilities.common.SimpleStaticAbility;
+import mage.abilities.costs.common.SacrificeSourceCost;
+import mage.abilities.costs.mana.ManaCostsImpl;
+import mage.abilities.effects.OneShotEffect;
+import mage.abilities.effects.common.AttachEffect;
+import mage.abilities.effects.common.combat.CantAttackBlockAttachedEffect;
+import mage.abilities.keyword.EnchantAbility;
+import mage.cards.CardImpl;
+import mage.constants.AttachmentType;
+import mage.constants.CardType;
+import mage.constants.Outcome;
+import mage.constants.Rarity;
+import mage.constants.Zone;
+import mage.game.Game;
+import mage.game.permanent.Permanent;
+import mage.players.Player;
+import mage.target.TargetPermanent;
+import mage.target.common.TargetCreaturePermanent;
+
+/**
+ *
+ * @author LevelX2
+ */
+public class ChokingRestraints extends CardImpl {
+
+ public ChokingRestraints(UUID ownerId) {
+ super(ownerId, 16, "Choking Restraints", Rarity.COMMON, new CardType[]{CardType.ENCHANTMENT}, "{2}{W}");
+ this.expansionSetCode = "EMN";
+ this.subtype.add("Aura");
+
+ // Enchant creature
+ TargetPermanent auraTarget = new TargetCreaturePermanent();
+ this.getSpellAbility().addTarget(auraTarget);
+ this.getSpellAbility().addEffect(new AttachEffect(Outcome.Removal));
+ Ability ability = new EnchantAbility(auraTarget.getTargetName());
+ this.addAbility(ability);
+ // Enchanted creature can't attack or block
+ this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CantAttackBlockAttachedEffect(AttachmentType.AURA)));
+
+ // {3}{W}{W}, Sacrifice Choking Restraints: Exile enchanted creature.
+ ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ChokingRestraintsEffect(), new ManaCostsImpl<>("{3}{W}{W}"));
+ ability.addCost(new SacrificeSourceCost());
+ this.addAbility(ability);
+
+ }
+
+ public ChokingRestraints(final ChokingRestraints card) {
+ super(card);
+ }
+
+ @Override
+ public ChokingRestraints copy() {
+ return new ChokingRestraints(this);
+ }
+}
+
+class ChokingRestraintsEffect extends OneShotEffect {
+
+ ChokingRestraintsEffect() {
+ super(Outcome.Exile);
+ staticText = "Exile enchanted creature";
+ }
+
+ ChokingRestraintsEffect(final ChokingRestraintsEffect effect) {
+ super(effect);
+ }
+
+ @Override
+ public ChokingRestraintsEffect copy() {
+ return new ChokingRestraintsEffect(this);
+ }
+
+ @Override
+ public boolean apply(Game game, Ability source) {
+ Player controller = game.getPlayer(source.getControllerId());
+ Permanent enchantment = game.getPermanentOrLKIBattlefield(source.getSourceId());
+ if (controller != null && enchantment != null && enchantment.getAttachedTo() != null) {
+ Permanent creature = game.getPermanent(enchantment.getAttachedTo());
+ if (creature != null) {
+ controller.moveCardsToExile(creature, source, game, true, null, "");
+ }
+ }
+ return false;
+ }
+}
diff --git a/Mage.Sets/src/mage/sets/eldritchmoon/DesperateSentry.java b/Mage.Sets/src/mage/sets/eldritchmoon/DesperateSentry.java
new file mode 100644
index 0000000000..8287627984
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/eldritchmoon/DesperateSentry.java
@@ -0,0 +1,78 @@
+/*
+ * 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.DiesTriggeredAbility;
+import mage.abilities.common.SimpleStaticAbility;
+import mage.abilities.condition.common.DeliriumCondition;
+import mage.abilities.decorator.ConditionalContinuousEffect;
+import mage.abilities.effects.common.CreateTokenEffect;
+import mage.abilities.effects.common.continuous.BoostSourceEffect;
+import mage.cards.CardImpl;
+import mage.constants.CardType;
+import mage.constants.Duration;
+import mage.constants.Rarity;
+import mage.constants.Zone;
+
+/**
+ *
+ * @author LevelX2
+ */
+public class DesperateSentry extends CardImpl {
+
+ public DesperateSentry(UUID ownerId) {
+ super(ownerId, 21, "Desperate Sentry", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{2}{W}");
+ this.expansionSetCode = "EMN";
+ this.subtype.add("Human");
+ this.subtype.add("Soldier");
+ this.power = new MageInt(1);
+ this.toughness = new MageInt(2);
+
+ // When Desperate Sentry dies, put a 3/2 colorless Eldrazi Horror creature token onto the battlefield.
+ this.addAbility(new DiesTriggeredAbility(new CreateTokenEffect(new EldraziHorrorToken()), false));
+
+ // Delirium — Desperate Sentry gets +3/+0 as long as there are four or more card types among cards in your graveyard.
+ ConditionalContinuousEffect effect = new ConditionalContinuousEffect(
+ new BoostSourceEffect(3, 0, Duration.WhileOnBattlefield), DeliriumCondition.getInstance(),
+ "Delirium — {this} gets +3/+0 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 DesperateSentry(final DesperateSentry card) {
+ super(card);
+ }
+
+ @Override
+ public DesperateSentry copy() {
+ return new DesperateSentry(this);
+ }
+}
diff --git a/Mage.Sets/src/mage/sets/eldritchmoon/DrogskolShieldmate.java b/Mage.Sets/src/mage/sets/eldritchmoon/DrogskolShieldmate.java
new file mode 100644
index 0000000000..3e6696aebf
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/eldritchmoon/DrogskolShieldmate.java
@@ -0,0 +1,70 @@
+/*
+ * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, are
+ * permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this list of
+ * conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice, this list
+ * of conditions and the following disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * The views and conclusions contained in the software and documentation are those of the
+ * authors and should not be interpreted as representing official policies, either expressed
+ * or implied, of BetaSteward_at_googlemail.com.
+ */
+package mage.sets.eldritchmoon;
+
+import java.util.UUID;
+import mage.MageInt;
+import mage.abilities.common.EntersBattlefieldTriggeredAbility;
+import mage.abilities.effects.common.continuous.BoostControlledEffect;
+import mage.abilities.keyword.FlashAbility;
+import mage.cards.CardImpl;
+import mage.constants.CardType;
+import mage.constants.Duration;
+import mage.constants.Rarity;
+import mage.filter.common.FilterCreaturePermanent;
+
+/**
+ *
+ * @author LevelX2
+ */
+public class DrogskolShieldmate extends CardImpl {
+
+ public DrogskolShieldmate(UUID ownerId) {
+ super(ownerId, 22, "Drogskol Shieldmate", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{2}{W}");
+ this.expansionSetCode = "EMN";
+ this.subtype.add("Spirit");
+ this.subtype.add("Soldier");
+ this.power = new MageInt(2);
+ this.toughness = new MageInt(3);
+
+ // Flash
+ this.addAbility(FlashAbility.getInstance());
+
+ // When Drogskol Shieldmate enters the battlefield, other creatures you control get +0/+1 until end of turn.
+ this.addAbility(new EntersBattlefieldTriggeredAbility(new BoostControlledEffect(0, 1, Duration.EndOfTurn, new FilterCreaturePermanent(), true), false));
+ }
+
+ public DrogskolShieldmate(final DrogskolShieldmate card) {
+ super(card);
+ }
+
+ @Override
+ public DrogskolShieldmate copy() {
+ return new DrogskolShieldmate(this);
+ }
+}
diff --git a/Mage.Sets/src/mage/sets/eldritchmoon/ExtricatorOfFlesh.java b/Mage.Sets/src/mage/sets/eldritchmoon/ExtricatorOfFlesh.java
new file mode 100644
index 0000000000..dbf0ba4b8c
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/eldritchmoon/ExtricatorOfFlesh.java
@@ -0,0 +1,93 @@
+/*
+ * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, are
+ * permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this list of
+ * conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice, this list
+ * of conditions and the following disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * The views and conclusions contained in the software and documentation are those of the
+ * authors and should not be interpreted as representing official policies, either expressed
+ * or implied, of BetaSteward_at_googlemail.com.
+ */
+package mage.sets.eldritchmoon;
+
+import java.util.UUID;
+import mage.MageInt;
+import mage.abilities.Ability;
+import mage.abilities.common.SimpleActivatedAbility;
+import mage.abilities.common.SimpleStaticAbility;
+import mage.abilities.costs.common.SacrificeTargetCost;
+import mage.abilities.costs.common.TapSourceCost;
+import mage.abilities.costs.mana.GenericManaCost;
+import mage.abilities.effects.common.CreateTokenEffect;
+import mage.abilities.effects.common.continuous.GainAbilityControlledEffect;
+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;
+import mage.filter.common.FilterControlledCreaturePermanent;
+import mage.filter.predicate.Predicates;
+import mage.filter.predicate.mageobject.SubtypePredicate;
+import mage.target.common.TargetControlledCreaturePermanent;
+
+/**
+ *
+ * @author LevelX2
+ */
+public class ExtricatorOfFlesh extends CardImpl {
+
+ private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("non-Eldrazi creature");
+
+ static {
+ filter.add(Predicates.not(new SubtypePredicate("Eldrazi")));
+ }
+
+ public ExtricatorOfFlesh(UUID ownerId) {
+ super(ownerId, 23, "Extricator of Flesh", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "");
+ this.expansionSetCode = "EMN";
+ this.subtype.add("Eldrazi");
+ this.subtype.add("Horror");
+ this.power = new MageInt(3);
+ this.toughness = new MageInt(5);
+
+ // this card is the second face of double-faced card
+ this.nightCard = true;
+
+ // Eldrazi you control have vigilance
+ this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityControlledEffect(
+ VigilanceAbility.getInstance(), Duration.WhileOnBattlefield, new FilterControlledCreaturePermanent("Eldrazi", "Eldrazi you control "))));
+
+ // {2}, {T}, Sacrifice a non-Eldrazi creature: Put a 3/2 colorless Eldrazi Horror creature token onto the battlefield.
+ Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CreateTokenEffect(new EldraziHorrorToken()), new GenericManaCost(2));
+ ability.addCost(new TapSourceCost());
+ ability.addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent(1, 1, filter, true)));
+ this.addAbility(ability);
+ }
+
+ public ExtricatorOfFlesh(final ExtricatorOfFlesh card) {
+ super(card);
+ }
+
+ @Override
+ public ExtricatorOfFlesh copy() {
+ return new ExtricatorOfFlesh(this);
+ }
+}
diff --git a/Mage.Sets/src/mage/sets/eldritchmoon/ExtricatorOfSin.java b/Mage.Sets/src/mage/sets/eldritchmoon/ExtricatorOfSin.java
new file mode 100644
index 0000000000..6cf02ecfe8
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/eldritchmoon/ExtricatorOfSin.java
@@ -0,0 +1,94 @@
+/*
+ * 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.BeginningOfUpkeepTriggeredAbility;
+import mage.abilities.common.EntersBattlefieldTriggeredAbility;
+import mage.abilities.condition.common.DeliriumCondition;
+import mage.abilities.costs.common.SacrificeTargetCost;
+import mage.abilities.decorator.ConditionalTriggeredAbility;
+import mage.abilities.effects.common.CreateTokenEffect;
+import mage.abilities.effects.common.DoIfCostPaid;
+import mage.abilities.effects.common.TransformSourceEffect;
+import mage.abilities.keyword.TransformAbility;
+import mage.cards.CardImpl;
+import mage.constants.CardType;
+import mage.constants.Rarity;
+import mage.constants.TargetController;
+import mage.constants.Zone;
+import mage.filter.common.FilterControlledPermanent;
+import mage.filter.predicate.permanent.AnotherPredicate;
+import mage.target.common.TargetControlledPermanent;
+
+/**
+ *
+ * @author LevelX2
+ */
+public class ExtricatorOfSin extends CardImpl {
+
+ private static final FilterControlledPermanent filter = new FilterControlledPermanent("another permanent");
+
+ static {
+ filter.add(new AnotherPredicate());
+ }
+
+ public ExtricatorOfSin(UUID ownerId) {
+ super(ownerId, 23, "Extricator of Sin", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{2}{W}");
+ this.expansionSetCode = "EMN";
+ this.subtype.add("Human");
+ this.subtype.add("Cleric");
+ this.power = new MageInt(0);
+ this.toughness = new MageInt(3);
+
+ this.canTransform = true;
+ this.secondSideCard = new ExtricatorOfFlesh(ownerId);
+
+ // When Extricator of Sin enters the battlefield, you may sacrifice another permanent. If you do, put a 3/2 colorless Eldrazi Horror creature token onto the battlefield.
+ this.addAbility(new EntersBattlefieldTriggeredAbility(new DoIfCostPaid(new CreateTokenEffect(new EldraziHorrorToken()),
+ new SacrificeTargetCost(new TargetControlledPermanent(filter))), false));
+
+ // Delirium — At the beginning of your upkeep, if there are four or more card types among cards in your graveyard, transform Extricator of Sin.
+ this.addAbility(new TransformAbility());
+ this.addAbility(new ConditionalTriggeredAbility(
+ new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, new TransformSourceEffect(true), TargetController.YOU, false),
+ DeliriumCondition.getInstance(),
+ "Delirium — At the beginning of your upkeep, if there are four or more card types among cards in your graveyard, "
+ + " transform {this}."));
+ }
+
+ public ExtricatorOfSin(final ExtricatorOfSin card) {
+ super(card);
+ }
+
+ @Override
+ public ExtricatorOfSin copy() {
+ return new ExtricatorOfSin(this);
+ }
+}
diff --git a/Mage.Sets/src/mage/sets/eldritchmoon/FaithUnbroken.java b/Mage.Sets/src/mage/sets/eldritchmoon/FaithUnbroken.java
new file mode 100644
index 0000000000..e48c072598
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/eldritchmoon/FaithUnbroken.java
@@ -0,0 +1,127 @@
+/*
+ * 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.EntersBattlefieldTriggeredAbility;
+import mage.abilities.common.SimpleStaticAbility;
+import mage.abilities.common.delayed.OnLeaveReturnExiledToBattlefieldAbility;
+import mage.abilities.effects.OneShotEffect;
+import mage.abilities.effects.common.AttachEffect;
+import mage.abilities.effects.common.CreateDelayedTriggeredAbilityEffect;
+import mage.abilities.effects.common.ExileTargetEffect;
+import mage.abilities.effects.common.continuous.BoostEnchantedEffect;
+import mage.abilities.keyword.EnchantAbility;
+import mage.cards.CardImpl;
+import mage.constants.CardType;
+import mage.constants.Duration;
+import mage.constants.Outcome;
+import mage.constants.Rarity;
+import mage.constants.TargetController;
+import mage.constants.Zone;
+import mage.filter.common.FilterCreaturePermanent;
+import mage.filter.predicate.permanent.ControllerPredicate;
+import mage.game.Game;
+import mage.game.permanent.Permanent;
+import mage.target.TargetPermanent;
+import mage.target.common.TargetControlledCreaturePermanent;
+import mage.target.common.TargetCreaturePermanent;
+import mage.util.CardUtil;
+
+/**
+ *
+ * @author LevelX2
+ */
+public class FaithUnbroken extends CardImpl {
+
+ private static final FilterCreaturePermanent filterTarget = new FilterCreaturePermanent("creature an opponent controls");
+
+ static {
+ filterTarget.add(new ControllerPredicate(TargetController.OPPONENT));
+ }
+
+ public FaithUnbroken(UUID ownerId) {
+ super(ownerId, 24, "Faith Unbroken", Rarity.UNCOMMON, new CardType[]{CardType.ENCHANTMENT}, "{3}{W}");
+ this.expansionSetCode = "EMN";
+ this.subtype.add("Aura");
+
+ // Enchant creature you control
+ TargetPermanent auraTarget = new TargetControlledCreaturePermanent();
+ this.getSpellAbility().addTarget(auraTarget);
+ this.getSpellAbility().addEffect(new AttachEffect(Outcome.BoostCreature));
+ Ability ability = new EnchantAbility(auraTarget.getTargetName());
+ this.addAbility(ability);
+
+ // When Faith Unbroken enters the battlefield, exile target creature an opponent controls until Faith Unbroken leaves the battlefield.
+ ability = new EntersBattlefieldTriggeredAbility(new FaithUnbrokenEffect());
+ ability.addTarget(new TargetCreaturePermanent(filterTarget));
+ ability.addEffect(new CreateDelayedTriggeredAbilityEffect(new OnLeaveReturnExiledToBattlefieldAbility()));
+ this.addAbility(ability);
+
+ // Enchanted creature gets +2/+2.
+ this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(2, 2, Duration.WhileOnBattlefield)));
+ }
+
+ public FaithUnbroken(final FaithUnbroken card) {
+ super(card);
+ }
+
+ @Override
+ public FaithUnbroken copy() {
+ return new FaithUnbroken(this);
+ }
+}
+
+class FaithUnbrokenEffect extends OneShotEffect {
+
+ public FaithUnbrokenEffect() {
+ super(Outcome.Benefit);
+ this.staticText = "exile target creature an opponent controls until {this} leaves the battlefield";
+ }
+
+ public FaithUnbrokenEffect(final FaithUnbrokenEffect effect) {
+ super(effect);
+ }
+
+ @Override
+ public FaithUnbrokenEffect copy() {
+ return new FaithUnbrokenEffect(this);
+ }
+
+ @Override
+ public boolean apply(Game game, Ability source) {
+ Permanent permanent = game.getPermanent(source.getSourceId());
+ // If Chained to the Rocks leaves the battlefield before its triggered ability resolves,
+ // the target creature won't be exiled.
+ if (permanent != null) {
+ return new ExileTargetEffect(CardUtil.getCardExileZoneId(game, source), permanent.getIdName()).apply(game, source);
+ }
+ return false;
+ }
+}
diff --git a/Mage.Sets/src/mage/sets/eldritchmoon/FaithbearerPaladin.java b/Mage.Sets/src/mage/sets/eldritchmoon/FaithbearerPaladin.java
new file mode 100644
index 0000000000..481a28d089
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/eldritchmoon/FaithbearerPaladin.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.LifelinkAbility;
+import mage.cards.CardImpl;
+import mage.constants.CardType;
+import mage.constants.Rarity;
+
+/**
+ *
+ * @author LevelX2
+ */
+public class FaithbearerPaladin extends CardImpl {
+
+ public FaithbearerPaladin(UUID ownerId) {
+ super(ownerId, 25, "Faithbearer Paladin", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{4}{W}");
+ this.expansionSetCode = "EMN";
+ this.subtype.add("Human");
+ this.subtype.add("Knight");
+ this.power = new MageInt(3);
+ this.toughness = new MageInt(4);
+
+ // Lifelink
+ this.addAbility(LifelinkAbility.getInstance());
+ }
+
+ public FaithbearerPaladin(final FaithbearerPaladin card) {
+ super(card);
+ }
+
+ @Override
+ public FaithbearerPaladin copy() {
+ return new FaithbearerPaladin(this);
+ }
+}
diff --git a/Mage.Sets/src/mage/sets/eldritchmoon/FiendBinder.java b/Mage.Sets/src/mage/sets/eldritchmoon/FiendBinder.java
new file mode 100644
index 0000000000..f35d885934
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/eldritchmoon/FiendBinder.java
@@ -0,0 +1,87 @@
+/*
+ * 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.AttacksTriggeredAbility;
+import mage.abilities.effects.common.TapTargetEffect;
+import mage.cards.CardImpl;
+import mage.constants.CardType;
+import mage.constants.Rarity;
+import mage.filter.common.FilterCreaturePermanent;
+import mage.filter.predicate.permanent.ControllerIdPredicate;
+import mage.game.Game;
+import mage.target.common.TargetCreaturePermanent;
+
+/**
+ *
+ * @author LevelX2
+ */
+public class FiendBinder extends CardImpl {
+
+ private final UUID originalId;
+
+ public FiendBinder(UUID ownerId) {
+ super(ownerId, 26, "Fiend Binder", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{3}{W}");
+ this.expansionSetCode = "EMN";
+ this.subtype.add("Human");
+ this.subtype.add("Soldier");
+ this.power = new MageInt(3);
+ this.toughness = new MageInt(2);
+
+ // Whenever Fiend Binder attacks, tap target creature defending player controls.
+ Ability ability = new AttacksTriggeredAbility(new TapTargetEffect(), false);
+ ability.addTarget(new TargetCreaturePermanent(new FilterCreaturePermanent("creature defending player controls")));
+ originalId = ability.getOriginalId();
+ this.addAbility(ability);
+ }
+
+ @Override
+ public void adjustTargets(Ability ability, Game game) {
+ if (ability.getOriginalId().equals(originalId)) {
+ ability.getTargets().clear();
+ FilterCreaturePermanent filter = new FilterCreaturePermanent("creature defending player controls");
+ UUID defenderId = game.getCombat().getDefenderId(ability.getSourceId());
+ filter.add(new ControllerIdPredicate(defenderId));
+ TargetCreaturePermanent target = new TargetCreaturePermanent(filter);
+ ability.addTarget(target);
+ }
+ }
+
+ public FiendBinder(final FiendBinder card) {
+ super(card);
+ this.originalId = card.originalId;
+ }
+
+ @Override
+ public FiendBinder copy() {
+ return new FiendBinder(this);
+ }
+}
diff --git a/Mage.Sets/src/mage/sets/eldritchmoon/GeistOfTheLonelyVigil.java b/Mage.Sets/src/mage/sets/eldritchmoon/GeistOfTheLonelyVigil.java
new file mode 100644
index 0000000000..d25cd0addd
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/eldritchmoon/GeistOfTheLonelyVigil.java
@@ -0,0 +1,80 @@
+/*
+ * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, are
+ * permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this list of
+ * conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice, this list
+ * of conditions and the following disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * The views and conclusions contained in the software and documentation are those of the
+ * authors and should not be interpreted as representing official policies, either expressed
+ * or implied, of BetaSteward_at_googlemail.com.
+ */
+package mage.sets.eldritchmoon;
+
+import java.util.UUID;
+import mage.MageInt;
+import mage.abilities.common.SimpleStaticAbility;
+import mage.abilities.condition.common.DeliriumCondition;
+import mage.abilities.decorator.ConditionalAsThoughEffect;
+import mage.abilities.effects.Effect;
+import mage.abilities.effects.common.combat.CanAttackAsThoughItDidntHaveDefenderSourceEffect;
+import mage.abilities.keyword.DefenderAbility;
+import mage.abilities.keyword.FlyingAbility;
+import mage.cards.CardImpl;
+import mage.constants.CardType;
+import mage.constants.Duration;
+import mage.constants.Rarity;
+import mage.constants.Zone;
+
+/**
+ *
+ * @author LevelX2
+ */
+public class GeistOfTheLonelyVigil extends CardImpl {
+
+ public GeistOfTheLonelyVigil(UUID ownerId) {
+ super(ownerId, 27, "Geist of the Lonely Vigil", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{1}{W}");
+ this.expansionSetCode = "EMN";
+ this.subtype.add("Spirit");
+ this.subtype.add("Cleric");
+ this.power = new MageInt(2);
+ this.toughness = new MageInt(3);
+
+ // Defender
+ this.addAbility(DefenderAbility.getInstance());
+ // Flying
+ this.addAbility(FlyingAbility.getInstance());
+
+ // Delirium — Geist of the Lonely Vigil can attack as though it didn't have defender as long as there are four or more card types among cards in your graveyard.
+ Effect effect = new ConditionalAsThoughEffect(
+ new CanAttackAsThoughItDidntHaveDefenderSourceEffect(Duration.WhileOnBattlefield),
+ DeliriumCondition.getInstance());
+ effect.setText("Delirium - {this} can attack as though it didn't have defender as long as there are four or more card types among cards in your graveyard");
+ this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect));
+ }
+
+ public GeistOfTheLonelyVigil(final GeistOfTheLonelyVigil card) {
+ super(card);
+ }
+
+ @Override
+ public GeistOfTheLonelyVigil copy() {
+ return new GeistOfTheLonelyVigil(this);
+ }
+}
diff --git a/Mage.Sets/src/mage/sets/eldritchmoon/GiveNoGround.java b/Mage.Sets/src/mage/sets/eldritchmoon/GiveNoGround.java
new file mode 100644
index 0000000000..6ec98add28
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/eldritchmoon/GiveNoGround.java
@@ -0,0 +1,71 @@
+/*
+ * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, are
+ * permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this list of
+ * conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice, this list
+ * of conditions and the following disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * The views and conclusions contained in the software and documentation are those of the
+ * authors and should not be interpreted as representing official policies, either expressed
+ * or implied, of BetaSteward_at_googlemail.com.
+ */
+package mage.sets.eldritchmoon;
+
+import java.util.UUID;
+import mage.abilities.Ability;
+import mage.abilities.common.SimpleStaticAbility;
+import mage.abilities.effects.Effect;
+import mage.abilities.effects.common.combat.CanBlockAdditionalCreatureEffect;
+import mage.abilities.effects.common.continuous.BoostTargetEffect;
+import mage.abilities.effects.common.continuous.GainAbilityTargetEffect;
+import mage.cards.CardImpl;
+import mage.constants.CardType;
+import mage.constants.Duration;
+import mage.constants.Rarity;
+import mage.constants.Zone;
+import mage.target.common.TargetCreaturePermanent;
+
+/**
+ *
+ * @author LevelX2
+ */
+public class GiveNoGround extends CardImpl {
+
+ public GiveNoGround(UUID ownerId) {
+ super(ownerId, 29, "Give No Ground", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{3}{W}");
+ this.expansionSetCode = "EMN";
+
+ // Target creature gets +2/+6 until end of turn and can block any number of creatures this turn.
+ this.getSpellAbility().addTarget(new TargetCreaturePermanent());
+ this.getSpellAbility().addEffect(new BoostTargetEffect(2, 6, Duration.EndOfTurn));
+ Ability gainedAbility = new SimpleStaticAbility(Zone.BATTLEFIELD, new CanBlockAdditionalCreatureEffect(0));
+ Effect effect = new GainAbilityTargetEffect(gainedAbility, Duration.EndOfTurn);
+ effect.setText("and can block any number of creatures this turn");
+ this.getSpellAbility().addEffect(effect);
+ }
+
+ public GiveNoGround(final GiveNoGround card) {
+ super(card);
+ }
+
+ @Override
+ public GiveNoGround copy() {
+ return new GiveNoGround(this);
+ }
+}
diff --git a/Mage.Sets/src/mage/sets/eldritchmoon/GuardianOfPilgrims.java b/Mage.Sets/src/mage/sets/eldritchmoon/GuardianOfPilgrims.java
new file mode 100644
index 0000000000..822f97cf6b
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/eldritchmoon/GuardianOfPilgrims.java
@@ -0,0 +1,68 @@
+/*
+ * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, are
+ * permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this list of
+ * conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice, this list
+ * of conditions and the following disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * The views and conclusions contained in the software and documentation are those of the
+ * authors and should not be interpreted as representing official policies, either expressed
+ * or implied, of BetaSteward_at_googlemail.com.
+ */
+package mage.sets.eldritchmoon;
+
+import java.util.UUID;
+import mage.MageInt;
+import mage.abilities.common.EntersBattlefieldTriggeredAbility;
+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.target.common.TargetCreaturePermanent;
+
+/**
+ *
+ * @author LevelX2
+ */
+public class GuardianOfPilgrims extends CardImpl {
+
+ public GuardianOfPilgrims(UUID ownerId) {
+ super(ownerId, 30, "Guardian of Pilgrims", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{1}{W}");
+ this.expansionSetCode = "EMN";
+ this.subtype.add("Spirit");
+ this.subtype.add("Cleric");
+ this.power = new MageInt(2);
+ this.toughness = new MageInt(2);
+
+ // When Guardian of Pilgrims enters the battlefield, target creature gets +1/+1 until end of turn.
+ EntersBattlefieldTriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new BoostTargetEffect(1, 1, Duration.EndOfTurn));
+ ability.addTarget(new TargetCreaturePermanent());
+ this.addAbility(ability);
+ }
+
+ public GuardianOfPilgrims(final GuardianOfPilgrims card) {
+ super(card);
+ }
+
+ @Override
+ public GuardianOfPilgrims copy() {
+ return new GuardianOfPilgrims(this);
+ }
+}
diff --git a/Mage.Sets/src/mage/sets/eldritchmoon/IroncladSlayer.java b/Mage.Sets/src/mage/sets/eldritchmoon/IroncladSlayer.java
new file mode 100644
index 0000000000..e4d6f191a1
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/eldritchmoon/IroncladSlayer.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.EntersBattlefieldTriggeredAbility;
+import mage.abilities.effects.common.ReturnToHandTargetEffect;
+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.SubtypePredicate;
+import mage.target.common.TargetCardInYourGraveyard;
+
+/**
+ *
+ * @author LevelX2
+ */
+public class IroncladSlayer extends CardImpl {
+
+ private final static FilterCard filter = new FilterCard("Aura or Equipment card");
+
+ static {
+ filter.add(Predicates.or(new SubtypePredicate("Aura"), new SubtypePredicate("Equipment")));
+ }
+
+ public IroncladSlayer(UUID ownerId) {
+ super(ownerId, 31, "Ironclad Slayer", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{2}{W}");
+ this.expansionSetCode = "EMN";
+ this.subtype.add("Human");
+ this.subtype.add("Warrior");
+ this.power = new MageInt(3);
+ this.toughness = new MageInt(2);
+
+ // When Ironclad Slayer enters the battlefield, you may return target Aura or Equipment card from your graveyard to your hand.
+ Ability ability = new EntersBattlefieldTriggeredAbility(new ReturnToHandTargetEffect(), true);
+ ability.addTarget(new TargetCardInYourGraveyard(filter));
+ this.addAbility(ability);
+ }
+
+ public IroncladSlayer(final IroncladSlayer card) {
+ super(card);
+ }
+
+ @Override
+ public IroncladSlayer copy() {
+ return new IroncladSlayer(this);
+ }
+}
diff --git a/Mage.Sets/src/mage/sets/eldritchmoon/IronwrightsCleansing.java b/Mage.Sets/src/mage/sets/eldritchmoon/IronwrightsCleansing.java
new file mode 100644
index 0000000000..aefe175fae
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/eldritchmoon/IronwrightsCleansing.java
@@ -0,0 +1,72 @@
+/*
+ * 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.ExileTargetEffect;
+import mage.cards.CardImpl;
+import mage.constants.CardType;
+import mage.constants.Rarity;
+import mage.filter.FilterPermanent;
+import mage.filter.predicate.Predicates;
+import mage.filter.predicate.mageobject.CardTypePredicate;
+import mage.target.TargetPermanent;
+
+/**
+ *
+ * @author LevelX2
+ */
+public class IronwrightsCleansing extends CardImpl {
+
+ private static final FilterPermanent filter = new FilterPermanent("artifact or enchantment");
+
+ static {
+ filter.add(Predicates.or(
+ new CardTypePredicate(CardType.ARTIFACT),
+ new CardTypePredicate(CardType.ENCHANTMENT)));
+ }
+
+ public IronwrightsCleansing(UUID ownerId) {
+ super(ownerId, 32, "Ironwright's Cleansing", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{2}{W}");
+ this.expansionSetCode = "EMN";
+
+ // Exile target artifact or enchantment.
+ this.getSpellAbility().addEffect(new ExileTargetEffect());
+ this.getSpellAbility().addTarget(new TargetPermanent(filter));
+
+ }
+
+ public IronwrightsCleansing(final IronwrightsCleansing card) {
+ super(card);
+ }
+
+ @Override
+ public IronwrightsCleansing copy() {
+ return new IronwrightsCleansing(this);
+ }
+}
diff --git a/Mage.Sets/src/mage/sets/eldritchmoon/LunarchMantle.java b/Mage.Sets/src/mage/sets/eldritchmoon/LunarchMantle.java
new file mode 100644
index 0000000000..8cd2cd0198
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/eldritchmoon/LunarchMantle.java
@@ -0,0 +1,90 @@
+/*
+ * 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.SimpleActivatedAbility;
+import mage.abilities.common.SimpleStaticAbility;
+import mage.abilities.costs.common.SacrificeTargetCost;
+import mage.abilities.costs.mana.ManaCostsImpl;
+import mage.abilities.effects.common.AttachEffect;
+import mage.abilities.effects.common.continuous.BoostEnchantedEffect;
+import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect;
+import mage.abilities.effects.common.continuous.GainAbilitySourceEffect;
+import mage.abilities.keyword.EnchantAbility;
+import mage.abilities.keyword.FlyingAbility;
+import mage.cards.CardImpl;
+import mage.constants.AttachmentType;
+import mage.constants.CardType;
+import mage.constants.Duration;
+import mage.constants.Outcome;
+import mage.constants.Rarity;
+import mage.constants.Zone;
+import mage.target.TargetPermanent;
+import mage.target.common.TargetControlledPermanent;
+import mage.target.common.TargetCreaturePermanent;
+
+/**
+ *
+ * @author LevelX2
+ */
+public class LunarchMantle extends CardImpl {
+
+ static final String rule = "and has \"{1}, Sacrifice a permanent: This creature gains flying until end of turn.\"";
+
+ public LunarchMantle(UUID ownerId) {
+ super(ownerId, 35, "Lunarch Mantle", Rarity.COMMON, new CardType[]{CardType.ENCHANTMENT}, "{1}{W}");
+ this.expansionSetCode = "EMN";
+ this.subtype.add("Aura");
+
+ // Enchant creature
+ TargetPermanent auraTarget = new TargetCreaturePermanent();
+ this.getSpellAbility().addTarget(auraTarget);
+ this.getSpellAbility().addEffect(new AttachEffect(Outcome.BoostCreature));
+ Ability ability = new EnchantAbility(auraTarget.getTargetName());
+ this.addAbility(ability);
+
+ // Enchanted creature gets +2/+2 and has "{1}, Sacrifice a permanent: This creature gains flying until end of turn."
+ SimpleStaticAbility ability2 = new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(2, 2, Duration.WhileOnBattlefield));
+ Ability abilityToGain = new SimpleActivatedAbility(Zone.BATTLEFIELD,
+ new GainAbilitySourceEffect(FlyingAbility.getInstance(), Duration.EndOfTurn), new ManaCostsImpl("{1}"));
+ abilityToGain.addCost(new SacrificeTargetCost(new TargetControlledPermanent()));
+ ability2.addEffect(new GainAbilityAttachedEffect(abilityToGain, AttachmentType.AURA, Duration.WhileOnBattlefield, rule));
+ this.addAbility(ability2);
+ }
+
+ public LunarchMantle(final LunarchMantle card) {
+ super(card);
+ }
+
+ @Override
+ public LunarchMantle copy() {
+ return new LunarchMantle(this);
+ }
+}
diff --git a/Mage.Sets/src/mage/sets/eldritchmoon/Providence.java b/Mage.Sets/src/mage/sets/eldritchmoon/Providence.java
new file mode 100644
index 0000000000..72d8302ab8
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/eldritchmoon/Providence.java
@@ -0,0 +1,97 @@
+/*
+ * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, are
+ * permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this list of
+ * conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice, this list
+ * of conditions and the following disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * The views and conclusions contained in the software and documentation are those of the
+ * authors and should not be interpreted as representing official policies, either expressed
+ * or implied, of BetaSteward_at_googlemail.com.
+ */
+package mage.sets.eldritchmoon;
+
+import java.util.UUID;
+import mage.abilities.Ability;
+import mage.abilities.DelayedTriggeredAbility;
+import mage.abilities.common.ChancellorAbility;
+import mage.abilities.effects.common.SetPlayerLifeSourceEffect;
+import mage.cards.CardImpl;
+import mage.constants.CardType;
+import mage.constants.Rarity;
+import mage.game.Game;
+import mage.game.events.GameEvent;
+import mage.game.events.GameEvent.EventType;
+
+/**
+ *
+ * @author LevelX2
+ */
+public class Providence extends CardImpl {
+
+ private static String abilityText = "at the beginning of your first upkeep, your life total becomes 26";
+
+ public Providence(UUID ownerId) {
+ super(ownerId, 37, "Providence", Rarity.RARE, new CardType[]{CardType.SORCERY}, "{5}{W}{W}");
+ this.expansionSetCode = "EMN";
+
+ // You may reveal this card from your opening hand. If you do, at the beginning of your first upkeep, your life total becomes 26.
+ Ability ability = new ChancellorAbility(new ProvidenceDelayedTriggeredAbility(), abilityText);
+ ability.setRuleAtTheTop(true);
+ this.addAbility(ability);
+ // Your life total becomes 26.
+ this.getSpellAbility().addEffect(new SetPlayerLifeSourceEffect(26));
+
+ }
+
+ public Providence(final Providence card) {
+ super(card);
+ }
+
+ @Override
+ public Providence copy() {
+ return new Providence(this);
+ }
+}
+
+class ProvidenceDelayedTriggeredAbility extends DelayedTriggeredAbility {
+
+ ProvidenceDelayedTriggeredAbility() {
+ super(new SetPlayerLifeSourceEffect(26));
+ }
+
+ ProvidenceDelayedTriggeredAbility(ProvidenceDelayedTriggeredAbility ability) {
+ super(ability);
+ }
+
+ @Override
+ public boolean checkEventType(GameEvent event, Game game) {
+ return event.getType() == EventType.UPKEEP_STEP_PRE;
+ }
+
+ @Override
+ public boolean checkTrigger(GameEvent event, Game game) {
+ return game.getActivePlayerId().equals(controllerId);
+ }
+
+ @Override
+ public ProvidenceDelayedTriggeredAbility copy() {
+ return new ProvidenceDelayedTriggeredAbility(this);
+ }
+}
diff --git a/Mage.Sets/src/mage/sets/eldritchmoon/RepelTheAbominable.java b/Mage.Sets/src/mage/sets/eldritchmoon/RepelTheAbominable.java
new file mode 100644
index 0000000000..944bd6a4a9
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/eldritchmoon/RepelTheAbominable.java
@@ -0,0 +1,68 @@
+/*
+ * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, are
+ * permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this list of
+ * conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice, this list
+ * of conditions and the following disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * The views and conclusions contained in the software and documentation are those of the
+ * authors and should not be interpreted as representing official policies, either expressed
+ * or implied, of BetaSteward_at_googlemail.com.
+ */
+package mage.sets.eldritchmoon;
+
+import java.util.UUID;
+import mage.abilities.effects.common.PreventAllDamageByAllObjectsEffect;
+import mage.cards.CardImpl;
+import mage.constants.CardType;
+import mage.constants.Duration;
+import mage.constants.Rarity;
+import mage.filter.FilterObject;
+import mage.filter.predicate.Predicates;
+import mage.filter.predicate.mageobject.SubtypePredicate;
+
+/**
+ *
+ * @author LevelX2
+ */
+public class RepelTheAbominable extends CardImpl {
+
+ private static final FilterObject filter = new FilterObject("non-Human sources");
+
+ static {
+ filter.add(Predicates.not(new SubtypePredicate("Human")));
+ }
+
+ public RepelTheAbominable(UUID ownerId) {
+ super(ownerId, 38, "Repel the Abominable", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{1}{W}");
+ this.expansionSetCode = "EMN";
+
+ // Prevent all damage that would be dealt this turn by non-Human sources.
+ this.getSpellAbility().addEffect(new PreventAllDamageByAllObjectsEffect(filter, Duration.EndOfTurn, false));
+ }
+
+ public RepelTheAbominable(final RepelTheAbominable card) {
+ super(card);
+ }
+
+ @Override
+ public RepelTheAbominable copy() {
+ return new RepelTheAbominable(this);
+ }
+}
diff --git a/Mage.Sets/src/mage/sets/eldritchmoon/SigardasAid.java b/Mage.Sets/src/mage/sets/eldritchmoon/SigardasAid.java
new file mode 100644
index 0000000000..8f794fd858
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/eldritchmoon/SigardasAid.java
@@ -0,0 +1,119 @@
+/*
+ * 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.EntersBattlefieldControlledTriggeredAbility;
+import mage.abilities.common.SimpleStaticAbility;
+import mage.abilities.effects.OneShotEffect;
+import mage.abilities.effects.common.continuous.CastAsThoughItHadFlashAllEffect;
+import mage.cards.CardImpl;
+import mage.constants.CardType;
+import mage.constants.Duration;
+import mage.constants.Outcome;
+import mage.constants.Rarity;
+import mage.constants.SetTargetPointer;
+import mage.constants.Zone;
+import mage.filter.FilterCard;
+import mage.filter.common.FilterArtifactPermanent;
+import mage.filter.predicate.Predicates;
+import mage.filter.predicate.mageobject.SubtypePredicate;
+import mage.game.Game;
+import mage.game.permanent.Permanent;
+import mage.players.Player;
+import mage.target.common.TargetControlledCreaturePermanent;
+
+/**
+ *
+ * @author LevelX2
+ */
+public class SigardasAid extends CardImpl {
+
+ private final static FilterArtifactPermanent filter = new FilterArtifactPermanent("an Equipment");
+ private static final FilterCard filterCard = new FilterCard("Aura and Equipment spells");
+
+ static {
+ filter.add(new SubtypePredicate("Equipment"));
+ filterCard.add(Predicates.or(new SubtypePredicate("Aura"), new SubtypePredicate("Equipment")));
+ }
+
+ public SigardasAid(UUID ownerId) {
+ super(ownerId, 41, "Sigarda's Aid", Rarity.RARE, new CardType[]{CardType.ENCHANTMENT}, "{W}");
+ this.expansionSetCode = "EMN";
+
+ // You may cast Aura and Equipment spells as though they had flash.
+ this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CastAsThoughItHadFlashAllEffect(Duration.WhileOnBattlefield, filterCard, false)));
+
+ // Whenever an Equipment enters the battlefield under your control, you may attach it to target creature you control.
+ Ability ability = new EntersBattlefieldControlledTriggeredAbility(Zone.BATTLEFIELD, new SigardasAidEffect(), filter, true, SetTargetPointer.PERMANENT, "");
+ ability.addTarget(new TargetControlledCreaturePermanent());
+ this.addAbility(ability);
+
+ }
+
+ public SigardasAid(final SigardasAid card) {
+ super(card);
+ }
+
+ @Override
+ public SigardasAid copy() {
+ return new SigardasAid(this);
+ }
+}
+
+class SigardasAidEffect extends OneShotEffect {
+
+ public SigardasAidEffect() {
+ super(Outcome.Benefit);
+ this.staticText = "you may attach it to target creature you control";
+ }
+
+ public SigardasAidEffect(final SigardasAidEffect effect) {
+ super(effect);
+ }
+
+ @Override
+ public SigardasAidEffect copy() {
+ return new SigardasAidEffect(this);
+ }
+
+ @Override
+ public boolean apply(Game game, Ability source) {
+ Player controller = game.getPlayer(source.getControllerId());
+ if (controller != null) {
+ Permanent equipment = game.getPermanent(getTargetPointer().getFirst(game, source));
+ Permanent targetCreature = game.getPermanent(source.getTargets().getFirstTarget());
+ if (equipment != null && targetCreature != null) {
+ targetCreature.addAttachment(equipment.getId(), game);
+ }
+ return true;
+ }
+ return false;
+ }
+}
diff --git a/Mage.Sets/src/mage/sets/eldritchmoon/SigardianPriest.java b/Mage.Sets/src/mage/sets/eldritchmoon/SigardianPriest.java
new file mode 100644
index 0000000000..63fbdac43a
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/eldritchmoon/SigardianPriest.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.GenericManaCost;
+import mage.abilities.effects.common.TapTargetEffect;
+import mage.cards.CardImpl;
+import mage.constants.CardType;
+import mage.constants.Rarity;
+import mage.constants.Zone;
+import mage.filter.common.FilterCreaturePermanent;
+import mage.filter.predicate.Predicates;
+import mage.filter.predicate.mageobject.SubtypePredicate;
+import mage.target.common.TargetCreaturePermanent;
+
+/**
+ *
+ * @author LevelX2
+ */
+public class SigardianPriest extends CardImpl {
+
+ private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("non-Human sources");
+
+ static {
+ filter.add(Predicates.not(new SubtypePredicate("Human")));
+ }
+
+ public SigardianPriest(UUID ownerId) {
+ super(ownerId, 42, "Sigardian Priest", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{1}{W}");
+ this.expansionSetCode = "EMN";
+ this.subtype.add("Human");
+ this.subtype.add("Cleric");
+ this.power = new MageInt(1);
+ this.toughness = new MageInt(2);
+
+ // {1}, {T}: Tap target non-Human creature.
+ Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new TapTargetEffect(), new GenericManaCost(1));
+ ability.addCost(new TapSourceCost());
+ ability.addTarget(new TargetCreaturePermanent(1, 1, filter, false));
+ this.addAbility(ability);
+ }
+
+ public SigardianPriest(final SigardianPriest card) {
+ super(card);
+ }
+
+ @Override
+ public SigardianPriest copy() {
+ return new SigardianPriest(this);
+ }
+}
diff --git a/Mage.Sets/src/mage/sets/eldritchmoon/SpectralReserves.java b/Mage.Sets/src/mage/sets/eldritchmoon/SpectralReserves.java
new file mode 100644
index 0000000000..45420b38a0
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/eldritchmoon/SpectralReserves.java
@@ -0,0 +1,61 @@
+/*
+ * 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.CreateTokenEffect;
+import mage.abilities.effects.common.GainLifeEffect;
+import mage.cards.CardImpl;
+import mage.constants.CardType;
+import mage.constants.Rarity;
+import mage.game.permanent.token.SpiritWhiteToken;
+
+/**
+ *
+ * @author LevelX2
+ */
+public class SpectralReserves extends CardImpl {
+
+ public SpectralReserves(UUID ownerId) {
+ super(ownerId, 43, "Spectral Reserves", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{3}{W}");
+ this.expansionSetCode = "EMN";
+
+ // Put two 1/1 white Spirit creature tokens with flying onto the battlefield. You gain 2 life.
+ this.getSpellAbility().addEffect(new CreateTokenEffect(new SpiritWhiteToken("EMN"), 2));
+ this.getSpellAbility().addEffect(new GainLifeEffect(2));
+ }
+
+ public SpectralReserves(final SpectralReserves card) {
+ super(card);
+ }
+
+ @Override
+ public SpectralReserves copy() {
+ return new SpectralReserves(this);
+ }
+}
diff --git a/Mage.Sets/src/mage/sets/eldritchmoon/SteadfastCathar.java b/Mage.Sets/src/mage/sets/eldritchmoon/SteadfastCathar.java
new file mode 100644
index 0000000000..506f9777f6
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/eldritchmoon/SteadfastCathar.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.MageInt;
+import mage.abilities.common.AttacksTriggeredAbility;
+import mage.abilities.effects.Effect;
+import mage.abilities.effects.common.continuous.BoostSourceEffect;
+import mage.cards.CardImpl;
+import mage.constants.CardType;
+import mage.constants.Duration;
+import mage.constants.Rarity;
+
+/**
+ *
+ * @author LevelX2
+ */
+public class SteadfastCathar extends CardImpl {
+
+ public SteadfastCathar(UUID ownerId) {
+ super(ownerId, 44, "Steadfast Cathar", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{1}{W}");
+ this.expansionSetCode = "EMN";
+ this.subtype.add("Human");
+ this.subtype.add("Soldier");
+ this.power = new MageInt(2);
+ this.toughness = new MageInt(1);
+
+ // Whenever Steadfast Cathar attacks, it gets +0/+2 until end of turn.
+ Effect effect = new BoostSourceEffect(0, 2, Duration.EndOfTurn);
+ effect.setText("it gets +0/+2 until end of turn");
+ this.addAbility(new AttacksTriggeredAbility(effect, false));
+
+ }
+
+ public SteadfastCathar(final SteadfastCathar card) {
+ super(card);
+ }
+
+ @Override
+ public SteadfastCathar copy() {
+ return new SteadfastCathar(this);
+ }
+}
diff --git a/Mage.Sets/src/mage/sets/eldritchmoon/ThrabenStandardBearer.java b/Mage.Sets/src/mage/sets/eldritchmoon/ThrabenStandardBearer.java
new file mode 100644
index 0000000000..374751ad97
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/eldritchmoon/ThrabenStandardBearer.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.Ability;
+import mage.abilities.common.SimpleActivatedAbility;
+import mage.abilities.costs.common.DiscardCardCost;
+import mage.abilities.costs.common.TapSourceCost;
+import mage.abilities.costs.mana.ManaCostsImpl;
+import mage.abilities.effects.common.CreateTokenEffect;
+import mage.cards.CardImpl;
+import mage.constants.CardType;
+import mage.constants.Rarity;
+import mage.constants.Zone;
+import mage.game.permanent.token.SoldierToken;
+
+/**
+ *
+ * @author LevelX2
+ */
+public class ThrabenStandardBearer extends CardImpl {
+
+ public ThrabenStandardBearer(UUID ownerId) {
+ super(ownerId, 48, "Thraben Standard Bearer", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{W}");
+ this.expansionSetCode = "EMN";
+ this.subtype.add("Human");
+ this.subtype.add("Soldier");
+ this.power = new MageInt(1);
+ this.toughness = new MageInt(1);
+
+ // {1}{W}, {T}, Discard a card: Put a 1/1 white Human Soldier creature token onto the battlefield.
+ Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CreateTokenEffect(new SoldierToken()), new ManaCostsImpl<>("{1}{W}"));
+ ability.addCost(new TapSourceCost());
+ ability.addCost(new DiscardCardCost());
+ this.addAbility(ability);
+ }
+
+ public ThrabenStandardBearer(final ThrabenStandardBearer card) {
+ super(card);
+ }
+
+ @Override
+ public ThrabenStandardBearer copy() {
+ return new ThrabenStandardBearer(this);
+ }
+}
diff --git a/Mage.Sets/src/mage/sets/eventide/BatwingBrume.java b/Mage.Sets/src/mage/sets/eventide/BatwingBrume.java
index 5d77673d23..f19dc2b45a 100644
--- a/Mage.Sets/src/mage/sets/eventide/BatwingBrume.java
+++ b/Mage.Sets/src/mage/sets/eventide/BatwingBrume.java
@@ -36,7 +36,7 @@ import mage.abilities.decorator.ConditionalReplacementEffect;
import mage.abilities.effects.Effect;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.InfoEffect;
-import mage.abilities.effects.common.PreventAllDamageByAllEffect;
+import mage.abilities.effects.common.PreventAllDamageByAllPermanentsEffect;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.ColoredManaSymbol;
@@ -61,7 +61,7 @@ public class BatwingBrume extends CardImpl {
// Prevent all combat damage that would be dealt this turn if {W} was spent to cast Batwing Brume. Each player loses 1 life for each attacking creature he or she controls if {B} was spent to cast Batwing Brume.
- Effect effect = new ConditionalReplacementEffect(new PreventAllDamageByAllEffect(Duration.EndOfTurn, true),
+ Effect effect = new ConditionalReplacementEffect(new PreventAllDamageByAllPermanentsEffect(Duration.EndOfTurn, true),
new LockedInCondition(new ManaWasSpentCondition(ColoredManaSymbol.W)));
effect.setText("Prevent all combat damage that would be dealt this turn if {W} was spent to cast {this}");
this.getSpellAbility().addEffect(effect);
diff --git a/Mage.Sets/src/mage/sets/exodus/SpikeWeaver.java b/Mage.Sets/src/mage/sets/exodus/SpikeWeaver.java
index 59caad0021..3e7101e259 100644
--- a/Mage.Sets/src/mage/sets/exodus/SpikeWeaver.java
+++ b/Mage.Sets/src/mage/sets/exodus/SpikeWeaver.java
@@ -37,7 +37,7 @@ import mage.abilities.common.EntersBattlefieldAbility;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.RemoveCountersSourceCost;
import mage.abilities.costs.mana.GenericManaCost;
-import mage.abilities.effects.common.PreventAllDamageByAllEffect;
+import mage.abilities.effects.common.PreventAllDamageByAllPermanentsEffect;
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
import mage.abilities.effects.common.counter.AddCountersTargetEffect;
import mage.cards.CardImpl;
@@ -70,7 +70,7 @@ public class SpikeWeaver extends CardImpl {
this.addAbility(ability);
// {1}, Remove a +1/+1 counter from Spike Weaver: Prevent all combat damage that would be dealt this turn.
- Ability ability2 = new SimpleActivatedAbility(Zone.BATTLEFIELD, new PreventAllDamageByAllEffect(Duration.EndOfTurn, true), new GenericManaCost(1));
+ Ability ability2 = new SimpleActivatedAbility(Zone.BATTLEFIELD, new PreventAllDamageByAllPermanentsEffect(Duration.EndOfTurn, true), new GenericManaCost(1));
ability2.addCost(new RemoveCountersSourceCost(CounterType.P1P1.createInstance()));
this.addAbility(ability2);
}
diff --git a/Mage.Sets/src/mage/sets/fallenempires/SporeFlower.java b/Mage.Sets/src/mage/sets/fallenempires/SporeFlower.java
index adafcc64ef..48cb8be849 100644
--- a/Mage.Sets/src/mage/sets/fallenempires/SporeFlower.java
+++ b/Mage.Sets/src/mage/sets/fallenempires/SporeFlower.java
@@ -32,7 +32,7 @@ import mage.MageInt;
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.RemoveCountersSourceCost;
-import mage.abilities.effects.common.PreventAllDamageByAllEffect;
+import mage.abilities.effects.common.PreventAllDamageByAllPermanentsEffect;
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
import mage.cards.CardImpl;
import mage.constants.CardType;
@@ -60,7 +60,7 @@ public class SporeFlower extends CardImpl {
// Remove three spore counters from Spore Flower: Prevent all combat damage that would be dealt this turn.
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD,
- new PreventAllDamageByAllEffect(Duration.EndOfTurn, true),
+ new PreventAllDamageByAllPermanentsEffect(Duration.EndOfTurn, true),
new RemoveCountersSourceCost(CounterType.SPORE.createInstance(3))));
}
diff --git a/Mage.Sets/src/mage/sets/fatereforged/WindsOfQalSisma.java b/Mage.Sets/src/mage/sets/fatereforged/WindsOfQalSisma.java
index 8b90a36f23..b0ae1350e8 100644
--- a/Mage.Sets/src/mage/sets/fatereforged/WindsOfQalSisma.java
+++ b/Mage.Sets/src/mage/sets/fatereforged/WindsOfQalSisma.java
@@ -32,7 +32,7 @@ import mage.abilities.condition.LockedInCondition;
import mage.abilities.condition.common.FerociousCondition;
import mage.abilities.decorator.ConditionalReplacementEffect;
import mage.abilities.effects.Effect;
-import mage.abilities.effects.common.PreventAllDamageByAllEffect;
+import mage.abilities.effects.common.PreventAllDamageByAllPermanentsEffect;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Duration;
@@ -60,9 +60,9 @@ public class WindsOfQalSisma extends CardImpl {
// Prevent all combat damage that would be dealt this turn.
// Ferocious - If you control a creature with power 4 or greater, instead prevent all combat damage that would be dealt this turn by creatures your opponents control.
Effect effect = new ConditionalReplacementEffect(
- new PreventAllDamageByAllEffect(filter, Duration.EndOfTurn, true),
+ new PreventAllDamageByAllPermanentsEffect(filter, Duration.EndOfTurn, true),
new LockedInCondition(FerociousCondition.getInstance()),
- new PreventAllDamageByAllEffect(Duration.EndOfTurn, true));
+ new PreventAllDamageByAllPermanentsEffect(Duration.EndOfTurn, true));
effect.setText("Prevent all combat damage that would be dealt this turn.
" +
"Ferocious — If you control a creature with power 4 or greater, instead prevent all combat damage that would be dealt this turn by creatures your opponents control");
this.getSpellAbility().addEffect(effect);
diff --git a/Mage.Sets/src/mage/sets/iceage/GlacialCrevasses.java b/Mage.Sets/src/mage/sets/iceage/GlacialCrevasses.java
index b394a9bbd0..a079176d75 100644
--- a/Mage.Sets/src/mage/sets/iceage/GlacialCrevasses.java
+++ b/Mage.Sets/src/mage/sets/iceage/GlacialCrevasses.java
@@ -32,7 +32,7 @@ import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.SacrificeTargetCost;
import mage.abilities.effects.Effect;
-import mage.abilities.effects.common.PreventAllDamageByAllEffect;
+import mage.abilities.effects.common.PreventAllDamageByAllPermanentsEffect;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Duration;
@@ -61,7 +61,7 @@ public class GlacialCrevasses extends CardImpl {
this.expansionSetCode = "ICE";
// Sacrifice a snow Mountain: Prevent all combat damage that would be dealt this turn.
- Effect effect = new PreventAllDamageByAllEffect(Duration.EndOfTurn, true);
+ Effect effect = new PreventAllDamageByAllPermanentsEffect(Duration.EndOfTurn, true);
effect.setText("Prevent all combat damage that would be dealt this turn");
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new SacrificeTargetCost(new TargetControlledPermanent(filter)));
this.addAbility(ability);
diff --git a/Mage.Sets/src/mage/sets/iceage/Sunstone.java b/Mage.Sets/src/mage/sets/iceage/Sunstone.java
index 1d19580829..0be6c826ee 100644
--- a/Mage.Sets/src/mage/sets/iceage/Sunstone.java
+++ b/Mage.Sets/src/mage/sets/iceage/Sunstone.java
@@ -33,7 +33,7 @@ import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.SacrificeTargetCost;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.Effect;
-import mage.abilities.effects.common.PreventAllDamageByAllEffect;
+import mage.abilities.effects.common.PreventAllDamageByAllPermanentsEffect;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Duration;
@@ -60,7 +60,7 @@ public class Sunstone extends CardImpl {
this.expansionSetCode = "ICE";
// {2}, Sacrifice a snow land: Prevent all combat damage that would be dealt this turn.
- Effect effect = new PreventAllDamageByAllEffect(Duration.EndOfTurn, true);
+ Effect effect = new PreventAllDamageByAllPermanentsEffect(Duration.EndOfTurn, true);
effect.setText("Prevent all combat damage that would be dealt this turn");
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl("{2}"));
ability.addCost(new SacrificeTargetCost(new TargetControlledPermanent(filter)));
diff --git a/Mage.Sets/src/mage/sets/innistrad/Moonmist.java b/Mage.Sets/src/mage/sets/innistrad/Moonmist.java
index 50ea645db6..b57a2183b2 100644
--- a/Mage.Sets/src/mage/sets/innistrad/Moonmist.java
+++ b/Mage.Sets/src/mage/sets/innistrad/Moonmist.java
@@ -34,7 +34,7 @@ import mage.constants.Outcome;
import mage.constants.Rarity;
import mage.abilities.Ability;
import mage.abilities.effects.OneShotEffect;
-import mage.abilities.effects.common.PreventAllDamageByAllEffect;
+import mage.abilities.effects.common.PreventAllDamageByAllPermanentsEffect;
import mage.cards.CardImpl;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.Predicates;
@@ -62,7 +62,7 @@ public class Moonmist extends CardImpl {
// Transform all Humans. Prevent all combat damage that would be dealt this turn by creatures other than Werewolves and Wolves.
this.getSpellAbility().addEffect(new MoonmistEffect());
- this.getSpellAbility().addEffect(new PreventAllDamageByAllEffect(filter, Duration.EndOfTurn, true));
+ this.getSpellAbility().addEffect(new PreventAllDamageByAllPermanentsEffect(filter, Duration.EndOfTurn, true));
}
public Moonmist(final Moonmist card) {
diff --git a/Mage.Sets/src/mage/sets/invasion/HolyDay.java b/Mage.Sets/src/mage/sets/invasion/HolyDay.java
index a248819543..b42c7f1cd3 100644
--- a/Mage.Sets/src/mage/sets/invasion/HolyDay.java
+++ b/Mage.Sets/src/mage/sets/invasion/HolyDay.java
@@ -31,7 +31,7 @@ import java.util.UUID;
import mage.constants.CardType;
import mage.constants.Rarity;
-import mage.abilities.effects.common.PreventAllDamageByAllEffect;
+import mage.abilities.effects.common.PreventAllDamageByAllPermanentsEffect;
import mage.cards.CardImpl;
import mage.constants.Duration;
@@ -47,7 +47,7 @@ public class HolyDay extends CardImpl {
// Prevent all combat damage that would be dealt this turn.
- this.getSpellAbility().addEffect(new PreventAllDamageByAllEffect(Duration.EndOfTurn, true));
+ this.getSpellAbility().addEffect(new PreventAllDamageByAllPermanentsEffect(Duration.EndOfTurn, true));
}
public HolyDay(final HolyDay card) {
diff --git a/Mage.Sets/src/mage/sets/invasion/Tangle.java b/Mage.Sets/src/mage/sets/invasion/Tangle.java
index 710c7d5115..b75526b5e3 100644
--- a/Mage.Sets/src/mage/sets/invasion/Tangle.java
+++ b/Mage.Sets/src/mage/sets/invasion/Tangle.java
@@ -34,7 +34,7 @@ import mage.abilities.Ability;
import mage.abilities.effects.ContinuousEffect;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.DontUntapInControllersNextUntapStepTargetEffect;
-import mage.abilities.effects.common.PreventAllDamageByAllEffect;
+import mage.abilities.effects.common.PreventAllDamageByAllPermanentsEffect;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Duration;
@@ -58,7 +58,7 @@ public class Tangle extends CardImpl {
this.expansionSetCode = "INV";
// Prevent all combat damage that would be dealt this turn.
- this.getSpellAbility().addEffect(new PreventAllDamageByAllEffect(Duration.EndOfTurn, true));
+ this.getSpellAbility().addEffect(new PreventAllDamageByAllPermanentsEffect(Duration.EndOfTurn, true));
// Each attacking creature doesn't untap during its controller's next untap step.
this.getSpellAbility().addEffect(new TangleEffect());
}
diff --git a/Mage.Sets/src/mage/sets/legends/AngusMackenzie.java b/Mage.Sets/src/mage/sets/legends/AngusMackenzie.java
index ea54ac5677..605c1f09d4 100644
--- a/Mage.Sets/src/mage/sets/legends/AngusMackenzie.java
+++ b/Mage.Sets/src/mage/sets/legends/AngusMackenzie.java
@@ -35,7 +35,7 @@ import mage.abilities.condition.Condition;
import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.Effect;
-import mage.abilities.effects.common.PreventAllDamageByAllEffect;
+import mage.abilities.effects.common.PreventAllDamageByAllPermanentsEffect;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Duration;
@@ -60,7 +60,7 @@ public class AngusMackenzie extends CardImpl {
this.power = new MageInt(2);
this.toughness = new MageInt(2);
- Effect effect = new PreventAllDamageByAllEffect(Duration.EndOfTurn, true);
+ Effect effect = new PreventAllDamageByAllPermanentsEffect(Duration.EndOfTurn, true);
effect.setText("Prevent all combat damage that would be dealt this turn");
// {G}{W}{U}, {tap}: Prevent all combat damage that would be dealt this turn. Activate this ability only before the combat damage step.
Ability ability = new ActivateIfConditionActivatedAbility(
diff --git a/Mage.Sets/src/mage/sets/magic2010/BrambleCreeper.java b/Mage.Sets/src/mage/sets/magic2010/BrambleCreeper.java
index ea52beac68..71361263e6 100644
--- a/Mage.Sets/src/mage/sets/magic2010/BrambleCreeper.java
+++ b/Mage.Sets/src/mage/sets/magic2010/BrambleCreeper.java
@@ -28,14 +28,13 @@
package mage.sets.magic2010;
import java.util.UUID;
-
-import mage.constants.CardType;
-import mage.constants.Rarity;
import mage.MageInt;
import mage.abilities.common.AttacksTriggeredAbility;
import mage.abilities.effects.common.continuous.BoostSourceEffect;
import mage.cards.CardImpl;
+import mage.constants.CardType;
import mage.constants.Duration;
+import mage.constants.Rarity;
/**
*
@@ -50,6 +49,7 @@ public class BrambleCreeper extends CardImpl {
this.power = new MageInt(0);
this.toughness = new MageInt(3);
+ // Whenever Bramble Creeper attacks, it gets +5/+0 until end of turn.
this.addAbility(new AttacksTriggeredAbility(new BoostSourceEffect(5, 0, Duration.EndOfTurn), false));
}
diff --git a/Mage.Sets/src/mage/sets/magic2010/Fog.java b/Mage.Sets/src/mage/sets/magic2010/Fog.java
index dd4c19ce47..5ad7a46c98 100644
--- a/Mage.Sets/src/mage/sets/magic2010/Fog.java
+++ b/Mage.Sets/src/mage/sets/magic2010/Fog.java
@@ -32,7 +32,7 @@ import java.util.UUID;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Rarity;
-import mage.abilities.effects.common.PreventAllDamageByAllEffect;
+import mage.abilities.effects.common.PreventAllDamageByAllPermanentsEffect;
import mage.cards.CardImpl;
/**
@@ -45,7 +45,7 @@ public class Fog extends CardImpl {
super(ownerId, 182, "Fog", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{G}");
this.expansionSetCode = "M10";
- this.getSpellAbility().addEffect(new PreventAllDamageByAllEffect(Duration.EndOfTurn, true));
+ this.getSpellAbility().addEffect(new PreventAllDamageByAllPermanentsEffect(Duration.EndOfTurn, true));
}
public Fog(final Fog card) {
diff --git a/Mage.Sets/src/mage/sets/magic2015/HuntersAmbush.java b/Mage.Sets/src/mage/sets/magic2015/HuntersAmbush.java
index 60e2a855ec..fdf8766f15 100644
--- a/Mage.Sets/src/mage/sets/magic2015/HuntersAmbush.java
+++ b/Mage.Sets/src/mage/sets/magic2015/HuntersAmbush.java
@@ -29,7 +29,7 @@ package mage.sets.magic2015;
import java.util.UUID;
import mage.ObjectColor;
-import mage.abilities.effects.common.PreventAllDamageByAllEffect;
+import mage.abilities.effects.common.PreventAllDamageByAllPermanentsEffect;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Duration;
@@ -56,7 +56,7 @@ public class HuntersAmbush extends CardImpl {
// Prevent all combat damage that would be dealt by nongreen creatures this turn.
- this.getSpellAbility().addEffect(new PreventAllDamageByAllEffect(filter, Duration.EndOfTurn, true));
+ this.getSpellAbility().addEffect(new PreventAllDamageByAllPermanentsEffect(filter, Duration.EndOfTurn, true));
}
public HuntersAmbush(final HuntersAmbush card) {
diff --git a/Mage.Sets/src/mage/sets/magicorigins/VineSnare.java b/Mage.Sets/src/mage/sets/magicorigins/VineSnare.java
index 9d22db1f7d..ba297d4511 100644
--- a/Mage.Sets/src/mage/sets/magicorigins/VineSnare.java
+++ b/Mage.Sets/src/mage/sets/magicorigins/VineSnare.java
@@ -28,7 +28,7 @@
package mage.sets.magicorigins;
import java.util.UUID;
-import mage.abilities.effects.common.PreventAllDamageByAllEffect;
+import mage.abilities.effects.common.PreventAllDamageByAllPermanentsEffect;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Duration;
@@ -54,7 +54,7 @@ public class VineSnare extends CardImpl {
this.expansionSetCode = "ORI";
// Prevent all combat damage that would be dealt this turn by creatures with power 4 or less.
- this.getSpellAbility().addEffect(new PreventAllDamageByAllEffect(filter, Duration.EndOfTurn, true));
+ this.getSpellAbility().addEffect(new PreventAllDamageByAllPermanentsEffect(filter, Duration.EndOfTurn, true));
}
public VineSnare(final VineSnare card) {
diff --git a/Mage.Sets/src/mage/sets/mercadianmasques/Dawnstrider.java b/Mage.Sets/src/mage/sets/mercadianmasques/Dawnstrider.java
index 5c2aac7b33..4dc1fccb0e 100644
--- a/Mage.Sets/src/mage/sets/mercadianmasques/Dawnstrider.java
+++ b/Mage.Sets/src/mage/sets/mercadianmasques/Dawnstrider.java
@@ -38,7 +38,7 @@ import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.DiscardTargetCost;
import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.costs.mana.ManaCostsImpl;
-import mage.abilities.effects.common.PreventAllDamageByAllEffect;
+import mage.abilities.effects.common.PreventAllDamageByAllPermanentsEffect;
import mage.cards.CardImpl;
import mage.target.common.TargetCardInHand;
@@ -58,7 +58,7 @@ public class Dawnstrider extends CardImpl {
this.toughness = new MageInt(1);
// {G}, {tap}, Discard a card: Prevent all combat damage that would be dealt this turn.
- Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new PreventAllDamageByAllEffect(Duration.EndOfTurn, true), new ManaCostsImpl("{G}"));
+ Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new PreventAllDamageByAllPermanentsEffect(Duration.EndOfTurn, true), new ManaCostsImpl("{G}"));
ability.addCost(new TapSourceCost());
ability.addCost(new DiscardTargetCost(new TargetCardInHand()));
this.addAbility(ability);
diff --git a/Mage.Sets/src/mage/sets/mirrodin/AltarsLight.java b/Mage.Sets/src/mage/sets/mirrodin/AltarsLight.java
index 8b5e8255b9..10c3ae6891 100644
--- a/Mage.Sets/src/mage/sets/mirrodin/AltarsLight.java
+++ b/Mage.Sets/src/mage/sets/mirrodin/AltarsLight.java
@@ -28,10 +28,10 @@
package mage.sets.mirrodin;
import java.util.UUID;
-import mage.constants.CardType;
-import mage.constants.Rarity;
import mage.abilities.effects.common.ExileTargetEffect;
import mage.cards.CardImpl;
+import mage.constants.CardType;
+import mage.constants.Rarity;
import mage.filter.FilterPermanent;
import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.CardTypePredicate;
@@ -55,6 +55,7 @@ public class AltarsLight extends CardImpl {
super(ownerId, 1, "Altar's Light", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{2}{W}{W}");
this.expansionSetCode = "MRD";
+ // Exile target artifact or enchantment.
this.getSpellAbility().addEffect(new ExileTargetEffect());
this.getSpellAbility().addTarget(new TargetPermanent(filter));
}
diff --git a/Mage.Sets/src/mage/sets/odyssey/MomentsPeace.java b/Mage.Sets/src/mage/sets/odyssey/MomentsPeace.java
index 99d6411591..3892edcee2 100644
--- a/Mage.Sets/src/mage/sets/odyssey/MomentsPeace.java
+++ b/Mage.Sets/src/mage/sets/odyssey/MomentsPeace.java
@@ -29,7 +29,7 @@ package mage.sets.odyssey;
import java.util.UUID;
import mage.abilities.costs.mana.ManaCostsImpl;
-import mage.abilities.effects.common.PreventAllDamageByAllEffect;
+import mage.abilities.effects.common.PreventAllDamageByAllPermanentsEffect;
import mage.abilities.keyword.FlashbackAbility;
import mage.cards.CardImpl;
import mage.constants.CardType;
@@ -48,7 +48,7 @@ public class MomentsPeace extends CardImpl {
this.expansionSetCode = "ODY";
// Prevent all combat damage that would be dealt this turn.
- this.getSpellAbility().addEffect(new PreventAllDamageByAllEffect(Duration.EndOfTurn, true));
+ this.getSpellAbility().addEffect(new PreventAllDamageByAllPermanentsEffect(Duration.EndOfTurn, true));
// Flashback {2}{G}
this.addAbility(new FlashbackAbility(new ManaCostsImpl("{2}{G}"), TimingRule.INSTANT));
diff --git a/Mage.Sets/src/mage/sets/planarchaos/DawnCharm.java b/Mage.Sets/src/mage/sets/planarchaos/DawnCharm.java
index 253cc38e33..8069a9964e 100644
--- a/Mage.Sets/src/mage/sets/planarchaos/DawnCharm.java
+++ b/Mage.Sets/src/mage/sets/planarchaos/DawnCharm.java
@@ -33,7 +33,7 @@ import mage.constants.Duration;
import mage.constants.Rarity;
import mage.abilities.Mode;
import mage.abilities.effects.common.CounterTargetEffect;
-import mage.abilities.effects.common.PreventAllDamageByAllEffect;
+import mage.abilities.effects.common.PreventAllDamageByAllPermanentsEffect;
import mage.abilities.effects.common.RegenerateTargetEffect;
import mage.cards.CardImpl;
import mage.filter.FilterSpell;
@@ -63,7 +63,7 @@ public class DawnCharm extends CardImpl {
// Choose one - Prevent all combat damage that would be dealt this turn
- this.getSpellAbility().addEffect(new PreventAllDamageByAllEffect(Duration.EndOfTurn, true));
+ this.getSpellAbility().addEffect(new PreventAllDamageByAllPermanentsEffect(Duration.EndOfTurn, true));
// or regenerate target creature;
Mode mode = new Mode();
mode.getEffects().add(new RegenerateTargetEffect());
diff --git a/Mage.Sets/src/mage/sets/prophecy/SporeFrog.java b/Mage.Sets/src/mage/sets/prophecy/SporeFrog.java
index cf8835aad7..c454d71b9b 100644
--- a/Mage.Sets/src/mage/sets/prophecy/SporeFrog.java
+++ b/Mage.Sets/src/mage/sets/prophecy/SporeFrog.java
@@ -35,7 +35,7 @@ import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.SacrificeSourceCost;
-import mage.abilities.effects.common.PreventAllDamageByAllEffect;
+import mage.abilities.effects.common.PreventAllDamageByAllPermanentsEffect;
import mage.cards.CardImpl;
import mage.constants.Duration;
import mage.constants.Zone;
@@ -55,7 +55,7 @@ public class SporeFrog extends CardImpl {
this.toughness = new MageInt(1);
// Sacrifice Spore Frog: Prevent all combat damage that would be dealt this turn.
- Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new PreventAllDamageByAllEffect(Duration.EndOfTurn, true), new SacrificeSourceCost());
+ Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new PreventAllDamageByAllPermanentsEffect(Duration.EndOfTurn, true), new SacrificeSourceCost());
this.addAbility(ability);
}
diff --git a/Mage.Sets/src/mage/sets/riseoftheeldrazi/HarmlessAssault.java b/Mage.Sets/src/mage/sets/riseoftheeldrazi/HarmlessAssault.java
index 3560af1bd0..963392f2c2 100644
--- a/Mage.Sets/src/mage/sets/riseoftheeldrazi/HarmlessAssault.java
+++ b/Mage.Sets/src/mage/sets/riseoftheeldrazi/HarmlessAssault.java
@@ -31,7 +31,7 @@ import java.util.UUID;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Rarity;
-import mage.abilities.effects.common.PreventAllDamageByAllEffect;
+import mage.abilities.effects.common.PreventAllDamageByAllPermanentsEffect;
import mage.cards.CardImpl;
import mage.filter.common.FilterAttackingCreature;
@@ -49,8 +49,7 @@ public class HarmlessAssault extends CardImpl {
// Prevent all combat damage that would be dealt this turn by attacking
// creatures.
- this.getSpellAbility().addEffect(
- new PreventAllDamageByAllEffect(new FilterAttackingCreature(), Duration.EndOfTurn, true));
+ this.getSpellAbility().addEffect(new PreventAllDamageByAllPermanentsEffect(new FilterAttackingCreature(), Duration.EndOfTurn, true));
}
public HarmlessAssault(final HarmlessAssault card) {
diff --git a/Mage.Sets/src/mage/sets/scarsofmirrodin/BluntTheAssault.java b/Mage.Sets/src/mage/sets/scarsofmirrodin/BluntTheAssault.java
index c36c24806d..70b1fce8ea 100644
--- a/Mage.Sets/src/mage/sets/scarsofmirrodin/BluntTheAssault.java
+++ b/Mage.Sets/src/mage/sets/scarsofmirrodin/BluntTheAssault.java
@@ -34,7 +34,7 @@ import mage.constants.CardType;
import mage.constants.Rarity;
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
import mage.abilities.effects.common.GainLifeEffect;
-import mage.abilities.effects.common.PreventAllDamageByAllEffect;
+import mage.abilities.effects.common.PreventAllDamageByAllPermanentsEffect;
import mage.cards.CardImpl;
import mage.constants.Duration;
import mage.filter.common.FilterCreaturePermanent;
@@ -52,7 +52,7 @@ public class BluntTheAssault extends CardImpl {
this.expansionSetCode = "SOM";
this.getSpellAbility().addEffect(new GainLifeEffect(new PermanentsOnBattlefieldCount(filter)));
- this.getSpellAbility().addEffect(new PreventAllDamageByAllEffect(Duration.EndOfTurn, true));
+ this.getSpellAbility().addEffect(new PreventAllDamageByAllPermanentsEffect(Duration.EndOfTurn, true));
}
public BluntTheAssault (final BluntTheAssault card) {
diff --git a/Mage.Sets/src/mage/sets/scourge/FormOfTheDragon.java b/Mage.Sets/src/mage/sets/scourge/FormOfTheDragon.java
index e9ed5ddae8..0d596e4db1 100644
--- a/Mage.Sets/src/mage/sets/scourge/FormOfTheDragon.java
+++ b/Mage.Sets/src/mage/sets/scourge/FormOfTheDragon.java
@@ -32,22 +32,19 @@ import mage.abilities.Ability;
import mage.abilities.common.BeginningOfEndStepTriggeredAbility;
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
import mage.abilities.common.SimpleStaticAbility;
-import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.DamageTargetEffect;
+import mage.abilities.effects.common.SetPlayerLifeSourceEffect;
import mage.abilities.effects.common.combat.CantAttackYouAllEffect;
import mage.abilities.keyword.FlyingAbility;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Duration;
-import mage.constants.Outcome;
import mage.constants.Rarity;
import mage.constants.TargetController;
import mage.constants.Zone;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.AbilityPredicate;
-import mage.game.Game;
-import mage.players.Player;
import mage.target.common.TargetCreatureOrPlayer;
/**
@@ -72,7 +69,7 @@ public class FormOfTheDragon extends CardImpl {
this.addAbility(ability);
// At the beginning of each end step, your life total becomes 5.
- this.addAbility(new BeginningOfEndStepTriggeredAbility(new FormOfTheDragonEffect(), TargetController.ANY, false));
+ this.addAbility(new BeginningOfEndStepTriggeredAbility(new SetPlayerLifeSourceEffect(5), TargetController.ANY, false));
// Creatures without flying can't attack you.
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CantAttackYouAllEffect(Duration.WhileOnBattlefield, filter)));
@@ -87,30 +84,3 @@ public class FormOfTheDragon extends CardImpl {
return new FormOfTheDragon(this);
}
}
-
-class FormOfTheDragonEffect extends OneShotEffect {
-
- FormOfTheDragonEffect() {
- super(Outcome.Neutral);
- this.staticText = "your life total becomes 5";
- }
-
- FormOfTheDragonEffect(final FormOfTheDragonEffect effect) {
- super(effect);
- }
-
- @Override
- public FormOfTheDragonEffect copy() {
- return new FormOfTheDragonEffect(this);
- }
-
- @Override
- public boolean apply(Game game, Ability source) {
- Player player = game.getPlayer(source.getControllerId());
- if (player != null) {
- player.setLife(5, game);
- return true;
- }
- return false;
- }
-}
diff --git a/Mage.Sets/src/mage/sets/shadowmoor/InquisitorsSnare.java b/Mage.Sets/src/mage/sets/shadowmoor/InquisitorsSnare.java
index bc55bc3d95..a9e4f7d841 100644
--- a/Mage.Sets/src/mage/sets/shadowmoor/InquisitorsSnare.java
+++ b/Mage.Sets/src/mage/sets/shadowmoor/InquisitorsSnare.java
@@ -31,7 +31,7 @@ import java.util.UUID;
import mage.ObjectColor;
import mage.abilities.Ability;
import mage.abilities.effects.OneShotEffect;
-import mage.abilities.effects.common.PreventAllDamageByAllEffect;
+import mage.abilities.effects.common.PreventAllDamageByAllPermanentsEffect;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Duration;
@@ -95,7 +95,7 @@ class InquisitorsSnareEffect extends OneShotEffect {
if (targetCreature != null) {
FilterCreaturePermanent filter = new FilterCreaturePermanent();
filter.add(new PermanentIdPredicate(targetCreature.getId()));
- game.addEffect(new PreventAllDamageByAllEffect(filter, Duration.EndOfTurn, false), source);
+ game.addEffect(new PreventAllDamageByAllPermanentsEffect(filter, Duration.EndOfTurn, false), source);
if (targetCreature.getColor(game).contains(ObjectColor.BLACK)
|| targetCreature.getColor(game).contains(ObjectColor.RED)) {
return targetCreature.destroy(source.getSourceId(), game, false);
diff --git a/Mage.Sets/src/mage/sets/shardsofalara/Angelsong.java b/Mage.Sets/src/mage/sets/shardsofalara/Angelsong.java
index a2961d9c93..a675d82b51 100644
--- a/Mage.Sets/src/mage/sets/shardsofalara/Angelsong.java
+++ b/Mage.Sets/src/mage/sets/shardsofalara/Angelsong.java
@@ -33,7 +33,7 @@ import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Rarity;
import mage.abilities.costs.mana.ManaCostsImpl;
-import mage.abilities.effects.common.PreventAllDamageByAllEffect;
+import mage.abilities.effects.common.PreventAllDamageByAllPermanentsEffect;
import mage.abilities.keyword.CyclingAbility;
import mage.cards.CardImpl;
@@ -47,7 +47,7 @@ public class Angelsong extends CardImpl {
super(ownerId, 4, "Angelsong", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{1}{W}");
this.expansionSetCode = "ALA";
- this.getSpellAbility().addEffect(new PreventAllDamageByAllEffect(Duration.EndOfTurn, true));
+ this.getSpellAbility().addEffect(new PreventAllDamageByAllPermanentsEffect(Duration.EndOfTurn, true));
this.addAbility(new CyclingAbility(new ManaCostsImpl("{2}")));
}
diff --git a/Mage.Sets/src/mage/sets/shardsofalara/KnightCaptainOfEos.java b/Mage.Sets/src/mage/sets/shardsofalara/KnightCaptainOfEos.java
index 6a53f8331b..4cfccedea5 100644
--- a/Mage.Sets/src/mage/sets/shardsofalara/KnightCaptainOfEos.java
+++ b/Mage.Sets/src/mage/sets/shardsofalara/KnightCaptainOfEos.java
@@ -38,7 +38,7 @@ import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.SacrificeTargetCost;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.common.CreateTokenEffect;
-import mage.abilities.effects.common.PreventAllDamageByAllEffect;
+import mage.abilities.effects.common.PreventAllDamageByAllPermanentsEffect;
import mage.cards.CardImpl;
import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.predicate.mageobject.SubtypePredicate;
@@ -67,7 +67,7 @@ public class KnightCaptainOfEos extends CardImpl {
this.toughness = new MageInt(2);
this.addAbility(new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new SoldierToken(), 2), false));
- SimpleActivatedAbility ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new PreventAllDamageByAllEffect(Duration.EndOfTurn, true), new ManaCostsImpl("{W}"));
+ SimpleActivatedAbility ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new PreventAllDamageByAllPermanentsEffect(Duration.EndOfTurn, true), new ManaCostsImpl("{W}"));
ability.addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent(1, 1, filter, true)));
this.addAbility(ability);
}
diff --git a/Mage.Sets/src/mage/sets/tempest/Respite.java b/Mage.Sets/src/mage/sets/tempest/Respite.java
index dd97200d06..7ada2fcca6 100644
--- a/Mage.Sets/src/mage/sets/tempest/Respite.java
+++ b/Mage.Sets/src/mage/sets/tempest/Respite.java
@@ -30,7 +30,7 @@ package mage.sets.tempest;
import java.util.UUID;
import mage.abilities.dynamicvalue.common.AttackingCreatureCount;
import mage.abilities.effects.common.GainLifeEffect;
-import mage.abilities.effects.common.PreventAllDamageByAllEffect;
+import mage.abilities.effects.common.PreventAllDamageByAllPermanentsEffect;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Duration;
@@ -47,7 +47,7 @@ public class Respite extends CardImpl {
this.expansionSetCode = "TMP";
// Prevent all combat damage that would be dealt this turn.
- this.getSpellAbility().addEffect(new PreventAllDamageByAllEffect(Duration.EndOfTurn, true));
+ this.getSpellAbility().addEffect(new PreventAllDamageByAllPermanentsEffect(Duration.EndOfTurn, true));
// You gain 1 life for each attacking creature.
this.getSpellAbility().addEffect(new GainLifeEffect(new AttackingCreatureCount()));
diff --git a/Mage.Sets/src/mage/sets/zendikar/Tanglesap.java b/Mage.Sets/src/mage/sets/zendikar/Tanglesap.java
index a9e47243c8..d899b83583 100644
--- a/Mage.Sets/src/mage/sets/zendikar/Tanglesap.java
+++ b/Mage.Sets/src/mage/sets/zendikar/Tanglesap.java
@@ -31,7 +31,7 @@ import java.util.UUID;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Rarity;
-import mage.abilities.effects.common.PreventAllDamageByAllEffect;
+import mage.abilities.effects.common.PreventAllDamageByAllPermanentsEffect;
import mage.abilities.keyword.TrampleAbility;
import mage.cards.CardImpl;
import mage.filter.common.FilterCreaturePermanent;
@@ -56,7 +56,7 @@ public class Tanglesap extends CardImpl {
// Prevent all combat damage that would be dealt this turn by creatures without trample.
- this.getSpellAbility().addEffect(new PreventAllDamageByAllEffect(filter, Duration.EndOfTurn, true));
+ this.getSpellAbility().addEffect(new PreventAllDamageByAllPermanentsEffect(filter, Duration.EndOfTurn, true));
}
diff --git a/Mage/src/main/java/mage/abilities/common/ChancellorAbility.java b/Mage/src/main/java/mage/abilities/common/ChancellorAbility.java
index c58dc2dae9..c782eefc5b 100644
--- a/Mage/src/main/java/mage/abilities/common/ChancellorAbility.java
+++ b/Mage/src/main/java/mage/abilities/common/ChancellorAbility.java
@@ -1,16 +1,16 @@
/*
* Copyright 2011 BetaSteward_at_googlemail.com. All rights reserved.
- *
+ *
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
- *
+ *
* 1. Redistributions of source code must retain the above copyright notice, this list of
* conditions and the following disclaimer.
- *
+ *
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
* of conditions and the following disclaimer in the documentation and/or other materials
* provided with the distribution.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
@@ -20,19 +20,19 @@
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
+ *
* The views and conclusions contained in the software and documentation are those of the
* authors and should not be interpreted as representing official policies, either expressed
* or implied, of BetaSteward_at_googlemail.com.
*/
package mage.abilities.common;
-import mage.constants.Outcome;
-import mage.constants.Zone;
import mage.abilities.Ability;
import mage.abilities.DelayedTriggeredAbility;
import mage.abilities.StaticAbility;
import mage.abilities.effects.OneShotEffect;
+import mage.constants.Outcome;
+import mage.constants.Zone;
import mage.game.Game;
/**
@@ -58,7 +58,7 @@ public class ChancellorAbility extends StaticAbility {
return new ChancellorAbility(this);
}
- @Override
+ @Override
public String getRule() {
return "You may reveal this card from your opening hand. If you do, " + super.getRule();
}
@@ -67,9 +67,9 @@ public class ChancellorAbility extends StaticAbility {
class ChancellorEffect extends OneShotEffect {
- private DelayedTriggeredAbility ability;
+ private final DelayedTriggeredAbility ability;
- ChancellorEffect (DelayedTriggeredAbility ability, String text) {
+ ChancellorEffect(DelayedTriggeredAbility ability, String text) {
super(Outcome.Benefit);
this.ability = ability;
staticText = text;
diff --git a/Mage/src/main/java/mage/abilities/effects/common/PreventAllDamageByAllObjectsEffect.java b/Mage/src/main/java/mage/abilities/effects/common/PreventAllDamageByAllObjectsEffect.java
new file mode 100644
index 0000000000..cd0f75dc0a
--- /dev/null
+++ b/Mage/src/main/java/mage/abilities/effects/common/PreventAllDamageByAllObjectsEffect.java
@@ -0,0 +1,87 @@
+/*
+ * 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.MageObject;
+import mage.abilities.Ability;
+import mage.abilities.Mode;
+import mage.abilities.effects.PreventionEffectImpl;
+import mage.constants.Duration;
+import mage.filter.FilterObject;
+import mage.game.Game;
+import mage.game.events.DamageEvent;
+import mage.game.events.GameEvent;
+
+/**
+ *
+ * @author LevelX2
+ */
+public class PreventAllDamageByAllObjectsEffect extends PreventionEffectImpl {
+
+ private FilterObject filter;
+
+ public PreventAllDamageByAllObjectsEffect(Duration duration) {
+ this(null, duration, false);
+ }
+
+ public PreventAllDamageByAllObjectsEffect(Duration duration, boolean onlyCombat) {
+ this(null, duration, onlyCombat);
+ }
+
+ public PreventAllDamageByAllObjectsEffect(FilterObject filter, Duration duration, boolean onlyCombat) {
+ super(duration, Integer.MAX_VALUE, onlyCombat);
+ this.filter = filter;
+ }
+
+ public PreventAllDamageByAllObjectsEffect(final PreventAllDamageByAllObjectsEffect effect) {
+ super(effect);
+ if (effect.filter != null) {
+ this.filter = effect.filter.copy();
+ }
+ }
+
+ @Override
+ public PreventAllDamageByAllObjectsEffect copy() {
+ return new PreventAllDamageByAllObjectsEffect(this);
+ }
+
+ @Override
+ public boolean applies(GameEvent event, Ability source, Game game) {
+ if (super.applies(event, source, game) && event instanceof DamageEvent && event.getAmount() > 0) {
+ DamageEvent damageEvent = (DamageEvent) event;
+ if (damageEvent.isCombatDamage() || !onlyCombat) {
+ if (filter == null) {
+ return true;
+ }
+ MageObject damageSource = game.getObject(damageEvent.getSourceId());
+ if (damageSource != null && filter.match(damageSource, game)) {
+ return true;
+ }
+ }
+ }
+ return false;
+ }
+
+ @Override
+ public String getText(Mode mode) {
+ if (staticText != null && !staticText.isEmpty()) {
+ return staticText;
+ }
+ StringBuilder sb = new StringBuilder("Prevent all ");
+ if (onlyCombat) {
+ sb.append("combat ");
+ }
+ sb.append("damage that would be dealt");
+ if (duration.equals(Duration.EndOfTurn)) {
+ sb.append(" this turn");
+ }
+ if (filter != null) {
+ sb.append(" by ");
+ sb.append(filter.getMessage());
+ }
+ return sb.toString();
+ }
+}
diff --git a/Mage/src/main/java/mage/abilities/effects/common/PreventAllDamageByAllEffect.java b/Mage/src/main/java/mage/abilities/effects/common/PreventAllDamageByAllPermanentsEffect.java
similarity index 86%
rename from Mage/src/main/java/mage/abilities/effects/common/PreventAllDamageByAllEffect.java
rename to Mage/src/main/java/mage/abilities/effects/common/PreventAllDamageByAllPermanentsEffect.java
index e2087c588c..cee08029fb 100644
--- a/Mage/src/main/java/mage/abilities/effects/common/PreventAllDamageByAllEffect.java
+++ b/Mage/src/main/java/mage/abilities/effects/common/PreventAllDamageByAllPermanentsEffect.java
@@ -42,24 +42,24 @@ import mage.game.permanent.Permanent;
*
* @author LevelX
*/
-public class PreventAllDamageByAllEffect extends PreventionEffectImpl {
+public class PreventAllDamageByAllPermanentsEffect extends PreventionEffectImpl {
private FilterPermanent filter;
- public PreventAllDamageByAllEffect(Duration duration) {
+ public PreventAllDamageByAllPermanentsEffect(Duration duration) {
this(null, duration, false);
}
- public PreventAllDamageByAllEffect(Duration duration, boolean onlyCombat) {
+ public PreventAllDamageByAllPermanentsEffect(Duration duration, boolean onlyCombat) {
this(null, duration, onlyCombat);
}
- public PreventAllDamageByAllEffect(FilterCreaturePermanent filter, Duration duration, boolean onlyCombat) {
+ public PreventAllDamageByAllPermanentsEffect(FilterCreaturePermanent filter, Duration duration, boolean onlyCombat) {
super(duration, Integer.MAX_VALUE, onlyCombat);
this.filter = filter;
}
- public PreventAllDamageByAllEffect(final PreventAllDamageByAllEffect effect) {
+ public PreventAllDamageByAllPermanentsEffect(final PreventAllDamageByAllPermanentsEffect effect) {
super(effect);
if (effect.filter != null) {
this.filter = effect.filter.copy();
@@ -67,8 +67,8 @@ public class PreventAllDamageByAllEffect extends PreventionEffectImpl {
}
@Override
- public PreventAllDamageByAllEffect copy() {
- return new PreventAllDamageByAllEffect(this);
+ public PreventAllDamageByAllPermanentsEffect copy() {
+ return new PreventAllDamageByAllPermanentsEffect(this);
}
@Override
diff --git a/Mage/src/main/java/mage/abilities/effects/common/SetPlayerLifeSourceEffect.java b/Mage/src/main/java/mage/abilities/effects/common/SetPlayerLifeSourceEffect.java
new file mode 100644
index 0000000000..ab15b8d853
--- /dev/null
+++ b/Mage/src/main/java/mage/abilities/effects/common/SetPlayerLifeSourceEffect.java
@@ -0,0 +1,59 @@
+/*
+ * 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.dynamicvalue.DynamicValue;
+import mage.abilities.dynamicvalue.common.StaticValue;
+import mage.abilities.effects.OneShotEffect;
+import mage.constants.Outcome;
+import mage.game.Game;
+import mage.players.Player;
+
+/**
+ *
+ * @author LevelX2
+ */
+public class SetPlayerLifeSourceEffect extends OneShotEffect {
+
+ protected DynamicValue amount;
+
+ public SetPlayerLifeSourceEffect(int amount) {
+ this(new StaticValue(amount));
+ }
+
+ public SetPlayerLifeSourceEffect(DynamicValue amount) {
+ super(Outcome.Neutral);
+ this.amount = amount;
+ this.staticText = setText();
+ }
+
+ public SetPlayerLifeSourceEffect(final SetPlayerLifeSourceEffect effect) {
+ super(effect);
+ this.amount = effect.amount;
+ }
+
+ @Override
+ public SetPlayerLifeSourceEffect copy() {
+ return new SetPlayerLifeSourceEffect(this);
+ }
+
+ @Override
+ public boolean apply(Game game, Ability source) {
+ Player player = game.getPlayer(source.getControllerId());
+ if (player != null) {
+ player.setLife(amount.calculate(game, source, this), game);
+ return true;
+ }
+ return false;
+ }
+
+ private String setText() {
+ StringBuilder sb = new StringBuilder("your life total becomes ");
+ sb.append(amount.toString());
+ return sb.toString();
+ }
+}
diff --git a/Mage/src/main/java/mage/game/GameImpl.java b/Mage/src/main/java/mage/game/GameImpl.java
index c8b8375658..2d6de38f9e 100644
--- a/Mage/src/main/java/mage/game/GameImpl.java
+++ b/Mage/src/main/java/mage/game/GameImpl.java
@@ -2368,7 +2368,7 @@ public abstract class GameImpl implements Game, Serializable {
}
if (!game.isSimulation()) {
StringBuilder message = new StringBuilder(preventionSource.getLogName()).append(": Prevented ");
- message.append(Integer.toString(result.getPreventedDamage())).append(" damage from ").append(damageSource.getName());
+ message.append(Integer.toString(result.getPreventedDamage())).append(" damage from ").append(damageSource.getLogName());
if (!targetName.isEmpty()) {
message.append(" to ").append(targetName);
}