diff --git a/Mage.Client/src/main/java/mage/client/util/audio/LinePool.java b/Mage.Client/src/main/java/mage/client/util/audio/LinePool.java
index 6f52fdae2d5..8145f756bbf 100644
--- a/Mage.Client/src/main/java/mage/client/util/audio/LinePool.java
+++ b/Mage.Client/src/main/java/mage/client/util/audio/LinePool.java
@@ -5,10 +5,6 @@ import java.util.LinkedList;
import java.util.Set;
import java.util.Timer;
import java.util.TimerTask;
-import java.util.concurrent.LinkedBlockingQueue;
-import java.util.concurrent.ThreadFactory;
-import java.util.concurrent.ThreadPoolExecutor;
-import java.util.concurrent.TimeUnit;
import javax.sound.sampled.AudioFormat;
import javax.sound.sampled.AudioSystem;
@@ -23,6 +19,8 @@ import javax.sound.sampled.SourceDataLine;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import mage.utils.ThreadUtils;
+
public class LinePool {
private final Logger log = LoggerFactory.getLogger(getClass());
@@ -43,25 +41,12 @@ public class LinePool {
private Mixer mixer;
private int alwaysActive;
- private ThreadPoolExecutor threadPool;
- private int threadCount;
public LinePool() {
this(new AudioFormat(22050, 16, 1, true, false), 4, 1);
}
public LinePool(AudioFormat audioFormat, int size, int alwaysActive) {
- threadPool = new ThreadPoolExecutor(alwaysActive, size, 30L, TimeUnit.SECONDS, new LinkedBlockingQueue(), new ThreadFactory() {
- @Override
- public Thread newThread (Runnable runnable) {
- threadCount++;
- Thread thread = new Thread(runnable, "Audio" + threadCount);
- thread.setDaemon(true);
- return thread;
- }
- });
- threadPool.prestartAllCoreThreads();
-
format = audioFormat;
this.alwaysActive = alwaysActive;
mixer = AudioSystem.getMixer(null);
@@ -110,7 +95,7 @@ public class LinePool {
busyLines.add(line);
logLineStats();
}
- threadPool.submit(new Runnable() {
+ ThreadUtils.threadPool.submit(new Runnable() {
@Override
public void run() {
diff --git a/Mage.Sets/src/mage/sets/EldritchMoon.java b/Mage.Sets/src/mage/sets/EldritchMoon.java
index 43e1b95b1c4..73c89460c45 100644
--- a/Mage.Sets/src/mage/sets/EldritchMoon.java
+++ b/Mage.Sets/src/mage/sets/EldritchMoon.java
@@ -47,8 +47,8 @@ public class EldritchMoon extends ExpansionSet {
super("Eldritch Moon", "EMN", "mage.sets.eldritchmoon", new GregorianCalendar(2016, 7, 26).getTime(), SetType.EXPANSION);
this.blockName = "Shadows over Innistrad";
this.hasBoosters = true;
- this.numBoosterLands = 1;
- this.numBoosterCommon = 9;
+ this.numBoosterLands = 0;
+ this.numBoosterCommon = 10;
this.numBoosterUncommon = 3;
this.numBoosterRare = 1;
this.ratioBoosterMythic = 8;
diff --git a/Mage.Sets/src/mage/sets/alarareborn/MaskOfRiddles.java b/Mage.Sets/src/mage/sets/alarareborn/MaskOfRiddles.java
index 18c1cd4f63a..2b2746af02c 100644
--- a/Mage.Sets/src/mage/sets/alarareborn/MaskOfRiddles.java
+++ b/Mage.Sets/src/mage/sets/alarareborn/MaskOfRiddles.java
@@ -28,8 +28,6 @@
package mage.sets.alarareborn;
import java.util.UUID;
-
-import mage.constants.*;
import mage.abilities.common.DealsDamageToAPlayerAttachedTriggeredAbility;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.costs.mana.GenericManaCost;
@@ -38,6 +36,7 @@ import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect;
import mage.abilities.keyword.EquipAbility;
import mage.abilities.keyword.FearAbility;
import mage.cards.CardImpl;
+import mage.constants.*;
/**
*
@@ -50,9 +49,6 @@ public class MaskOfRiddles extends CardImpl {
this.expansionSetCode = "ARB";
this.subtype.add("Equipment");
-
-
-
// Equipped creature has fear.
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(FearAbility.getInstance(), AttachmentType.EQUIPMENT)));
// Whenever equipped creature deals combat damage to a player, you may draw a card.
diff --git a/Mage.Sets/src/mage/sets/alarareborn/ShieldOfTheRighteous.java b/Mage.Sets/src/mage/sets/alarareborn/ShieldOfTheRighteous.java
index fd13ee43153..6531704a704 100644
--- a/Mage.Sets/src/mage/sets/alarareborn/ShieldOfTheRighteous.java
+++ b/Mage.Sets/src/mage/sets/alarareborn/ShieldOfTheRighteous.java
@@ -55,9 +55,6 @@ public class ShieldOfTheRighteous extends CardImpl {
this.expansionSetCode = "ARB";
this.subtype.add("Equipment");
-
-
-
// Equipped creature gets +0/+2 and has vigilance.
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(0, 2)));
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(VigilanceAbility.getInstance(), AttachmentType.EQUIPMENT)));
diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/NoyanDarRoilShaper.java b/Mage.Sets/src/mage/sets/battleforzendikar/NoyanDarRoilShaper.java
index 0c9c9b6a4b6..beb58dc2ef7 100644
--- a/Mage.Sets/src/mage/sets/battleforzendikar/NoyanDarRoilShaper.java
+++ b/Mage.Sets/src/mage/sets/battleforzendikar/NoyanDarRoilShaper.java
@@ -78,7 +78,7 @@ public class NoyanDarRoilShaper extends CardImpl {
// Whenever you cast an instant or sorcery spell, you may put three +1/+1 counters on target land you control.
// If you do, that land becomes a 0/0 Elemental creature with haste that's still a land.
- Ability ability = new SpellCastControllerTriggeredAbility(new NoyanDarEffect(), filter, false);
+ Ability ability = new SpellCastControllerTriggeredAbility(new NoyanDarEffect(), filter, true);
ability.addTarget(new TargetControlledPermanent(new FilterControlledLandPermanent()));
this.addAbility(ability);
}
diff --git a/Mage.Sets/src/mage/sets/darksteel/ChitteringRats.java b/Mage.Sets/src/mage/sets/darksteel/ChitteringRats.java
index 8bda69bdde6..04be7370de9 100644
--- a/Mage.Sets/src/mage/sets/darksteel/ChitteringRats.java
+++ b/Mage.Sets/src/mage/sets/darksteel/ChitteringRats.java
@@ -78,7 +78,7 @@ class ChitteringRatsEffect extends OneShotEffect {
public ChitteringRatsEffect() {
super(Outcome.Detriment);
- this.staticText = "target opponent puts a card from his or her hand on top of his or her library.";
+ this.staticText = "target opponent puts a card from his or her hand on top of his or her library";
}
public ChitteringRatsEffect(final ChitteringRatsEffect effect) {
diff --git a/Mage.Sets/src/mage/sets/dissension/TasteForMayhem.java b/Mage.Sets/src/mage/sets/dissension/TasteForMayhem.java
index 606c4cd5daf..84503580e4d 100644
--- a/Mage.Sets/src/mage/sets/dissension/TasteForMayhem.java
+++ b/Mage.Sets/src/mage/sets/dissension/TasteForMayhem.java
@@ -60,12 +60,12 @@ public class TasteForMayhem extends CardImpl {
this.getSpellAbility().addEffect(new AttachEffect(Outcome.BoostCreature));
Ability ability = new EnchantAbility(auraTarget.getTargetName());
this.addAbility(ability);
-
+
// Enchanted creature gets +2/+0.
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(2, 0)));
-
+
// Hellbent - Enchanted creature gets an additional +2/+0 as long as you have no cards in hand.
- this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinuousEffect(new BoostEnchantedEffect(2, 0), HellbentCondition.getInstance(), "Hellbent — Enchanted creature gets an additional +2/+0 as long as you have no cards in hand")));
+ this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinuousEffect(new BoostEnchantedEffect(2, 0), HellbentCondition.getInstance(), "Hellbent — Enchanted creature gets an additional +2/+0 as long as you have no cards in hand")));
}
public TasteForMayhem(final TasteForMayhem card) {
diff --git a/Mage.Sets/src/mage/sets/eldritchmoon/AbandonReason.java b/Mage.Sets/src/mage/sets/eldritchmoon/AbandonReason.java
new file mode 100644
index 00000000000..5afbf0d49db
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/eldritchmoon/AbandonReason.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.abilities.costs.mana.ManaCostsImpl;
+import mage.abilities.effects.Effect;
+import mage.abilities.effects.common.continuous.BoostTargetEffect;
+import mage.abilities.effects.common.continuous.GainAbilityTargetEffect;
+import mage.abilities.keyword.FirstStrikeAbility;
+import mage.abilities.keyword.MadnessAbility;
+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 AbandonReason extends CardImpl {
+
+ public AbandonReason(UUID ownerId) {
+ super(ownerId, 115, "Abandon Reason", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{2}{R}");
+ this.expansionSetCode = "EMN";
+
+ // Up to two target creatures each get +1/+0 and gain first strike until end of turn.
+ Effect effect = new BoostTargetEffect(1, 0, Duration.EndOfTurn);
+ effect.setText("Up to two target creatures each get +1/+0");
+ this.getSpellAbility().addEffect(effect);
+ effect = new GainAbilityTargetEffect(FirstStrikeAbility.getInstance(), Duration.EndOfTurn, "and gain first strike until end of turn");
+ this.getSpellAbility().addEffect(effect);
+ this.getSpellAbility().addTarget(new TargetCreaturePermanent(0, 2));
+
+ // Madness {1}{R}
+ this.addAbility(new MadnessAbility(this, new ManaCostsImpl("{1}{R}")));
+ }
+
+ public AbandonReason(final AbandonReason card) {
+ super(card);
+ }
+
+ @Override
+ public AbandonReason copy() {
+ return new AbandonReason(this);
+ }
+}
diff --git a/Mage.Sets/src/mage/sets/eldritchmoon/AlchemistsGreeting.java b/Mage.Sets/src/mage/sets/eldritchmoon/AlchemistsGreeting.java
new file mode 100644
index 00000000000..199719a6129
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/eldritchmoon/AlchemistsGreeting.java
@@ -0,0 +1,64 @@
+/*
+ * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, are
+ * permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this list of
+ * conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice, this list
+ * of conditions and the following disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * The views and conclusions contained in the software and documentation are those of the
+ * authors and should not be interpreted as representing official policies, either expressed
+ * or implied, of BetaSteward_at_googlemail.com.
+ */
+package mage.sets.eldritchmoon;
+
+import java.util.UUID;
+import mage.abilities.costs.mana.ManaCostsImpl;
+import mage.abilities.effects.common.DamageTargetEffect;
+import mage.abilities.keyword.MadnessAbility;
+import mage.cards.CardImpl;
+import mage.constants.CardType;
+import mage.constants.Rarity;
+import mage.target.common.TargetCreatureOrPlayer;
+
+/**
+ *
+ * @author LevelX2
+ */
+public class AlchemistsGreeting extends CardImpl {
+
+ public AlchemistsGreeting(UUID ownerId) {
+ super(ownerId, 116, "Alchemist's Greeting", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{4}{R}");
+ this.expansionSetCode = "EMN";
+
+ // Alchemist's Greeting deals 4 damage to target creature.
+ this.getSpellAbility().addEffect(new DamageTargetEffect(4));
+ this.getSpellAbility().addTarget(new TargetCreatureOrPlayer());
+ // Madness {1}{R}
+ this.addAbility(new MadnessAbility(this, new ManaCostsImpl("{1}{R}")));
+ }
+
+ public AlchemistsGreeting(final AlchemistsGreeting card) {
+ super(card);
+ }
+
+ @Override
+ public AlchemistsGreeting copy() {
+ return new AlchemistsGreeting(this);
+ }
+}
diff --git a/Mage.Sets/src/mage/sets/eldritchmoon/BloodMist.java b/Mage.Sets/src/mage/sets/eldritchmoon/BloodMist.java
new file mode 100644
index 00000000000..c2553d87a38
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/eldritchmoon/BloodMist.java
@@ -0,0 +1,67 @@
+/*
+ * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, are
+ * permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this list of
+ * conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice, this list
+ * of conditions and the following disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * The views and conclusions contained in the software and documentation are those of the
+ * authors and should not be interpreted as representing official policies, either expressed
+ * or implied, of BetaSteward_at_googlemail.com.
+ */
+package mage.sets.eldritchmoon;
+
+import java.util.UUID;
+import mage.abilities.Ability;
+import mage.abilities.common.BeginningOfCombatTriggeredAbility;
+import mage.abilities.effects.common.continuous.GainAbilityTargetEffect;
+import mage.abilities.keyword.DoubleStrikeAbility;
+import mage.cards.CardImpl;
+import mage.constants.CardType;
+import mage.constants.Duration;
+import mage.constants.Rarity;
+import mage.constants.TargetController;
+import mage.target.common.TargetControlledCreaturePermanent;
+
+/**
+ *
+ * @author LevelX2
+ */
+public class BloodMist extends CardImpl {
+
+ public BloodMist(UUID ownerId) {
+ super(ownerId, 119, "Blood Mist", Rarity.UNCOMMON, new CardType[]{CardType.ENCHANTMENT}, "{3}{R}");
+ this.expansionSetCode = "EMN";
+
+ // At the beginning of combat on your turn, target creature you control gains double strike until end of turn.
+ Ability ability = new BeginningOfCombatTriggeredAbility(new GainAbilityTargetEffect(DoubleStrikeAbility.getInstance(), Duration.EndOfTurn), TargetController.YOU, false);
+ ability.addTarget(new TargetControlledCreaturePermanent());
+ this.addAbility(ability);
+
+ }
+
+ public BloodMist(final BloodMist card) {
+ super(card);
+ }
+
+ @Override
+ public BloodMist copy() {
+ return new BloodMist(this);
+ }
+}
diff --git a/Mage.Sets/src/mage/sets/eldritchmoon/BoldImpaler.java b/Mage.Sets/src/mage/sets/eldritchmoon/BoldImpaler.java
new file mode 100644
index 00000000000..a541e9c8e24
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/eldritchmoon/BoldImpaler.java
@@ -0,0 +1,67 @@
+/*
+ * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, are
+ * permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this list of
+ * conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice, this list
+ * of conditions and the following disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * The views and conclusions contained in the software and documentation are those of the
+ * authors and should not be interpreted as representing official policies, either expressed
+ * or implied, of BetaSteward_at_googlemail.com.
+ */
+package mage.sets.eldritchmoon;
+
+import java.util.UUID;
+import mage.MageInt;
+import mage.abilities.common.SimpleActivatedAbility;
+import mage.abilities.costs.mana.ManaCostsImpl;
+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 BoldImpaler extends CardImpl {
+
+ public BoldImpaler(UUID ownerId) {
+ super(ownerId, 120, "Bold Impaler", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{R}");
+ this.expansionSetCode = "EMN";
+ this.subtype.add("Vampire");
+ this.subtype.add("Knight");
+ this.power = new MageInt(1);
+ this.toughness = new MageInt(2);
+
+ // {2}{R}: Bold Impaler gets +2/+0 until end of turn.
+ this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostSourceEffect(2, 0, Duration.EndOfTurn), new ManaCostsImpl("{2}{R}")));
+ }
+
+ public BoldImpaler(final BoldImpaler card) {
+ super(card);
+ }
+
+ @Override
+ public BoldImpaler copy() {
+ return new BoldImpaler(this);
+ }
+}
diff --git a/Mage.Sets/src/mage/sets/eldritchmoon/BoonOfEmrakul.java b/Mage.Sets/src/mage/sets/eldritchmoon/BoonOfEmrakul.java
new file mode 100644
index 00000000000..ddd5665edc6
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/eldritchmoon/BoonOfEmrakul.java
@@ -0,0 +1,75 @@
+/*
+ * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, are
+ * permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this list of
+ * conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice, this list
+ * of conditions and the following disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * The views and conclusions contained in the software and documentation are those of the
+ * authors and should not be interpreted as representing official policies, either expressed
+ * or implied, of BetaSteward_at_googlemail.com.
+ */
+package mage.sets.eldritchmoon;
+
+import java.util.UUID;
+import mage.abilities.Ability;
+import mage.abilities.common.SimpleStaticAbility;
+import mage.abilities.effects.common.AttachEffect;
+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.Zone;
+import mage.target.TargetPermanent;
+import mage.target.common.TargetCreaturePermanent;
+
+/**
+ *
+ * @author escplan9 (Derek Monturo - dmontur1 at gmail dot com)
+ */
+public class BoonOfEmrakul extends CardImpl {
+
+ public BoonOfEmrakul(UUID ownerId) {
+ super(ownerId, 81, "Boon of Emrakul", Rarity.COMMON, new CardType[]{CardType.ENCHANTMENT}, "{2}{B}");
+ 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 +3/-3.
+ this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(3, -3, Duration.WhileOnBattlefield)));
+ }
+
+ public BoonOfEmrakul(final BoonOfEmrakul card) {
+ super(card);
+ }
+
+ @Override
+ public BoonOfEmrakul copy() {
+ return new BoonOfEmrakul(this);
+ }
+}
diff --git a/Mage.Sets/src/mage/sets/eldritchmoon/BorrowedHostility.java b/Mage.Sets/src/mage/sets/eldritchmoon/BorrowedHostility.java
new file mode 100644
index 00000000000..f5b7a485bae
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/eldritchmoon/BorrowedHostility.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.abilities.Mode;
+import mage.abilities.costs.mana.ManaCostsImpl;
+import mage.abilities.effects.common.continuous.BoostControlledEffect;
+import mage.abilities.effects.common.continuous.GainAbilityTargetEffect;
+import mage.abilities.keyword.EscalateAbility;
+import mage.abilities.keyword.FirstStrikeAbility;
+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 BorrowedHostility extends CardImpl {
+
+ public BorrowedHostility(UUID ownerId) {
+ super(ownerId, 121, "Borrowed Hostility", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{R}");
+ this.expansionSetCode = "EMN";
+
+ // Escalate {3}
+ this.addAbility(new EscalateAbility(new ManaCostsImpl<>("{3}")));
+ // Choose one or both —
+ this.getSpellAbility().getModes().setMinModes(1);
+ this.getSpellAbility().getModes().setMaxModes(2);
+
+ // Target creature gets +3/+0 until end of turn.;
+ this.getSpellAbility().addTarget(new TargetCreaturePermanent());
+ this.getSpellAbility().addEffect(new BoostControlledEffect(3, 0, Duration.EndOfTurn));
+
+ // Target creature gains first strike until end of turn.
+ Mode mode = new Mode();
+ mode.getEffects().add(new GainAbilityTargetEffect(FirstStrikeAbility.getInstance(), Duration.EndOfTurn));
+ mode.getTargets().add(new TargetCreaturePermanent());
+ this.getSpellAbility().addMode(mode);
+ }
+
+ public BorrowedHostility(final BorrowedHostility card) {
+ super(card);
+ }
+
+ @Override
+ public BorrowedHostility copy() {
+ return new BorrowedHostility(this);
+ }
+}
diff --git a/Mage.Sets/src/mage/sets/eldritchmoon/BrazenWolves.java b/Mage.Sets/src/mage/sets/eldritchmoon/BrazenWolves.java
new file mode 100644
index 00000000000..c6dbf929906
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/eldritchmoon/BrazenWolves.java
@@ -0,0 +1,67 @@
+/*
+ * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, are
+ * permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this list of
+ * conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice, this list
+ * of conditions and the following disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * The views and conclusions contained in the software and documentation are those of the
+ * authors and should not be interpreted as representing official policies, either expressed
+ * or implied, of BetaSteward_at_googlemail.com.
+ */
+package mage.sets.eldritchmoon;
+
+import java.util.UUID;
+import mage.MageInt;
+import mage.abilities.common.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 BrazenWolves extends CardImpl {
+
+ public BrazenWolves(UUID ownerId) {
+ super(ownerId, 122, "Brazen Wolves", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{2}{R}");
+ this.expansionSetCode = "EMN";
+ this.subtype.add("Wolf");
+ this.power = new MageInt(2);
+ this.toughness = new MageInt(3);
+
+ // Whenever Brazen Wolves attacks, it gets +2/+0 until end of turn.
+ Effect effect = new BoostSourceEffect(2, 0, Duration.EndOfTurn);
+ effect.setText("it gets +2/+0 until end of turn");
+ this.addAbility(new AttacksTriggeredAbility(effect, false));
+ }
+
+ public BrazenWolves(final BrazenWolves card) {
+ super(card);
+ }
+
+ @Override
+ public BrazenWolves copy() {
+ return new BrazenWolves(this);
+ }
+}
diff --git a/Mage.Sets/src/mage/sets/eldritchmoon/BriselaVoiceOfNightmares.java b/Mage.Sets/src/mage/sets/eldritchmoon/BriselaVoiceOfNightmares.java
index bb0f475e3e4..845a5117f88 100644
--- a/Mage.Sets/src/mage/sets/eldritchmoon/BriselaVoiceOfNightmares.java
+++ b/Mage.Sets/src/mage/sets/eldritchmoon/BriselaVoiceOfNightmares.java
@@ -63,6 +63,8 @@ public class BriselaVoiceOfNightmares extends CardImpl {
this.power = new MageInt(9);
this.toughness = new MageInt(10);
+ this.nightCard = true;// Meld card
+
// Flying
this.addAbility(FlyingAbility.getInstance());
// First strike
diff --git a/Mage.Sets/src/mage/sets/eldritchmoon/CampaignOfVengeance.java b/Mage.Sets/src/mage/sets/eldritchmoon/CampaignOfVengeance.java
new file mode 100644
index 00000000000..bb4043c9bfe
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/eldritchmoon/CampaignOfVengeance.java
@@ -0,0 +1,103 @@
+/*
+ * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, are
+ * permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this list of
+ * conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice, this list
+ * of conditions and the following disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * The views and conclusions contained in the software and documentation are those of the
+ * authors and should not be interpreted as representing official policies, either expressed
+ * or implied, of BetaSteward_at_googlemail.com.
+ */
+package mage.sets.eldritchmoon;
+
+import java.util.UUID;
+import mage.abilities.TriggeredAbilityImpl;
+import mage.abilities.effects.common.GainLifeEffect;
+import mage.abilities.effects.common.LoseLifeTargetEffect;
+import mage.cards.CardImpl;
+import mage.constants.CardType;
+import mage.constants.Rarity;
+import mage.constants.Zone;
+import mage.game.Game;
+import mage.game.events.GameEvent;
+import mage.game.permanent.Permanent;
+import mage.target.targetpointer.FixedTarget;
+
+/**
+ *
+ * @author LevelX2
+ */
+public class CampaignOfVengeance extends CardImpl {
+
+ public CampaignOfVengeance(UUID ownerId) {
+ super(ownerId, 182, "Campaign of Vengeance", Rarity.UNCOMMON, new CardType[]{CardType.ENCHANTMENT}, "{3}{W}{B}");
+ this.expansionSetCode = "EMN";
+
+ // Whenever a creature you control attacks, defending player loses 1 life and you gain 1 life.
+ this.addAbility(new CampaignOfVengeanceTriggeredAbility());
+ }
+
+ public CampaignOfVengeance(final CampaignOfVengeance card) {
+ super(card);
+ }
+
+ @Override
+ public CampaignOfVengeance copy() {
+ return new CampaignOfVengeance(this);
+ }
+}
+
+class CampaignOfVengeanceTriggeredAbility extends TriggeredAbilityImpl {
+
+ public CampaignOfVengeanceTriggeredAbility() {
+ super(Zone.BATTLEFIELD, new LoseLifeTargetEffect(1));
+ this.addEffect(new GainLifeEffect(1));
+ }
+
+ public CampaignOfVengeanceTriggeredAbility(final CampaignOfVengeanceTriggeredAbility ability) {
+ super(ability);
+ }
+
+ @Override
+ public CampaignOfVengeanceTriggeredAbility copy() {
+ return new CampaignOfVengeanceTriggeredAbility(this);
+ }
+
+ @Override
+ public boolean checkEventType(GameEvent event, Game game) {
+ return event.getType() == GameEvent.EventType.ATTACKER_DECLARED;
+ }
+
+ @Override
+ public boolean checkTrigger(GameEvent event, Game game) {
+ Permanent source = game.getPermanent(event.getSourceId());
+ if (source != null && source.getControllerId().equals(controllerId)) {
+ UUID defendingPlayerId = game.getCombat().getDefendingPlayerId(event.getSourceId(), game);
+ this.getEffects().get(0).setTargetPointer(new FixedTarget(defendingPlayerId));
+ return true;
+ }
+ return false;
+ }
+
+ @Override
+ public String getRule() {
+ return "Whenever a creature you control attacks, defending player loses 1 life and you gain 1 life.";
+ }
+}
diff --git a/Mage.Sets/src/mage/sets/eldritchmoon/CatharsShield.java b/Mage.Sets/src/mage/sets/eldritchmoon/CatharsShield.java
new file mode 100644
index 00000000000..086a6d6218a
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/eldritchmoon/CatharsShield.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.common.SimpleStaticAbility;
+import mage.abilities.costs.mana.GenericManaCost;
+import mage.abilities.effects.common.continuous.BoostEquippedEffect;
+import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect;
+import mage.abilities.keyword.EquipAbility;
+import mage.abilities.keyword.VigilanceAbility;
+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.target.common.TargetControlledCreaturePermanent;
+
+/**
+ *
+ * @author escplan9 (Derek Monturo - dmontur1 at gmail dot com)
+ */
+public class CatharsShield extends CardImpl {
+
+ public CatharsShield(UUID ownerId) {
+ super(ownerId, 192, "Cathar's Shield", Rarity.COMMON, new CardType[]{CardType.ARTIFACT}, "{0}");
+ this.expansionSetCode = "EMN";
+ this.subtype.add("Equipment");
+
+ // Equipped creature gets +0/+3 and has vigilance.
+ this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(0, 3)));
+ this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(VigilanceAbility.getInstance(), AttachmentType.EQUIPMENT)));
+
+ // Equip {3}
+ this.addAbility(new EquipAbility(Outcome.AddAbility, new GenericManaCost(3), new TargetControlledCreaturePermanent()));
+ }
+
+ public CatharsShield(final CatharsShield card) {
+ super(card);
+ }
+
+ @Override
+ public CatharsShield copy() {
+ return new CatharsShield(this);
+ }
+}
diff --git a/Mage.Sets/src/mage/sets/eldritchmoon/CertainDeath.java b/Mage.Sets/src/mage/sets/eldritchmoon/CertainDeath.java
new file mode 100644
index 00000000000..0cc829f4362
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/eldritchmoon/CertainDeath.java
@@ -0,0 +1,98 @@
+/*
+ * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, are
+ * permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this list of
+ * conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice, this list
+ * of conditions and the following disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * The views and conclusions contained in the software and documentation are those of the
+ * authors and should not be interpreted as representing official policies, either expressed
+ * or implied, of BetaSteward_at_googlemail.com.
+ */
+package mage.sets.eldritchmoon;
+
+import java.util.UUID;
+import mage.abilities.Ability;
+import mage.abilities.effects.OneShotEffect;
+import mage.cards.CardImpl;
+import mage.constants.CardType;
+import mage.constants.Outcome;
+import mage.constants.Rarity;
+import mage.game.Game;
+import mage.game.permanent.Permanent;
+import mage.players.Player;
+import mage.target.common.TargetCreaturePermanent;
+
+/**
+ *
+ * @author escplan9 (Derek Monturo - dmontur1 at gmail dot com)
+ */
+public class CertainDeath extends CardImpl {
+
+ public CertainDeath(UUID ownerId) {
+ super(ownerId, 84, "Certain Death", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{5}{B}");
+ this.expansionSetCode = "EMN";
+
+ // Destroy target creature. Its controller loses 2 life and you gain 2 life.
+ this.getSpellAbility().addTarget(new TargetCreaturePermanent());
+ this.getSpellAbility().addEffect(new CertainDeathEffect());
+ }
+
+ public CertainDeath(final CertainDeath card) {
+ super(card);
+ }
+
+ @Override
+ public CertainDeath copy() {
+ return new CertainDeath(this);
+ }
+}
+
+class CertainDeathEffect extends OneShotEffect {
+
+ public CertainDeathEffect() {
+ super(Outcome.DestroyPermanent);
+ this.staticText = "Destroy target creature. Its controler loses 2 life and you gain 2 life";
+ }
+
+ public CertainDeathEffect(final CertainDeathEffect effect) {
+ super(effect);
+ }
+
+ @Override
+ public CertainDeathEffect copy() {
+ return new CertainDeathEffect(this);
+ }
+
+ @Override
+ public boolean apply(Game game, Ability source) {
+ Player you = game.getPlayer(source.getControllerId());
+ Permanent permanent = game.getPermanent(this.getTargetPointer().getFirst(game, source));
+ if (permanent != null && you != null) {
+ permanent.destroy(source.getSourceId(), game, false);
+ Player permController = game.getPlayer(permanent.getControllerId());
+ if (permController != null) {
+ permController.loseLife(2, game);
+ you.gainLife(2, game);
+ return true;
+ }
+ }
+ return false;
+ }
+}
\ No newline at end of file
diff --git a/Mage.Sets/src/mage/sets/eldritchmoon/ChitteringHost.java b/Mage.Sets/src/mage/sets/eldritchmoon/ChitteringHost.java
new file mode 100644
index 00000000000..deff83feda9
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/eldritchmoon/ChitteringHost.java
@@ -0,0 +1,82 @@
+/*
+ * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, are
+ * permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this list of
+ * conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice, this list
+ * of conditions and the following disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * The views and conclusions contained in the software and documentation are those of the
+ * authors and should not be interpreted as representing official policies, either expressed
+ * or implied, of BetaSteward_at_googlemail.com.
+ */
+package mage.sets.eldritchmoon;
+
+import java.util.UUID;
+import mage.MageInt;
+import mage.abilities.Ability;
+import mage.abilities.common.EntersBattlefieldTriggeredAbility;
+import mage.abilities.effects.Effect;
+import mage.abilities.effects.common.continuous.BoostControlledEffect;
+import mage.abilities.effects.common.continuous.GainAbilityAllEffect;
+import mage.abilities.keyword.HasteAbility;
+import mage.abilities.keyword.MenaceAbility;
+import mage.cards.CardImpl;
+import mage.constants.CardType;
+import mage.constants.Duration;
+import mage.constants.Rarity;
+import mage.filter.common.FilterControlledCreaturePermanent;
+
+/**
+ *
+ * @author LevelX2
+ */
+public class ChitteringHost extends CardImpl {
+
+ public ChitteringHost(UUID ownerId) {
+ super(ownerId, 96, "Chittering Host", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "");
+ this.expansionSetCode = "EMN";
+ this.subtype.add("Eldrazi");
+ this.subtype.add("Horror");
+ this.power = new MageInt(5);
+ this.toughness = new MageInt(6);
+
+ this.nightCard = true; // Meld card
+ // Haste
+ this.addAbility(HasteAbility.getInstance());
+ // Menace (This creature can't be blocked except by two or more creatures.
+ this.addAbility(new MenaceAbility());
+ // When Chittering Host enters the battlefield, other creatures you control get +1/+0 and gain menace until end of turn.
+ Effect effect = new BoostControlledEffect(1, 0, Duration.EndOfTurn, true);
+ effect.setText("other creatures you control get +1/+0");
+ Ability ability = new EntersBattlefieldTriggeredAbility(effect, false);
+ effect = new GainAbilityAllEffect(new MenaceAbility(), Duration.EndOfTurn, new FilterControlledCreaturePermanent("other creatures"), true);
+ effect.setText("and gain menace until end of turn");
+ this.addAbility(ability);
+
+ }
+
+ public ChitteringHost(final ChitteringHost card) {
+ super(card);
+ }
+
+ @Override
+ public ChitteringHost copy() {
+ return new ChitteringHost(this);
+ }
+}
diff --git a/Mage.Sets/src/mage/sets/eldritchmoon/ConduitOfEmrakul.java b/Mage.Sets/src/mage/sets/eldritchmoon/ConduitOfEmrakul.java
new file mode 100644
index 00000000000..f437ff1d60f
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/eldritchmoon/ConduitOfEmrakul.java
@@ -0,0 +1,76 @@
+/*
+ * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, are
+ * permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this list of
+ * conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice, this list
+ * of conditions and the following disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * The views and conclusions contained in the software and documentation are those of the
+ * authors and should not be interpreted as representing official policies, either expressed
+ * or implied, of BetaSteward_at_googlemail.com.
+ */
+package mage.sets.eldritchmoon;
+
+import java.util.UUID;
+import mage.MageInt;
+import mage.Mana;
+import mage.abilities.common.AttacksTriggeredAbility;
+import mage.abilities.common.delayed.AtTheBeginOfMainPhaseDelayedTriggeredAbility;
+import mage.abilities.effects.Effect;
+import mage.abilities.effects.common.AddManaToManaPoolSourceControllerEffect;
+import mage.abilities.effects.common.CreateDelayedTriggeredAbilityEffect;
+import mage.cards.CardImpl;
+import mage.constants.CardType;
+import mage.constants.Rarity;
+import mage.constants.TargetController;
+
+/**
+ *
+ * @author LevelX2
+ */
+public class ConduitOfEmrakul extends CardImpl {
+
+ public ConduitOfEmrakul(UUID ownerId) {
+ super(ownerId, 124, "Conduit of Emrakul", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "");
+ this.expansionSetCode = "EMN";
+ this.subtype.add("Eldrazi");
+ this.subtype.add("Werewolf");
+ this.power = new MageInt(5);
+ this.toughness = new MageInt(4);
+
+ // this card is the second face of double-faced card
+ this.nightCard = true;
+
+ // Whenever Conduit of Emrakul attacks, add {C}{C} to your mana pool at the beginning of your next main phase this turn.
+ Effect effect = new CreateDelayedTriggeredAbilityEffect(
+ new AtTheBeginOfMainPhaseDelayedTriggeredAbility(
+ new AddManaToManaPoolSourceControllerEffect(Mana.GenericMana(2)), false, TargetController.YOU, AtTheBeginOfMainPhaseDelayedTriggeredAbility.PhaseSelection.NEXT_MAIN_THIS_TURN));
+ effect.setText("add {C}{C} to your mana pool at the beginning of your next main phase this turn");
+ this.addAbility(new AttacksTriggeredAbility(effect, false));
+ }
+
+ public ConduitOfEmrakul(final ConduitOfEmrakul card) {
+ super(card);
+ }
+
+ @Override
+ public ConduitOfEmrakul copy() {
+ return new ConduitOfEmrakul(this);
+ }
+}
diff --git a/Mage.Sets/src/mage/sets/eldritchmoon/ConduitOfStorms.java b/Mage.Sets/src/mage/sets/eldritchmoon/ConduitOfStorms.java
new file mode 100644
index 00000000000..e0103de6b21
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/eldritchmoon/ConduitOfStorms.java
@@ -0,0 +1,84 @@
+/*
+ * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, are
+ * permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this list of
+ * conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice, this list
+ * of conditions and the following disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * The views and conclusions contained in the software and documentation are those of the
+ * authors and should not be interpreted as representing official policies, either expressed
+ * or implied, of BetaSteward_at_googlemail.com.
+ */
+package mage.sets.eldritchmoon;
+
+import java.util.UUID;
+import mage.MageInt;
+import mage.Mana;
+import mage.abilities.common.AttacksTriggeredAbility;
+import mage.abilities.common.SimpleActivatedAbility;
+import mage.abilities.common.delayed.AtTheBeginOfMainPhaseDelayedTriggeredAbility;
+import mage.abilities.costs.mana.ManaCostsImpl;
+import mage.abilities.effects.Effect;
+import mage.abilities.effects.common.AddManaToManaPoolSourceControllerEffect;
+import mage.abilities.effects.common.CreateDelayedTriggeredAbilityEffect;
+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;
+
+/**
+ *
+ * @author LevelX2
+ */
+public class ConduitOfStorms extends CardImpl {
+
+ public ConduitOfStorms(UUID ownerId) {
+ super(ownerId, 124, "Conduit of Storms", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{2}{R}");
+ this.expansionSetCode = "EMN";
+ this.subtype.add("Werewolf");
+ this.subtype.add("Horror");
+ this.power = new MageInt(2);
+ this.toughness = new MageInt(3);
+
+ this.canTransform = true;
+ this.secondSideCard = new ConduitOfEmrakul(ownerId);
+
+ // Whenever Conduit of Storms attacks, add {R} to your mana pool at the beginning of your next main phase this turn.
+ Effect effect = new CreateDelayedTriggeredAbilityEffect(
+ new AtTheBeginOfMainPhaseDelayedTriggeredAbility(
+ new AddManaToManaPoolSourceControllerEffect(Mana.RedMana(1)), false, TargetController.YOU, AtTheBeginOfMainPhaseDelayedTriggeredAbility.PhaseSelection.NEXT_MAIN_THIS_TURN));
+ effect.setText("add {R} to your mana pool at the beginning of your next main phase this turn");
+ this.addAbility(new AttacksTriggeredAbility(effect, false));
+ // {3}{R}{R}: Transform Conduit of Storms.
+ this.addAbility(new TransformAbility());
+ this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new TransformSourceEffect(true), new ManaCostsImpl("{3}{R}{R}")));
+ }
+
+ public ConduitOfStorms(final ConduitOfStorms card) {
+ super(card);
+ }
+
+ @Override
+ public ConduitOfStorms copy() {
+ return new ConduitOfStorms(this);
+ }
+}
diff --git a/Mage.Sets/src/mage/sets/eldritchmoon/CultistsStaff.java b/Mage.Sets/src/mage/sets/eldritchmoon/CultistsStaff.java
new file mode 100644
index 00000000000..c689a5d9771
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/eldritchmoon/CultistsStaff.java
@@ -0,0 +1,67 @@
+/*
+ * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, are
+ * permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this list of
+ * conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice, this list
+ * of conditions and the following disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * The views and conclusions contained in the software and documentation are those of the
+ * authors and should not be interpreted as representing official policies, either expressed
+ * or implied, of BetaSteward_at_googlemail.com.
+ */
+package mage.sets.eldritchmoon;
+
+import java.util.UUID;
+import mage.abilities.common.SimpleStaticAbility;
+import mage.abilities.costs.mana.GenericManaCost;
+import mage.abilities.effects.common.continuous.BoostEquippedEffect;
+import mage.abilities.keyword.EquipAbility;
+import mage.cards.CardImpl;
+import mage.constants.CardType;
+import mage.constants.Outcome;
+import mage.constants.Rarity;
+import mage.constants.Zone;
+import mage.target.common.TargetControlledCreaturePermanent;
+
+/**
+ *
+ * @author escplan9 (Derek Monturo - dmontur1 at gmail dot com)
+ */
+public class CultistsStaff extends CardImpl {
+
+ public CultistsStaff(UUID ownerId) {
+ super(ownerId, 194, "Cultist's Staff", Rarity.COMMON, new CardType[]{CardType.ARTIFACT}, "{2}");
+ this.expansionSetCode = "EMN";
+ this.subtype.add("Equipment");
+
+ // Equipped creature gets +2/+2.
+ this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(2, 2)));
+ // Equip {3}
+ this.addAbility(new EquipAbility(Outcome.AddAbility, new GenericManaCost(3), new TargetControlledCreaturePermanent()));
+ }
+
+ public CultistsStaff(final CultistsStaff card) {
+ super(card);
+ }
+
+ @Override
+ public CultistsStaff copy() {
+ return new CultistsStaff(this);
+ }
+}
diff --git a/Mage.Sets/src/mage/sets/eldritchmoon/DarkSalvation.java b/Mage.Sets/src/mage/sets/eldritchmoon/DarkSalvation.java
new file mode 100644
index 00000000000..0889c217b8b
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/eldritchmoon/DarkSalvation.java
@@ -0,0 +1,112 @@
+/*
+ * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, are
+ * permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this list of
+ * conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice, this list
+ * of conditions and the following disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * The views and conclusions contained in the software and documentation are those of the
+ * authors and should not be interpreted as representing official policies, either expressed
+ * or implied, of BetaSteward_at_googlemail.com.
+ */
+package mage.sets.eldritchmoon;
+
+import java.util.UUID;
+import mage.abilities.Ability;
+import mage.abilities.dynamicvalue.DynamicValue;
+import mage.abilities.dynamicvalue.common.ManacostVariableValue;
+import mage.abilities.effects.Effect;
+import mage.abilities.effects.common.CreateTokenTargetEffect;
+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.filter.common.FilterCreaturePermanent;
+import mage.filter.predicate.mageobject.SubtypePredicate;
+import mage.game.Game;
+import mage.game.permanent.Permanent;
+import mage.game.permanent.token.ZombieToken;
+import mage.target.TargetPlayer;
+import mage.target.common.TargetCreaturePermanent;
+import mage.target.targetpointer.SecondTargetPointer;
+
+/**
+ *
+ * @author LevelX2
+ */
+public class DarkSalvation extends CardImpl {
+
+ public DarkSalvation(UUID ownerId) {
+ super(ownerId, 87, "Dark Salvation", Rarity.RARE, new CardType[]{CardType.SORCERY}, "{X}{X}{B}");
+ this.expansionSetCode = "EMN";
+
+ // Target player puts X 2/2 black Zombie creature tokens onto the battlefield, then up to one target creature gets -1/-1 until end of turn for each Zombie that player controls.
+ this.getSpellAbility().addTarget(new TargetPlayer());
+ Effect effect = new CreateTokenTargetEffect(new ZombieToken(), new ManacostVariableValue());
+ effect.setText("Target player puts X 2/2 black Zombie creature tokens onto the battlefield");
+ this.getSpellAbility().addEffect(effect);
+ this.getSpellAbility().addTarget(new TargetCreaturePermanent(0, 1, new FilterCreaturePermanent(), false));
+
+ DynamicValue value = new ZombiesControlledByTargetCreaturesControllerCount();
+ effect = new BoostTargetEffect(value, value, Duration.EndOfTurn, true);
+ effect.setTargetPointer(new SecondTargetPointer());
+ effect.setText(", then up to one target creature gets -1/-1 until end of turn for each Zombie that player controls");
+ this.getSpellAbility().addEffect(effect);
+ }
+
+ public DarkSalvation(final DarkSalvation card) {
+ super(card);
+ }
+
+ @Override
+ public DarkSalvation copy() {
+ return new DarkSalvation(this);
+ }
+}
+
+class ZombiesControlledByTargetCreaturesControllerCount implements DynamicValue {
+
+ private final static FilterCreaturePermanent filter = new FilterCreaturePermanent("Zombies");
+
+ static {
+ filter.add(new SubtypePredicate("Zombie"));
+ }
+
+ @Override
+ public ZombiesControlledByTargetCreaturesControllerCount copy() {
+ return new ZombiesControlledByTargetCreaturesControllerCount();
+ }
+
+ @Override
+ public int calculate(Game game, Ability sourceAbility, Effect effect) {
+ Permanent targetCreature = game.getPermanent(effect.getTargetPointer().getFirst(game, sourceAbility));
+ if (targetCreature != null) {
+ int value = game.getBattlefield().countAll(filter, targetCreature.getControllerId(), game);
+ return -1 * value;
+ } else {
+ return 0;
+ }
+ }
+
+ @Override
+ public String getMessage() {
+ return filter.getMessage() + " that player controls";
+ }
+}
diff --git a/Mage.Sets/src/mage/sets/eldritchmoon/DerangedWhelp.java b/Mage.Sets/src/mage/sets/eldritchmoon/DerangedWhelp.java
new file mode 100644
index 00000000000..894bcf61765
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/eldritchmoon/DerangedWhelp.java
@@ -0,0 +1,62 @@
+/*
+ * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, are
+ * permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this list of
+ * conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice, this list
+ * of conditions and the following disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * The views and conclusions contained in the software and documentation are those of the
+ * authors and should not be interpreted as representing official policies, either expressed
+ * or implied, of BetaSteward_at_googlemail.com.
+ */
+package mage.sets.eldritchmoon;
+
+import java.util.UUID;
+import mage.MageInt;
+import mage.abilities.keyword.MenaceAbility;
+import mage.cards.CardImpl;
+import mage.constants.CardType;
+import mage.constants.Rarity;
+
+/**
+ *
+ * @author LevelX2
+ */
+public class DerangedWhelp extends CardImpl {
+
+ public DerangedWhelp(UUID ownerId) {
+ super(ownerId, 125, "Deranged Whelp", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{1}{R}");
+ this.expansionSetCode = "EMN";
+ this.subtype.add("Wolf");
+ this.power = new MageInt(2);
+ this.toughness = new MageInt(1);
+
+ // Menace
+ this.addAbility(new MenaceAbility());
+ }
+
+ public DerangedWhelp(final DerangedWhelp card) {
+ super(card);
+ }
+
+ @Override
+ public DerangedWhelp copy() {
+ return new DerangedWhelp(this);
+ }
+}
diff --git a/Mage.Sets/src/mage/sets/eldritchmoon/DistemperOfTheBlood.java b/Mage.Sets/src/mage/sets/eldritchmoon/DistemperOfTheBlood.java
new file mode 100644
index 00000000000..117590492e4
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/eldritchmoon/DistemperOfTheBlood.java
@@ -0,0 +1,76 @@
+/*
+ * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, are
+ * permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this list of
+ * conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice, this list
+ * of conditions and the following disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * The views and conclusions contained in the software and documentation are those of the
+ * authors and should not be interpreted as representing official policies, either expressed
+ * or implied, of BetaSteward_at_googlemail.com.
+ */
+package mage.sets.eldritchmoon;
+
+import java.util.UUID;
+import mage.abilities.costs.mana.ManaCostsImpl;
+import mage.abilities.effects.Effect;
+import mage.abilities.effects.common.DrawCardSourceControllerEffect;
+import mage.abilities.effects.common.continuous.BoostTargetEffect;
+import mage.abilities.effects.common.continuous.GainAbilityTargetEffect;
+import mage.abilities.keyword.MadnessAbility;
+import mage.abilities.keyword.TrampleAbility;
+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 DistemperOfTheBlood extends CardImpl {
+
+ public DistemperOfTheBlood(UUID ownerId) {
+ super(ownerId, 126, "Distemper of the Blood", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{1}{R}");
+ this.expansionSetCode = "EMN";
+
+ // Target creature gets +2/+2 and gains trample until end of turn.
+ Effect effect = new BoostTargetEffect(2, 2, Duration.EndOfTurn);
+ effect.setText("Target creature gets +2/+2");
+ this.getSpellAbility().addEffect(effect);
+ effect = new GainAbilityTargetEffect(TrampleAbility.getInstance(), Duration.EndOfTurn);
+ effect.setText("and gains trample until end of turn");
+ this.getSpellAbility().addEffect(effect);
+ this.getSpellAbility().addTarget(new TargetCreaturePermanent());
+ this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(1));
+
+ // Madness {R}
+ this.addAbility(new MadnessAbility(this, new ManaCostsImpl("{R}")));
+ }
+
+ public DistemperOfTheBlood(final DistemperOfTheBlood card) {
+ super(card);
+ }
+
+ @Override
+ public DistemperOfTheBlood copy() {
+ return new DistemperOfTheBlood(this);
+ }
+}
diff --git a/Mage.Sets/src/mage/sets/eldritchmoon/DuskFeaster.java b/Mage.Sets/src/mage/sets/eldritchmoon/DuskFeaster.java
new file mode 100644
index 00000000000..c8fc97b681d
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/eldritchmoon/DuskFeaster.java
@@ -0,0 +1,129 @@
+/*
+ * 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.HashSet;
+import java.util.UUID;
+import mage.MageInt;
+import mage.Mana;
+import mage.abilities.Ability;
+import mage.abilities.SpellAbility;
+import mage.abilities.common.SimpleStaticAbility;
+import mage.abilities.effects.common.cost.CostModificationEffectImpl;
+import mage.abilities.keyword.FlyingAbility;
+import mage.cards.Card;
+import mage.cards.CardImpl;
+import mage.constants.CardType;
+import mage.constants.CostModificationType;
+import mage.constants.Duration;
+import mage.constants.Outcome;
+import mage.constants.Rarity;
+import mage.constants.Zone;
+import mage.game.Game;
+import mage.players.Player;
+
+/**
+ *
+ * @author escplan9 (Derek Monturo - dmontur1 at gmail dot com)
+ */
+public class DuskFeaster extends CardImpl {
+
+ public DuskFeaster(UUID ownerId) {
+ super(ownerId, 88, "Dusk Feaster", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{5}{B}{B}");
+ this.expansionSetCode = "EMN";
+ this.subtype.add("Vampire");
+ this.power = new MageInt(4);
+ this.toughness = new MageInt(5);
+
+ // Delirium — Dusk Feaster costs {2} less to cast if there are four or more card types among cards in your graveyard.
+ this.addAbility(new SimpleStaticAbility(Zone.STACK, new DuskFeasterCostReductionEffect()));
+ // Flying
+ this.addAbility(FlyingAbility.getInstance());
+ }
+
+ public DuskFeaster(final DuskFeaster card) {
+ super(card);
+ }
+
+ @Override
+ public DuskFeaster copy() {
+ return new DuskFeaster(this);
+ }
+}
+
+class DuskFeasterCostReductionEffect extends CostModificationEffectImpl {
+
+ DuskFeasterCostReductionEffect() {
+ super(Duration.Custom, Outcome.Benefit, CostModificationType.REDUCE_COST);
+ staticText = "{this} costs {2} less to cast if there are four or more card types among cards in your graveyard";
+ }
+
+ DuskFeasterCostReductionEffect(final DuskFeasterCostReductionEffect effect) {
+ super(effect);
+ }
+
+ @Override
+ public boolean apply(Game game, Ability source, Ability abilityToModify) {
+ SpellAbility spellAbility = (SpellAbility) abilityToModify;
+ Mana mana = spellAbility.getManaCostsToPay().getMana();
+ if (mana.getGeneric() > 0) {
+ int newCount = mana.getGeneric() - 2;
+ if (newCount < 0) {
+ newCount = 0;
+ }
+ mana.setGeneric(newCount);
+ spellAbility.getManaCostsToPay().load(mana.toString());
+ return true;
+ }
+ return false;
+ }
+
+ @Override
+ public boolean applies(Ability abilityToModify, Ability source, Game game) {
+
+ boolean hasDelirium = false;
+ Player controller = game.getPlayer(source.getControllerId());
+ if (controller != null) {
+ HashSet foundCardTypes = new HashSet<>();
+ for (Card card : controller.getGraveyard().getCards(game)) {
+ foundCardTypes.addAll(card.getCardType());
+ }
+ int number = foundCardTypes.size();
+ hasDelirium = number > 3;
+ }
+
+ return abilityToModify.getSourceId().equals(source.getSourceId())
+ && (abilityToModify instanceof SpellAbility)
+ && hasDelirium;
+ }
+
+ @Override
+ public DuskFeasterCostReductionEffect copy() {
+ return new DuskFeasterCostReductionEffect(this);
+ }
+}
\ No newline at end of file
diff --git a/Mage.Sets/src/mage/sets/eldritchmoon/FurybladeVampire.java b/Mage.Sets/src/mage/sets/eldritchmoon/FurybladeVampire.java
new file mode 100644
index 00000000000..ad624cef30b
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/eldritchmoon/FurybladeVampire.java
@@ -0,0 +1,75 @@
+/*
+ * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, are
+ * permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this list of
+ * conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice, this list
+ * of conditions and the following disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * The views and conclusions contained in the software and documentation are those of the
+ * authors and should not be interpreted as representing official policies, either expressed
+ * or implied, of BetaSteward_at_googlemail.com.
+ */
+package mage.sets.eldritchmoon;
+
+import java.util.UUID;
+import mage.MageInt;
+import mage.abilities.Ability;
+import mage.abilities.common.BeginningOfCombatTriggeredAbility;
+import mage.abilities.costs.common.DiscardCardCost;
+import mage.abilities.effects.common.DoIfCostPaid;
+import mage.abilities.effects.common.continuous.BoostSourceEffect;
+import mage.abilities.keyword.TrampleAbility;
+import mage.cards.CardImpl;
+import mage.constants.CardType;
+import mage.constants.Duration;
+import mage.constants.Rarity;
+import mage.constants.TargetController;
+import mage.constants.Zone;
+
+/**
+ *
+ * @author LevelX2
+ */
+public class FurybladeVampire extends CardImpl {
+
+ public FurybladeVampire(UUID ownerId) {
+ super(ownerId, 128, "Furyblade Vampire", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{1}{R}");
+ this.expansionSetCode = "EMN";
+ this.subtype.add("Vampire");
+ this.subtype.add("Berserker");
+ this.power = new MageInt(1);
+ this.toughness = new MageInt(2);
+
+ // Trample
+ this.addAbility(TrampleAbility.getInstance());
+ // At the beginning of combat on your turn, you may discard a card. If you do, Furyblade Vampire gets +3/+0 until end of turn.
+ Ability ability = new BeginningOfCombatTriggeredAbility(Zone.BATTLEFIELD,
+ new DoIfCostPaid(new BoostSourceEffect(3, 0, Duration.EndOfTurn), new DiscardCardCost(), "Discard a card to get {this} +3/+0 until end of turn?", true), TargetController.YOU, false, false);
+ this.addAbility(ability);
+ }
+
+ public FurybladeVampire(final FurybladeVampire card) {
+ super(card);
+ }
+
+ @Override
+ public FurybladeVampire copy() {
+ return new FurybladeVampire(this);
+ }
+}
diff --git a/Mage.Sets/src/mage/sets/eldritchmoon/GavonyUnhallowed.java b/Mage.Sets/src/mage/sets/eldritchmoon/GavonyUnhallowed.java
new file mode 100644
index 00000000000..b1c7979b228
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/eldritchmoon/GavonyUnhallowed.java
@@ -0,0 +1,75 @@
+/*
+ * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, are
+ * permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this list of
+ * conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice, this list
+ * of conditions and the following disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * The views and conclusions contained in the software and documentation are those of the
+ * authors and should not be interpreted as representing official policies, either expressed
+ * or implied, of BetaSteward_at_googlemail.com.
+ */
+package mage.sets.eldritchmoon;
+
+import java.util.UUID;
+import mage.MageInt;
+import mage.abilities.common.DiesCreatureTriggeredAbility;
+import mage.abilities.effects.common.counter.AddCountersSourceEffect;
+import mage.cards.CardImpl;
+import mage.constants.CardType;
+import mage.constants.Rarity;
+import mage.constants.TargetController;
+import mage.counters.CounterType;
+import mage.filter.common.FilterCreaturePermanent;
+import mage.filter.predicate.permanent.AnotherPredicate;
+import mage.filter.predicate.permanent.ControllerPredicate;
+
+/**
+ *
+ * @author escplan9 (Derek Monturo - dmontur1 at gmail dot com)
+ */
+public class GavonyUnhallowed extends CardImpl {
+
+ private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("another creature you control");
+
+ static {
+ filter.add(new AnotherPredicate());
+ filter.add(new ControllerPredicate(TargetController.YOU));
+ }
+
+ public GavonyUnhallowed(UUID ownerId) {
+ super(ownerId, 89, "Gavony Unhallowed", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{3}{B}");
+ this.expansionSetCode = "EMN";
+ this.subtype.add("Zombie");
+ this.power = new MageInt(2);
+ this.toughness = new MageInt(4);
+
+ // Whenever another creature you control dies, put a +1/+1 counter on Gavony Unhallowed.
+ this.addAbility(new DiesCreatureTriggeredAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance()), false, filter));
+ }
+
+ public GavonyUnhallowed(final GavonyUnhallowed card) {
+ super(card);
+ }
+
+ @Override
+ public GavonyUnhallowed copy() {
+ return new GavonyUnhallowed(this);
+ }
+}
diff --git a/Mage.Sets/src/mage/sets/eldritchmoon/GeistFueledScarecrow.java b/Mage.Sets/src/mage/sets/eldritchmoon/GeistFueledScarecrow.java
new file mode 100644
index 00000000000..253d0ffa349
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/eldritchmoon/GeistFueledScarecrow.java
@@ -0,0 +1,74 @@
+/*
+ * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, are
+ * permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this list of
+ * conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice, this list
+ * of conditions and the following disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * The views and conclusions contained in the software and documentation are those of the
+ * authors and should not be interpreted as representing official policies, either expressed
+ * or implied, of BetaSteward_at_googlemail.com.
+ */
+package mage.sets.eldritchmoon;
+
+import java.util.UUID;
+import mage.MageInt;
+import mage.abilities.common.SimpleStaticAbility;
+import mage.abilities.costs.mana.ManaCostsImpl;
+import mage.abilities.effects.common.cost.SpellsCostIncreasementControllerEffect;
+import mage.cards.CardImpl;
+import mage.constants.CardType;
+import mage.constants.Rarity;
+import mage.constants.Zone;
+import mage.filter.FilterCard;
+import mage.filter.predicate.mageobject.CardTypePredicate;
+
+/**
+ *
+ * @author escplan9 (Derek Monturo - dmontur1 at gmail dot com)
+ */
+public class GeistFueledScarecrow extends CardImpl {
+
+ private static final FilterCard filter = new FilterCard("Creature spells");
+
+ static {
+ filter.add(new CardTypePredicate(CardType.CREATURE));
+ }
+
+ public GeistFueledScarecrow(UUID ownerId) {
+ super(ownerId, 196, "Geist-Fueled Scarecrow", Rarity.UNCOMMON, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{4}");
+ this.expansionSetCode = "EMN";
+ this.subtype.add("Scarecrow");
+ this.power = new MageInt(4);
+ this.toughness = new MageInt(4);
+
+ // Creature spells you cast cost {1} more to cast.
+ this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD,
+ new SpellsCostIncreasementControllerEffect(filter, new ManaCostsImpl("{1}"))));
+ }
+
+ public GeistFueledScarecrow(final GeistFueledScarecrow card) {
+ super(card);
+ }
+
+ @Override
+ public GeistFueledScarecrow copy() {
+ return new GeistFueledScarecrow(this);
+ }
+}
diff --git a/Mage.Sets/src/mage/sets/eldritchmoon/GiselaTheBrokenBlade.java b/Mage.Sets/src/mage/sets/eldritchmoon/GiselaTheBrokenBlade.java
new file mode 100644
index 00000000000..27f383d64e3
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/eldritchmoon/GiselaTheBrokenBlade.java
@@ -0,0 +1,75 @@
+/*
+ * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, are
+ * permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this list of
+ * conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice, this list
+ * of conditions and the following disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * The views and conclusions contained in the software and documentation are those of the
+ * authors and should not be interpreted as representing official policies, either expressed
+ * or implied, of BetaSteward_at_googlemail.com.
+ */
+package mage.sets.eldritchmoon;
+
+import java.util.UUID;
+import mage.MageInt;
+import mage.abilities.common.SimpleStaticAbility;
+import mage.abilities.effects.common.InfoEffect;
+import mage.abilities.keyword.FirstStrikeAbility;
+import mage.abilities.keyword.FlyingAbility;
+import mage.abilities.keyword.LifelinkAbility;
+import mage.cards.CardImpl;
+import mage.constants.CardType;
+import mage.constants.Rarity;
+import mage.constants.Zone;
+
+/**
+ *
+ * @author LevelX2
+ */
+public class GiselaTheBrokenBlade extends CardImpl {
+
+ public GiselaTheBrokenBlade(UUID ownerId) {
+ super(ownerId, 28, "Gisela, the Broken Blade", Rarity.MYTHIC, new CardType[]{CardType.CREATURE}, "{2}{W}{W}");
+ this.expansionSetCode = "EMN";
+ this.supertype.add("Legendary");
+ this.subtype.add("Angel");
+ this.subtype.add("Horror");
+ this.power = new MageInt(4);
+ this.toughness = new MageInt(3);
+
+ // Flying
+ this.addAbility(FlyingAbility.getInstance());
+ // First strike
+ this.addAbility(FirstStrikeAbility.getInstance());
+ // Lifelink
+ this.addAbility(LifelinkAbility.getInstance());
+ // At the beginning of your end step, if you both own and control Gisela, the Broken Blade and a creature named Bruna, the Fading Light, exile them, then meld them into Brisela, Voice of Nightmares.
+ this.addAbility(new SimpleStaticAbility(Zone.ALL, new InfoEffect("Meld ability not implemeted yet.")));
+ }
+
+ public GiselaTheBrokenBlade(final GiselaTheBrokenBlade card) {
+ super(card);
+ }
+
+ @Override
+ public GiselaTheBrokenBlade copy() {
+ return new GiselaTheBrokenBlade(this);
+ }
+}
diff --git a/Mage.Sets/src/mage/sets/eldritchmoon/GrafHarvest.java b/Mage.Sets/src/mage/sets/eldritchmoon/GrafHarvest.java
new file mode 100644
index 00000000000..7848dfeac15
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/eldritchmoon/GrafHarvest.java
@@ -0,0 +1,83 @@
+/*
+ * 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.ExileFromGraveCost;
+import mage.abilities.costs.mana.ManaCostsImpl;
+import mage.abilities.effects.common.CreateTokenEffect;
+import mage.abilities.effects.common.continuous.GainAbilityAllEffect;
+import mage.abilities.keyword.MenaceAbility;
+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.common.FilterCreatureCard;
+import mage.filter.predicate.mageobject.SubtypePredicate;
+import mage.game.permanent.token.ZombieToken;
+import mage.target.common.TargetCardInYourGraveyard;
+
+/**
+ *
+ * @author escplan9 (Derek Monturo - dmontur1 at gmail dot com)
+ */
+public class GrafHarvest extends CardImpl {
+
+ private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("Zombies you control");
+
+ static {
+ filter.add(new SubtypePredicate("Zombie"));
+ }
+
+ public GrafHarvest(UUID ownerId) {
+ super(ownerId, 90, "Graf Harvest", Rarity.UNCOMMON, new CardType[]{CardType.ENCHANTMENT}, "{B}");
+ this.expansionSetCode = "EMN";
+
+ // Zombies you control have menace.
+ this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAllEffect(new MenaceAbility(), Duration.WhileOnBattlefield, filter)));
+
+ // {3}{B}, Exile a creature card from your graveyard: Put a 2/2 black Zombie creature token onto the battlefield.
+ Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CreateTokenEffect(new ZombieToken()), new ManaCostsImpl("{3}{B}"));
+ ability.addCost(new ExileFromGraveCost(new TargetCardInYourGraveyard(new FilterCreatureCard("a creature card from your graveyard"))));
+ this.addAbility(ability);
+ }
+
+ public GrafHarvest(final GrafHarvest card) {
+ super(card);
+ }
+
+ @Override
+ public GrafHarvest copy() {
+ return new GrafHarvest(this);
+ }
+}
diff --git a/Mage.Sets/src/mage/sets/eldritchmoon/GrafRats.java b/Mage.Sets/src/mage/sets/eldritchmoon/GrafRats.java
new file mode 100644
index 00000000000..2a3ebdd31eb
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/eldritchmoon/GrafRats.java
@@ -0,0 +1,64 @@
+/*
+ * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, are
+ * permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this list of
+ * conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice, this list
+ * of conditions and the following disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * The views and conclusions contained in the software and documentation are those of the
+ * authors and should not be interpreted as representing official policies, either expressed
+ * or implied, of BetaSteward_at_googlemail.com.
+ */
+package mage.sets.eldritchmoon;
+
+import java.util.UUID;
+import mage.MageInt;
+import mage.abilities.common.SimpleStaticAbility;
+import mage.abilities.effects.common.InfoEffect;
+import mage.cards.CardImpl;
+import mage.constants.CardType;
+import mage.constants.Rarity;
+import mage.constants.Zone;
+
+/**
+ *
+ * @author LevelX2
+ */
+public class GrafRats extends CardImpl {
+
+ public GrafRats(UUID ownerId) {
+ super(ownerId, 91, "Graf Rats", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{1}{B}");
+ this.expansionSetCode = "EMN";
+ this.subtype.add("Rat");
+ this.power = new MageInt(2);
+ this.toughness = new MageInt(1);
+
+ // At the beginning of combat on your turn, if you both own and control Graf Rats and a creature named Midnight Scavengers, exile them, then meld them into Chittering Host.
+ this.addAbility(new SimpleStaticAbility(Zone.ALL, new InfoEffect("Meld ability not implemeted yet.")));
+ }
+
+ public GrafRats(final GrafRats card) {
+ super(card);
+ }
+
+ @Override
+ public GrafRats copy() {
+ return new GrafRats(this);
+ }
+}
diff --git a/Mage.Sets/src/mage/sets/eldritchmoon/HanweirBattlements.java b/Mage.Sets/src/mage/sets/eldritchmoon/HanweirBattlements.java
new file mode 100644
index 00000000000..337c31dd47b
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/eldritchmoon/HanweirBattlements.java
@@ -0,0 +1,77 @@
+/*
+ * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, are
+ * permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this list of
+ * conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice, this list
+ * of conditions and the following disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * The views and conclusions contained in the software and documentation are those of the
+ * authors and should not be interpreted as representing official policies, either expressed
+ * or implied, of BetaSteward_at_googlemail.com.
+ */
+package mage.sets.eldritchmoon;
+
+import java.util.UUID;
+import mage.abilities.Ability;
+import mage.abilities.common.SimpleActivatedAbility;
+import mage.abilities.common.SimpleStaticAbility;
+import mage.abilities.costs.common.TapSourceCost;
+import mage.abilities.costs.mana.ManaCostsImpl;
+import mage.abilities.effects.common.InfoEffect;
+import mage.abilities.effects.common.continuous.GainAbilityTargetEffect;
+import mage.abilities.keyword.HasteAbility;
+import mage.abilities.mana.ColorlessManaAbility;
+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 HanweirBattlements extends CardImpl {
+
+ public HanweirBattlements(UUID ownerId) {
+ super(ownerId, 204, "Hanweir Battlements", Rarity.RARE, new CardType[]{CardType.LAND}, "");
+ this.expansionSetCode = "EMN";
+
+ // {T}: Add {C} to your mana pool.
+ this.addAbility(new ColorlessManaAbility());
+ // {R},{T}: Target creature gains haste until end of turn.
+ Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.EndOfTurn), new ManaCostsImpl("{R}"));
+ ability.addCost(new TapSourceCost());
+ ability.addTarget(new TargetCreaturePermanent());
+ this.addAbility(ability);
+
+ // {3}{R}{R},{T}: If you both own and control Hanweir Battlements and a creature named Hanweir Garrison, exile them, then meld them into Hanweir, the Writhing Township.
+ this.addAbility(new SimpleStaticAbility(Zone.ALL, new InfoEffect("Meld ability not implemeted yet.")));
+ }
+
+ public HanweirBattlements(final HanweirBattlements card) {
+ super(card);
+ }
+
+ @Override
+ public HanweirBattlements copy() {
+ return new HanweirBattlements(this);
+ }
+}
diff --git a/Mage.Sets/src/mage/sets/eldritchmoon/HanweirTheWrithingTownship.java b/Mage.Sets/src/mage/sets/eldritchmoon/HanweirTheWrithingTownship.java
new file mode 100644
index 00000000000..b741af6ed98
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/eldritchmoon/HanweirTheWrithingTownship.java
@@ -0,0 +1,73 @@
+/*
+ * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, are
+ * permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this list of
+ * conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice, this list
+ * of conditions and the following disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * The views and conclusions contained in the software and documentation are those of the
+ * authors and should not be interpreted as representing official policies, either expressed
+ * or implied, of BetaSteward_at_googlemail.com.
+ */
+package mage.sets.eldritchmoon;
+
+import java.util.UUID;
+import mage.MageInt;
+import mage.abilities.common.AttacksTriggeredAbility;
+import mage.abilities.effects.common.CreateTokenEffect;
+import mage.abilities.keyword.HasteAbility;
+import mage.abilities.keyword.TrampleAbility;
+import mage.cards.CardImpl;
+import mage.constants.CardType;
+import mage.constants.Rarity;
+
+/**
+ *
+ * @author LevelX2
+ */
+public class HanweirTheWrithingTownship extends CardImpl {
+
+ public HanweirTheWrithingTownship(UUID ownerId) {
+ super(ownerId, 130, "Hanweir, the Writhing Township", Rarity.RARE, new CardType[]{CardType.CREATURE}, "");
+ this.expansionSetCode = "EMN";
+ this.supertype.add("Legendary");
+ this.subtype.add("Eldrazi");
+ this.subtype.add("Ooze");
+ this.power = new MageInt(7);
+ this.toughness = new MageInt(4);
+
+ this.nightCard = true;// Meld card
+
+ // Trample
+ this.addAbility(TrampleAbility.getInstance());
+ // Haste
+ this.addAbility(HasteAbility.getInstance());
+ // Whenever Hanweir, the Writhing Township attacks, put two 3/2 colorless Eldrazi Horror creature tokens onto the battlefield tapped and attacking.
+ this.addAbility(new AttacksTriggeredAbility(new CreateTokenEffect(new EldraziHorrorToken(), 2, true, true), false));
+ }
+
+ public HanweirTheWrithingTownship(final HanweirTheWrithingTownship card) {
+ super(card);
+ }
+
+ @Override
+ public HanweirTheWrithingTownship copy() {
+ return new HanweirTheWrithingTownship(this);
+ }
+}
diff --git a/Mage.Sets/src/mage/sets/eldritchmoon/ImpetuousDevils.java b/Mage.Sets/src/mage/sets/eldritchmoon/ImpetuousDevils.java
new file mode 100644
index 00000000000..146d89560b7
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/eldritchmoon/ImpetuousDevils.java
@@ -0,0 +1,123 @@
+/*
+ * 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.TriggeredAbilityImpl;
+import mage.abilities.common.BeginningOfEndStepTriggeredAbility;
+import mage.abilities.effects.common.SacrificeSourceEffect;
+import mage.abilities.effects.common.combat.MustBeBlockedByTargetSourceEffect;
+import mage.abilities.keyword.HasteAbility;
+import mage.abilities.keyword.TrampleAbility;
+import mage.cards.CardImpl;
+import mage.constants.CardType;
+import mage.constants.Duration;
+import mage.constants.Rarity;
+import mage.constants.TargetController;
+import mage.constants.Zone;
+import mage.filter.common.FilterCreaturePermanent;
+import mage.filter.predicate.permanent.ControllerIdPredicate;
+import mage.game.Game;
+import mage.game.events.GameEvent;
+import mage.target.common.TargetCreaturePermanent;
+
+/**
+ *
+ * @author LevelX2
+ */
+public class ImpetuousDevils extends CardImpl {
+
+ public ImpetuousDevils(UUID ownerId) {
+ super(ownerId, 132, "Impetuous Devils", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{2}{R}{R}");
+ this.expansionSetCode = "EMN";
+ this.subtype.add("Devil");
+ this.power = new MageInt(6);
+ this.toughness = new MageInt(1);
+
+ // Trample
+ this.addAbility(TrampleAbility.getInstance());
+ // Haste
+ this.addAbility(HasteAbility.getInstance());
+ // When Impetuous Devils attacks, up to one target creature defending player controls blocks it this combat if able.
+ this.addAbility(new ImpetuousDevilsAbility());
+
+ // At the beginning of the end step, sacrifice Impetuous Devils.
+ this.addAbility(new BeginningOfEndStepTriggeredAbility(new SacrificeSourceEffect(), TargetController.NEXT, false));
+ }
+
+ public ImpetuousDevils(final ImpetuousDevils card) {
+ super(card);
+ }
+
+ @Override
+ public ImpetuousDevils copy() {
+ return new ImpetuousDevils(this);
+ }
+}
+
+class ImpetuousDevilsAbility extends TriggeredAbilityImpl {
+
+ public ImpetuousDevilsAbility() {
+ super(Zone.BATTLEFIELD, new MustBeBlockedByTargetSourceEffect(Duration.EndOfCombat), false);
+ }
+
+ public ImpetuousDevilsAbility(final ImpetuousDevilsAbility ability) {
+ super(ability);
+ }
+
+ @Override
+ public boolean checkEventType(GameEvent event, Game game) {
+ return event.getType() == GameEvent.EventType.ATTACKER_DECLARED;
+ }
+
+ @Override
+ public boolean checkTrigger(GameEvent event, Game game) {
+ if (event.getSourceId().equals(this.getSourceId())) {
+ FilterCreaturePermanent filter = new FilterCreaturePermanent("creature defending player controls");
+ UUID defenderId = game.getCombat().getDefendingPlayerId(sourceId, game);
+ filter.add(new ControllerIdPredicate(defenderId));
+
+ this.getTargets().clear();
+ TargetCreaturePermanent target = new TargetCreaturePermanent(0, 1, filter, false);
+ this.addTarget(target);
+ return true;
+ }
+ return false;
+ }
+
+ @Override
+ public String getRule() {
+ return "When {this} attacks, up to one target creature defending player controls blocks it this combat if able.";
+ }
+
+ @Override
+ public ImpetuousDevilsAbility copy() {
+ return new ImpetuousDevilsAbility(this);
+ }
+}
diff --git a/Mage.Sets/src/mage/sets/eldritchmoon/InsatiableGorgers.java b/Mage.Sets/src/mage/sets/eldritchmoon/InsatiableGorgers.java
new file mode 100644
index 00000000000..eeeb9a69c75
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/eldritchmoon/InsatiableGorgers.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.AttacksEachCombatStaticAbility;
+import mage.abilities.costs.mana.ManaCostsImpl;
+import mage.abilities.keyword.MadnessAbility;
+import mage.cards.CardImpl;
+import mage.constants.CardType;
+import mage.constants.Rarity;
+
+/**
+ *
+ * @author LevelX2
+ */
+public class InsatiableGorgers extends CardImpl {
+
+ public InsatiableGorgers(UUID ownerId) {
+ super(ownerId, 134, "Insatiable Gorgers", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{2}{R}{R}");
+ this.expansionSetCode = "EMN";
+ this.subtype.add("Vampire");
+ this.subtype.add("Berserker");
+ this.power = new MageInt(5);
+ this.toughness = new MageInt(3);
+
+ // Insatiable Gorgers attacks each combat if able.
+ this.addAbility(new AttacksEachCombatStaticAbility());
+
+ // Madness {3}{R}
+ this.addAbility(new MadnessAbility(this, new ManaCostsImpl("{3}{R}")));
+ }
+
+ public InsatiableGorgers(final InsatiableGorgers card) {
+ super(card);
+ }
+
+ @Override
+ public InsatiableGorgers copy() {
+ return new InsatiableGorgers(this);
+ }
+}
diff --git a/Mage.Sets/src/mage/sets/eldritchmoon/LilianasElite.java b/Mage.Sets/src/mage/sets/eldritchmoon/LilianasElite.java
new file mode 100644
index 00000000000..78729b6caae
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/eldritchmoon/LilianasElite.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.MageInt;
+import mage.abilities.Ability;
+import mage.abilities.common.SimpleStaticAbility;
+import mage.abilities.dynamicvalue.DynamicValue;
+import mage.abilities.dynamicvalue.common.CardsInControllerGraveyardCount;
+import mage.abilities.effects.common.continuous.BoostSourceEffect;
+import mage.cards.CardImpl;
+import mage.constants.CardType;
+import mage.constants.Duration;
+import mage.constants.Rarity;
+import mage.constants.Zone;
+import mage.filter.common.FilterCreatureCard;
+
+/**
+ *
+ * @author LevelX2
+ */
+public class LilianasElite extends CardImpl {
+
+ public LilianasElite(UUID ownerId) {
+ super(ownerId, 94, "Liliana's Elite", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{2}{B}");
+ this.expansionSetCode = "EMN";
+ this.subtype.add("Zombie");
+ this.power = new MageInt(1);
+ this.toughness = new MageInt(1);
+
+ // Liliana's Elite gets +1/+1 for each creature card in your graveyard.
+ DynamicValue amount = new CardsInControllerGraveyardCount(new FilterCreatureCard());
+ Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostSourceEffect(amount, amount, Duration.WhileOnBattlefield));
+ this.addAbility(ability);
+ }
+
+ public LilianasElite(final LilianasElite card) {
+ super(card);
+ }
+
+ @Override
+ public LilianasElite copy() {
+ return new LilianasElite(this);
+ }
+}
diff --git a/Mage.Sets/src/mage/sets/eldritchmoon/MakeMischief.java b/Mage.Sets/src/mage/sets/eldritchmoon/MakeMischief.java
index b6f56a80632..d4ad42d74d5 100644
--- a/Mage.Sets/src/mage/sets/eldritchmoon/MakeMischief.java
+++ b/Mage.Sets/src/mage/sets/eldritchmoon/MakeMischief.java
@@ -34,7 +34,7 @@ import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Rarity;
import mage.game.permanent.token.DevilToken;
-import mage.target.TargetPlayer;
+import mage.target.common.TargetCreatureOrPlayer;
/**
*
@@ -49,7 +49,7 @@ public class MakeMischief extends CardImpl {
// Make Mischief deals 1 damage to target creature or player. Put a 1/1 red Devil creature token onto the battlefield.
// It has "When this creature dies, it deals 1 damage to target creature or player."
this.getSpellAbility().addEffect(new DamageTargetEffect(1));
- this.getSpellAbility().addTarget(new TargetPlayer());
+ this.getSpellAbility().addTarget(new TargetCreatureOrPlayer());
this.getSpellAbility().addEffect(new CreateTokenEffect(new DevilToken()));
}
diff --git a/Mage.Sets/src/mage/sets/eldritchmoon/MarkovCrusader.java b/Mage.Sets/src/mage/sets/eldritchmoon/MarkovCrusader.java
new file mode 100644
index 00000000000..a1d702cc0e2
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/eldritchmoon/MarkovCrusader.java
@@ -0,0 +1,85 @@
+/*
+ * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, are
+ * permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this list of
+ * conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice, this list
+ * of conditions and the following disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * The views and conclusions contained in the software and documentation are those of the
+ * authors and should not be interpreted as representing official policies, either expressed
+ * or implied, of BetaSteward_at_googlemail.com.
+ */
+package mage.sets.eldritchmoon;
+
+import java.util.UUID;
+import mage.MageInt;
+import mage.abilities.common.SimpleStaticAbility;
+import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition;
+import mage.abilities.decorator.ConditionalContinuousEffect;
+import mage.abilities.effects.Effect;
+import mage.abilities.effects.common.continuous.GainAbilitySourceEffect;
+import mage.abilities.keyword.HasteAbility;
+import mage.abilities.keyword.LifelinkAbility;
+import mage.cards.CardImpl;
+import mage.constants.CardType;
+import mage.constants.Rarity;
+import mage.constants.Zone;
+import mage.filter.common.FilterControlledCreaturePermanent;
+import mage.filter.predicate.mageobject.SubtypePredicate;
+import mage.filter.predicate.permanent.AnotherPredicate;
+
+/**
+ *
+ * @author LevelX2
+ */
+public class MarkovCrusader extends CardImpl {
+
+ private final String rule = "{this} has haste as long as you control another Vampire";
+ private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("another Vampire");
+
+ static {
+ filter.add(new AnotherPredicate());
+ filter.add(new SubtypePredicate("Vampire"));
+ }
+
+ public MarkovCrusader(UUID ownerId) {
+ super(ownerId, 95, "Markov Crusader", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{4}{B}");
+ this.expansionSetCode = "EMN";
+ this.subtype.add("Vampire");
+ this.subtype.add("Knight");
+ this.power = new MageInt(4);
+ this.toughness = new MageInt(3);
+
+ // Lifelink
+ this.addAbility(LifelinkAbility.getInstance());
+
+ // Markov Crusader has haste as long as you control another Vampire.
+ Effect effect = new ConditionalContinuousEffect(new GainAbilitySourceEffect(HasteAbility.getInstance()), new PermanentsOnTheBattlefieldCondition(filter), rule);
+ this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect));
+ }
+
+ public MarkovCrusader(final MarkovCrusader card) {
+ super(card);
+ }
+
+ @Override
+ public MarkovCrusader copy() {
+ return new MarkovCrusader(this);
+ }
+}
diff --git a/Mage.Sets/src/mage/sets/eldritchmoon/MirrorwingDragon.java b/Mage.Sets/src/mage/sets/eldritchmoon/MirrorwingDragon.java
new file mode 100644
index 00000000000..0fe6cb84b2e
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/eldritchmoon/MirrorwingDragon.java
@@ -0,0 +1,176 @@
+/*
+ * 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.TriggeredAbilityImpl;
+import mage.abilities.effects.common.CopySpellForEachItCouldTargetEffect;
+import mage.abilities.keyword.FlyingAbility;
+import mage.cards.CardImpl;
+import mage.constants.CardType;
+import mage.constants.Rarity;
+import mage.constants.Zone;
+import mage.filter.FilterInPlay;
+import mage.filter.common.FilterControlledCreaturePermanent;
+import mage.game.Game;
+import mage.game.events.GameEvent;
+import mage.game.events.GameEvent.EventType;
+import mage.game.permanent.Permanent;
+import mage.game.stack.Spell;
+import mage.players.Player;
+import mage.target.Target;
+import mage.util.TargetAddress;
+
+/**
+ *
+ * @author LevelX2
+ */
+public class MirrorwingDragon extends CardImpl {
+
+ public MirrorwingDragon(UUID ownerId) {
+ super(ownerId, 136, "Mirrorwing Dragon", Rarity.MYTHIC, new CardType[]{CardType.CREATURE}, "{3}{R}{R}");
+ this.expansionSetCode = "EMN";
+ this.subtype.add("Dragon");
+ this.power = new MageInt(4);
+ this.toughness = new MageInt(5);
+
+ // Flying
+ this.addAbility(FlyingAbility.getInstance());
+ // Whenever a player casts an instant or sorcery spell that targets only Mirrorwing Dragon,
+ // that player copies that spell for each other creature he or she controls that the spell could target.
+ // Each copy targets a different one of those creatures.
+ this.addAbility(new MirrorwingDragonCopyTriggeredAbility());
+ }
+
+ public MirrorwingDragon(final MirrorwingDragon card) {
+ super(card);
+ }
+
+ @Override
+ public MirrorwingDragon copy() {
+ return new MirrorwingDragon(this);
+ }
+}
+
+class MirrorwingDragonCopyTriggeredAbility extends TriggeredAbilityImpl {
+
+ MirrorwingDragonCopyTriggeredAbility() {
+ super(Zone.BATTLEFIELD, new MirrorwingDragonCopySpellEffect(), false);
+ }
+
+ MirrorwingDragonCopyTriggeredAbility(final MirrorwingDragonCopyTriggeredAbility ability) {
+ super(ability);
+ }
+
+ @Override
+ public MirrorwingDragonCopyTriggeredAbility copy() {
+ return new MirrorwingDragonCopyTriggeredAbility(this);
+ }
+
+ @Override
+ public boolean checkEventType(GameEvent event, Game game) {
+ return event.getType() == EventType.SPELL_CAST;
+ }
+
+ @Override
+ public boolean checkTrigger(GameEvent event, Game game) {
+ Spell spell = game.getStack().getSpell(event.getTargetId());
+ return checkSpell(spell, game);
+ }
+
+ private boolean checkSpell(Spell spell, Game game) {
+ if (spell != null
+ && (spell.getCardType().contains(CardType.INSTANT) || spell.getCardType().contains(CardType.SORCERY))) {
+ for (TargetAddress addr : TargetAddress.walk(spell)) {
+ Target targetInstance = addr.getTarget(spell);
+ for (UUID target : targetInstance.getTargets()) {
+ Permanent permanent = game.getPermanent(target);
+ if (permanent == null || !permanent.getId().equals(getSourceId())) {
+ return false;
+ }
+ }
+ }
+ getEffects().get(0).setValue("triggeringSpell", spell);
+ return true;
+ }
+ return false;
+ }
+
+ @Override
+ public String getRule() {
+ return "Whenever a player casts an instant or sorcery spell that targets only {this}, "
+ + "that player copies that spell for each creature he or she controls that the spell could target. "
+ + "Each copy targets a different one of those creatures.";
+ }
+}
+
+class MirrorwingDragonCopySpellEffect extends CopySpellForEachItCouldTargetEffect {
+
+ public MirrorwingDragonCopySpellEffect() {
+ this(new FilterControlledCreaturePermanent());
+ this.staticText = "that player copies that spell for each creature he or she controls that the spell could target. Each copy targets a different one of those creatures.";
+ }
+
+ public MirrorwingDragonCopySpellEffect(MirrorwingDragonCopySpellEffect effect) {
+ super(effect);
+ }
+
+ private MirrorwingDragonCopySpellEffect(FilterInPlay filter) {
+ super(filter);
+ }
+
+ @Override
+ protected Player getPlayer(Game game, Ability source) {
+ Spell spell = getSpell(game, source);
+ if (spell != null) {
+ return game.getPlayer(spell.getControllerId());
+ }
+ return null;
+ }
+
+ @Override
+ protected Spell getSpell(Game game, Ability source) {
+ return (Spell) getValue("triggeringSpell");
+ }
+
+ @Override
+ protected boolean changeTarget(Target target, Game game, Ability source) {
+ return true;
+ }
+
+ @Override
+ protected void modifyCopy(Spell copy, Game game, Ability source) {
+ }
+
+ @Override
+ public MirrorwingDragonCopySpellEffect copy() {
+ return new MirrorwingDragonCopySpellEffect(this);
+ }
+}
diff --git a/Mage.Sets/src/mage/sets/eldritchmoon/NahirisWrath.java b/Mage.Sets/src/mage/sets/eldritchmoon/NahirisWrath.java
new file mode 100644
index 00000000000..edd69182152
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/eldritchmoon/NahirisWrath.java
@@ -0,0 +1,123 @@
+/*
+ * 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.costs.Cost;
+import mage.abilities.costs.VariableCost;
+import mage.abilities.costs.VariableCostImpl;
+import mage.abilities.costs.common.DiscardTargetCost;
+import mage.abilities.dynamicvalue.common.DiscardCostCardConvertedMana;
+import mage.abilities.effects.Effect;
+import mage.abilities.effects.common.DamageTargetEffect;
+import mage.cards.CardImpl;
+import mage.constants.CardType;
+import mage.constants.Rarity;
+import mage.filter.FilterCard;
+import mage.filter.common.FilterCreatureOrPlaneswalkerPermanent;
+import mage.game.Game;
+import mage.players.Player;
+import mage.target.common.TargetCardInHand;
+import mage.target.common.TargetCreatureOrPlaneswalker;
+
+/**
+ *
+ * @author LevelX2
+ */
+public class NahirisWrath extends CardImpl {
+
+ public NahirisWrath(UUID ownerId) {
+ super(ownerId, 137, "Nahiri's Wrath", Rarity.MYTHIC, new CardType[]{CardType.SORCERY}, "{2}{R}");
+ this.expansionSetCode = "EMN";
+
+ // As an additional cost to cast Nahiri's Wrath, discard X cards.
+ this.getSpellAbility().addCost(new NahirisWrathAdditionalCost());
+
+ // Nahiri's Wrath deals damage equal to the total converted mana cost of the discarded cards to each of up to X target creatures and/or planeswalkers.
+ Effect effect = new DamageTargetEffect(new DiscardCostCardConvertedMana());
+ effect.setText("{this} deals damage equal to the total converted mana cost of the discarded cards to each of up to X target creatures and/or planeswalkers");
+ this.getSpellAbility().addEffect(effect);
+ }
+
+ @Override
+ public void adjustTargets(Ability ability, Game game) {
+ ability.getTargets().clear();
+ int numTargets = 0;
+ for (VariableCost cost : ability.getCosts().getVariableCosts()) {
+ if (cost instanceof NahirisWrathAdditionalCost) {
+ numTargets = ((NahirisWrathAdditionalCost) cost).getAmount();
+ break;
+ }
+ }
+ if (numTargets > 0) {
+ ability.addTarget(new TargetCreatureOrPlaneswalker(0, numTargets, new FilterCreatureOrPlaneswalkerPermanent(), false));
+ }
+ }
+
+ public NahirisWrath(final NahirisWrath card) {
+ super(card);
+ }
+
+ @Override
+ public NahirisWrath copy() {
+ return new NahirisWrath(this);
+ }
+}
+
+class NahirisWrathAdditionalCost extends VariableCostImpl {
+
+ NahirisWrathAdditionalCost() {
+ super("cards to discard");
+ this.text = "As an additional cost to cast {this}, discard X cards";
+ }
+
+ NahirisWrathAdditionalCost(final NahirisWrathAdditionalCost cost) {
+ super(cost);
+ }
+
+ @Override
+ public NahirisWrathAdditionalCost copy() {
+ return new NahirisWrathAdditionalCost(this);
+ }
+
+ @Override
+ public int getMaxValue(Ability source, Game game) {
+ Player controller = game.getPlayer(source.getControllerId());
+ if (controller != null) {
+ return controller.getHand().size();
+ }
+ return 0;
+ }
+
+ @Override
+ public Cost getFixedCostsFromAnnouncedValue(int xValue) {
+ TargetCardInHand target = new TargetCardInHand(xValue, new FilterCard("cards to discard"));
+ return new DiscardTargetCost(target);
+ }
+}
diff --git a/Mage.Sets/src/mage/sets/eldritchmoon/NephaliaAcademy.java b/Mage.Sets/src/mage/sets/eldritchmoon/NephaliaAcademy.java
new file mode 100644
index 00000000000..2e5b922462f
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/eldritchmoon/NephaliaAcademy.java
@@ -0,0 +1,148 @@
+/*
+ * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, are
+ * permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this list of
+ * conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice, this list
+ * of conditions and the following disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * The views and conclusions contained in the software and documentation are those of the
+ * authors and should not be interpreted as representing official policies, either expressed
+ * or implied, of BetaSteward_at_googlemail.com.
+ */
+package mage.sets.eldritchmoon;
+
+import java.util.UUID;
+import mage.abilities.Ability;
+import mage.abilities.common.SimpleStaticAbility;
+import mage.abilities.effects.ReplacementEffectImpl;
+import mage.abilities.mana.ColorlessManaAbility;
+import mage.cards.Card;
+import mage.cards.CardImpl;
+import mage.cards.Cards;
+import mage.cards.CardsImpl;
+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.ZoneChangeEvent;
+import mage.players.Player;
+
+/**
+ *
+ * @author escplan9 (Derek Monturo - dmontur1 at gmail dot com)
+ */
+public class NephaliaAcademy extends CardImpl {
+
+ public NephaliaAcademy(UUID ownerId) {
+ super(ownerId, 205, "Nephalia Academy", Rarity.UNCOMMON, new CardType[]{CardType.LAND}, "");
+ this.expansionSetCode = "EMN";
+
+ // If a spell or ability an opponent controls causes you to discard a card, you may reveal that card and put it on top of your library instead of putting it anywhere else.
+ this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new NephaliaAcademyEffect()));
+
+ // {T}: Add {C} to your mana pool.
+ this.addAbility(new ColorlessManaAbility());
+ }
+
+ public NephaliaAcademy(final NephaliaAcademy card) {
+ super(card);
+ }
+
+ @Override
+ public NephaliaAcademy copy() {
+ return new NephaliaAcademy(this);
+ }
+}
+
+class NephaliaAcademyEffect extends ReplacementEffectImpl {
+
+ private UUID cardId;
+ private int zoneChangeCounter;
+
+ public NephaliaAcademyEffect() {
+ super(Duration.WhileOnBattlefield, Outcome.Benefit);
+ staticText = "If a spell or ability an opponent controls causes you to discard a card, you may reveal that card and put it on top of your library instead of putting it anywhere else.";
+ }
+
+ public NephaliaAcademyEffect(final NephaliaAcademyEffect effect) {
+ super(effect);
+ this.cardId = effect.cardId;
+ this.zoneChangeCounter = effect.zoneChangeCounter;
+ }
+
+ @Override
+ public NephaliaAcademyEffect copy() {
+ return new NephaliaAcademyEffect(this);
+ }
+
+ @Override
+ public boolean checksEventType(GameEvent event, Game game) {
+ return event.getType().equals(GameEvent.EventType.DISCARD_CARD)
+ || event.getType().equals(GameEvent.EventType.ZONE_CHANGE);
+ }
+
+ @Override
+ public boolean applies(GameEvent event, Ability source, Game game) {
+ if (event.getType().equals(GameEvent.EventType.DISCARD_CARD)) {
+ return event.getPlayerId().equals(source.getControllerId());
+ }
+ if (event.getType().equals(GameEvent.EventType.ZONE_CHANGE)) {
+ if (event.getTargetId().equals(cardId) && game.getState().getZoneChangeCounter(event.getTargetId()) == zoneChangeCounter) {
+ if (((ZoneChangeEvent) event).getFromZone().equals(Zone.HAND) && ((ZoneChangeEvent) event).getToZone().equals(Zone.GRAVEYARD)) {
+ return true;
+ }
+ }
+ }
+ return false;
+ }
+
+ @Override
+ public boolean replaceEvent(GameEvent event, Ability source, Game game) {
+ if (event.getType().equals(GameEvent.EventType.DISCARD_CARD)) {
+ // only save card info
+ Card card = game.getCard(event.getTargetId());
+ if (card != null) {
+ cardId = card.getId();
+ zoneChangeCounter = game.getState().getZoneChangeCounter(cardId);
+ }
+ return false;
+ }
+ if (event.getType().equals(GameEvent.EventType.ZONE_CHANGE)) {
+ Player controller = game.getPlayer(source.getControllerId());
+ Card card = game.getCard(event.getTargetId());
+ if (controller != null && card != null) {
+ cardId = null;
+ zoneChangeCounter = 0;
+ if (controller.chooseUse(outcome, "Put " + card.getIdName() + " on top of your library instead?", source, game)) {
+
+ Cards cardsToLibrary = new CardsImpl(card);
+ // reveal the card then put it on top of your library
+ controller.revealCards(card.getName(), cardsToLibrary, game);
+ controller.putCardsOnTopOfLibrary(cardsToLibrary, game, source, false);
+ return true;
+ }
+ }
+ }
+ return false;
+ }
+
+}
\ No newline at end of file
diff --git a/Mage.Sets/src/mage/sets/eldritchmoon/OtherworldlyOutburst.java b/Mage.Sets/src/mage/sets/eldritchmoon/OtherworldlyOutburst.java
new file mode 100644
index 00000000000..6c3c1f7629e
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/eldritchmoon/OtherworldlyOutburst.java
@@ -0,0 +1,140 @@
+/*
+ * 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.effects.OneShotEffect;
+import mage.abilities.effects.common.CreateTokenEffect;
+import mage.abilities.effects.common.continuous.BoostTargetEffect;
+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.events.ZoneChangeEvent;
+import mage.target.common.TargetCreaturePermanent;
+
+/**
+ *
+ * @author LevelX2
+ */
+public class OtherworldlyOutburst extends CardImpl {
+
+ public OtherworldlyOutburst(UUID ownerId) {
+ super(ownerId, 138, "Otherworldly Outburst", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{R}");
+ this.expansionSetCode = "EMN";
+
+ // Target creature gets +1/+0 until end of turn. When that creature dies this turn, put a 3/2 colorless Eldrazi Horror creature token onto the battlefield.
+ this.getSpellAbility().addTarget(new TargetCreaturePermanent());
+ this.getSpellAbility().addEffect(new BoostTargetEffect(1, 0, Duration.EndOfTurn));
+ this.getSpellAbility().addEffect(new OtherworldlyOutburstEffect());
+ }
+
+ public OtherworldlyOutburst(final OtherworldlyOutburst card) {
+ super(card);
+ }
+
+ @Override
+ public OtherworldlyOutburst copy() {
+ return new OtherworldlyOutburst(this);
+ }
+}
+
+class OtherworldlyOutburstEffect extends OneShotEffect {
+
+ public OtherworldlyOutburstEffect() {
+ super(Outcome.UnboostCreature);
+ this.staticText = "When that creature dies this turn, put a 3/2 colorless Eldrazi Horror creature token onto the battlefield";
+ }
+
+ public OtherworldlyOutburstEffect(final OtherworldlyOutburstEffect effect) {
+ super(effect);
+ }
+
+ @Override
+ public OtherworldlyOutburstEffect copy() {
+ return new OtherworldlyOutburstEffect(this);
+ }
+
+ @Override
+ public boolean apply(Game game, Ability source) {
+ DelayedTriggeredAbility delayedAbility = new OtherworldlyOutburstDelayedTriggeredAbility(source.getFirstTarget());
+ delayedAbility.setSourceId(source.getSourceId());
+ delayedAbility.setControllerId(source.getControllerId());
+ delayedAbility.setSourceObject(source.getSourceObject(game), game);
+ game.addDelayedTriggeredAbility(delayedAbility);
+ return true;
+ }
+}
+
+class OtherworldlyOutburstDelayedTriggeredAbility extends DelayedTriggeredAbility {
+
+ private final UUID target;
+
+ public OtherworldlyOutburstDelayedTriggeredAbility(UUID target) {
+ super(new CreateTokenEffect(new EldraziHorrorToken()), Duration.EndOfTurn);
+ this.target = target;
+ }
+
+ public OtherworldlyOutburstDelayedTriggeredAbility(OtherworldlyOutburstDelayedTriggeredAbility ability) {
+ super(ability);
+ this.target = ability.target;
+ }
+
+ @Override
+ public boolean checkEventType(GameEvent event, Game game) {
+ return event.getType() == EventType.ZONE_CHANGE;
+ }
+
+ @Override
+ public boolean checkTrigger(GameEvent event, Game game) {
+ if (event.getTargetId().equals(target)) {
+ ZoneChangeEvent zEvent = (ZoneChangeEvent) event;
+ if (zEvent.getFromZone() == Zone.BATTLEFIELD && zEvent.getToZone() == Zone.GRAVEYARD) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ @Override
+ public OtherworldlyOutburstDelayedTriggeredAbility copy() {
+ return new OtherworldlyOutburstDelayedTriggeredAbility(this);
+ }
+
+ @Override
+ public String getRule() {
+ return "When that creature dies this turn, put a 3/2 colorless Eldrazi Horror creature token onto the battlefield.";
+ }
+}
diff --git a/Mage.Sets/src/mage/sets/eldritchmoon/PropheticRavings.java b/Mage.Sets/src/mage/sets/eldritchmoon/PropheticRavings.java
new file mode 100644
index 00000000000..4251138ac6b
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/eldritchmoon/PropheticRavings.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.abilities.Ability;
+import mage.abilities.common.SimpleActivatedAbility;
+import mage.abilities.common.SimpleStaticAbility;
+import mage.abilities.costs.common.DiscardCardCost;
+import mage.abilities.costs.common.TapSourceCost;
+import mage.abilities.effects.Effect;
+import mage.abilities.effects.common.AttachEffect;
+import mage.abilities.effects.common.DrawCardSourceControllerEffect;
+import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect;
+import mage.abilities.keyword.EnchantAbility;
+import mage.abilities.keyword.HasteAbility;
+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.target.TargetPermanent;
+import mage.target.common.TargetCreaturePermanent;
+
+/**
+ *
+ * @author LevelX2
+ */
+public class PropheticRavings extends CardImpl {
+
+ public PropheticRavings(UUID ownerId) {
+ super(ownerId, 139, "Prophetic Ravings", Rarity.COMMON, new CardType[]{CardType.ENCHANTMENT}, "{R}");
+ 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 has haste and "{T}, Discard a card: Draw a card."
+ ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(HasteAbility.getInstance(), AttachmentType.AURA));
+ Ability abilityToGain = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DrawCardSourceControllerEffect(1), new TapSourceCost());
+ abilityToGain.addCost(new DiscardCardCost());
+ Effect effect = new GainAbilityAttachedEffect(abilityToGain, AttachmentType.AURA);
+ effect.setText("and \"{T}, Discard a card: Draw a card.\"");
+ ability.addEffect(effect);
+ this.addAbility(ability);
+ }
+
+ public PropheticRavings(final PropheticRavings card) {
+ super(card);
+ }
+
+ @Override
+ public PropheticRavings copy() {
+ return new PropheticRavings(this);
+ }
+}
diff --git a/Mage.Sets/src/mage/sets/eldritchmoon/PryingQuestions.java b/Mage.Sets/src/mage/sets/eldritchmoon/PryingQuestions.java
new file mode 100644
index 00000000000..f072fca6556
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/eldritchmoon/PryingQuestions.java
@@ -0,0 +1,106 @@
+/*
+ * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, are
+ * permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this list of
+ * conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice, this list
+ * of conditions and the following disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * The views and conclusions contained in the software and documentation are those of the
+ * authors and should not be interpreted as representing official policies, either expressed
+ * or implied, of BetaSteward_at_googlemail.com.
+ */
+package mage.sets.eldritchmoon;
+
+import java.util.UUID;
+import mage.abilities.Ability;
+import mage.abilities.effects.OneShotEffect;
+import mage.abilities.effects.common.LoseLifeTargetEffect;
+import mage.cards.Card;
+import mage.cards.CardImpl;
+import mage.constants.CardType;
+import mage.constants.Outcome;
+import mage.constants.Rarity;
+import mage.constants.Zone;
+import mage.game.Game;
+import mage.players.Player;
+import mage.target.common.TargetCardInHand;
+import mage.target.common.TargetOpponent;
+
+/**
+ *
+ * @author LevelX2
+ */
+public class PryingQuestions extends CardImpl {
+
+ public PryingQuestions(UUID ownerId) {
+ super(ownerId, 101, "Prying Questions", Rarity.UNCOMMON, new CardType[]{CardType.SORCERY}, "{2}{B}");
+ this.expansionSetCode = "EMN";
+
+ // Target opponent loses 3 life and puts a card from his or her hand on top of his or her library.
+ this.getSpellAbility().addTarget(new TargetOpponent());
+ this.getSpellAbility().addEffect(new LoseLifeTargetEffect(3));
+ this.getSpellAbility().addEffect(new PryingQuestionsEffect());
+
+ }
+
+ public PryingQuestions(final PryingQuestions card) {
+ super(card);
+ }
+
+ @Override
+ public PryingQuestions copy() {
+ return new PryingQuestions(this);
+ }
+}
+
+class PryingQuestionsEffect extends OneShotEffect {
+
+ public PryingQuestionsEffect() {
+ super(Outcome.Detriment);
+ this.staticText = "and puts a card from his or her hand on top of his or her library";
+ }
+
+ public PryingQuestionsEffect(final PryingQuestionsEffect effect) {
+ super(effect);
+ }
+
+ @Override
+ public PryingQuestionsEffect copy() {
+ return new PryingQuestionsEffect(this);
+ }
+
+ @Override
+ public boolean apply(Game game, Ability source) {
+ Player targetOpponent = game.getPlayer(this.getTargetPointer().getFirst(game, source));
+ if (targetOpponent != null) {
+ if (targetOpponent.getHand().size() > 0) {
+ TargetCardInHand target = new TargetCardInHand();
+ target.setNotTarget(true);
+ target.setTargetName("a card from your hand to put on top of your library");
+ targetOpponent.choose(Outcome.Detriment, target, source.getSourceId(), game);
+ Card card = targetOpponent.getHand().get(target.getFirstTarget(), game);
+ if (card != null) {
+ targetOpponent.moveCardToLibraryWithInfo(card, source.getSourceId(), game, Zone.HAND, true, false);
+ }
+ }
+ return true;
+ }
+ return false;
+ }
+}
diff --git a/Mage.Sets/src/mage/sets/eldritchmoon/RuthlessDisposal.java b/Mage.Sets/src/mage/sets/eldritchmoon/RuthlessDisposal.java
new file mode 100644
index 00000000000..ecfa343cfc9
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/eldritchmoon/RuthlessDisposal.java
@@ -0,0 +1,70 @@
+/*
+ * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, are
+ * permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this list of
+ * conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice, this list
+ * of conditions and the following disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * The views and conclusions contained in the software and documentation are those of the
+ * authors and should not be interpreted as representing official policies, either expressed
+ * or implied, of BetaSteward_at_googlemail.com.
+ */
+package mage.sets.eldritchmoon;
+
+import java.util.UUID;
+import mage.abilities.costs.common.DiscardTargetCost;
+import mage.abilities.costs.common.SacrificeTargetCost;
+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.filter.FilterCard;
+import mage.target.common.TargetCardInHand;
+import mage.target.common.TargetControlledCreaturePermanent;
+import mage.target.common.TargetCreaturePermanent;
+
+/**
+ *
+ * @author LevelX2
+ */
+public class RuthlessDisposal extends CardImpl {
+
+ public RuthlessDisposal(UUID ownerId) {
+ super(ownerId, 103, "Ruthless Disposal", Rarity.UNCOMMON, new CardType[]{CardType.SORCERY}, "{4}{B}");
+ this.expansionSetCode = "EMN";
+
+ // As an additional cost to cast Ruthless Disposal, discard a card and sacrifice a creature.
+ this.getSpellAbility().addCost(new DiscardTargetCost(new TargetCardInHand(new FilterCard("card to discard"))));
+ this.getSpellAbility().addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent()));
+ // Two target creatures each get -13/-13 until end of turn.
+ this.getSpellAbility().addTarget(new TargetCreaturePermanent(2));
+ this.getSpellAbility().addEffect(new BoostTargetEffect(-13, -13, Duration.EndOfTurn));
+
+ }
+
+ public RuthlessDisposal(final RuthlessDisposal card) {
+ super(card);
+ }
+
+ @Override
+ public RuthlessDisposal copy() {
+ return new RuthlessDisposal(this);
+ }
+}
diff --git a/Mage.Sets/src/mage/sets/eldritchmoon/SavageAlliance.java b/Mage.Sets/src/mage/sets/eldritchmoon/SavageAlliance.java
new file mode 100644
index 00000000000..d484b0c3a6c
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/eldritchmoon/SavageAlliance.java
@@ -0,0 +1,159 @@
+/*
+ * 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.List;
+import java.util.UUID;
+import mage.abilities.Ability;
+import mage.abilities.Mode;
+import mage.abilities.costs.mana.GenericManaCost;
+import mage.abilities.effects.ContinuousEffect;
+import mage.abilities.effects.OneShotEffect;
+import mage.abilities.effects.common.DamageTargetEffect;
+import mage.abilities.effects.common.continuous.GainAbilityAllEffect;
+import mage.abilities.keyword.EscalateAbility;
+import mage.abilities.keyword.TrampleAbility;
+import mage.cards.CardImpl;
+import mage.constants.CardType;
+import mage.constants.Duration;
+import mage.constants.Outcome;
+import mage.constants.Rarity;
+import mage.filter.common.FilterCreaturePermanent;
+import mage.filter.predicate.permanent.ControllerIdPredicate;
+import mage.game.Game;
+import mage.game.permanent.Permanent;
+import mage.players.Player;
+import mage.target.TargetPlayer;
+import mage.target.common.TargetCreaturePermanent;
+import mage.target.common.TargetOpponent;
+
+/**
+ *
+ * @author LevelX2
+ */
+public class SavageAlliance extends CardImpl {
+
+ public SavageAlliance(UUID ownerId) {
+ super(ownerId, 140, "Savage Alliance", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{2}{R}");
+ this.expansionSetCode = "EMN";
+
+ // Escalate {1}
+ this.addAbility(new EscalateAbility(new GenericManaCost(1)));
+
+ // Choose one or more —
+ this.getSpellAbility().getModes().setMinModes(1);
+ this.getSpellAbility().getModes().setMaxModes(3);
+
+ // Creatures target player controls gain trample until end of turn.
+ this.getSpellAbility().addEffect(new SavageAllianceGainTrampleEffect());
+ this.getSpellAbility().addTarget(new TargetPlayer());
+
+ // Savage Alliance deals 2 damage to target creature.;
+ Mode mode = new Mode();
+ mode.getEffects().add(new DamageTargetEffect(2));
+ mode.getTargets().add(new TargetCreaturePermanent());
+ this.getSpellAbility().addMode(mode);
+
+ // Savage Alliance deals 1 damage to each creature target opponent controls.
+ mode = new Mode();
+ mode.getEffects().add(new SavageAllianceDamageEffect());
+ mode.getTargets().add(new TargetOpponent());
+ this.getSpellAbility().addMode(mode);
+ }
+
+ public SavageAlliance(final SavageAlliance card) {
+ super(card);
+ }
+
+ @Override
+ public SavageAlliance copy() {
+ return new SavageAlliance(this);
+ }
+}
+
+class SavageAllianceGainTrampleEffect extends OneShotEffect {
+
+ public SavageAllianceGainTrampleEffect() {
+ super(Outcome.AddAbility);
+ staticText = "Creatures target player controls gain trample until end of turn";
+ }
+
+ public SavageAllianceGainTrampleEffect(final SavageAllianceGainTrampleEffect effect) {
+ super(effect);
+ }
+
+ @java.lang.Override
+ public SavageAllianceGainTrampleEffect copy() {
+ return new SavageAllianceGainTrampleEffect(this);
+ }
+
+ @java.lang.Override
+ public boolean apply(Game game, Ability source) {
+ Player player = game.getPlayer(this.getTargetPointer().getFirst(game, source));
+ if (player != null) {
+ FilterCreaturePermanent filter = new FilterCreaturePermanent();
+ filter.add(new ControllerIdPredicate((player.getId())));
+ ContinuousEffect effect = new GainAbilityAllEffect(TrampleAbility.getInstance(), Duration.EndOfTurn, filter);
+ game.addEffect(effect, source);
+ return true;
+ }
+ return false;
+ }
+}
+
+class SavageAllianceDamageEffect extends OneShotEffect {
+
+ public SavageAllianceDamageEffect() {
+ super(Outcome.Damage);
+ this.staticText = "{this} deals 1 damage to each creature target opponent controls";
+ }
+
+ public SavageAllianceDamageEffect(final SavageAllianceDamageEffect effect) {
+ super(effect);
+ }
+
+ @Override
+ public SavageAllianceDamageEffect copy() {
+ return new SavageAllianceDamageEffect(this);
+ }
+
+ @Override
+ public boolean apply(Game game, Ability source) {
+ Player player = game.getPlayer(source.getFirstTarget());
+ if (player != null) {
+ FilterCreaturePermanent filter = new FilterCreaturePermanent();
+ filter.add(new ControllerIdPredicate(player.getId()));
+ List creatures = game.getBattlefield().getActivePermanents(filter, source.getControllerId(), source.getSourceId(), game);
+ for (Permanent creature : creatures) {
+ creature.damage(1, source.getSourceId(), game, false, true);
+ }
+ return true;
+ }
+ return false;
+ }
+}
diff --git a/Mage.Sets/src/mage/sets/eldritchmoon/ShredsOfSanity.java b/Mage.Sets/src/mage/sets/eldritchmoon/ShredsOfSanity.java
new file mode 100644
index 00000000000..f26efa83929
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/eldritchmoon/ShredsOfSanity.java
@@ -0,0 +1,118 @@
+/*
+ * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, are
+ * permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this list of
+ * conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice, this list
+ * of conditions and the following disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * The views and conclusions contained in the software and documentation are those of the
+ * authors and should not be interpreted as representing official policies, either expressed
+ * or implied, of BetaSteward_at_googlemail.com.
+ */
+package mage.sets.eldritchmoon;
+
+import java.util.UUID;
+import mage.abilities.Ability;
+import mage.abilities.effects.OneShotEffect;
+import mage.abilities.effects.common.ExileSourceEffect;
+import mage.cards.Card;
+import mage.cards.CardImpl;
+import mage.cards.Cards;
+import mage.cards.CardsImpl;
+import mage.constants.CardType;
+import mage.constants.Outcome;
+import mage.constants.Rarity;
+import mage.constants.Zone;
+import mage.filter.FilterCard;
+import mage.filter.predicate.mageobject.CardTypePredicate;
+import mage.game.Game;
+import mage.players.Player;
+import mage.target.TargetCard;
+
+/**
+ *
+ * @author LevelX2
+ */
+public class ShredsOfSanity extends CardImpl {
+
+ private final static FilterCard filterInstant = new FilterCard("an instant card in your graveyard");
+ private final static FilterCard filterSorcery = new FilterCard("a sorcery card in your graveyard");
+
+ static {
+ filterInstant.add(new CardTypePredicate(CardType.INSTANT));
+ filterSorcery.add(new CardTypePredicate(CardType.SORCERY));
+ }
+
+ public ShredsOfSanity(UUID ownerId) {
+ super(ownerId, 141, "Shreds of Sanity", Rarity.UNCOMMON, new CardType[]{CardType.SORCERY}, "{2}{R}");
+ this.expansionSetCode = "EMN";
+
+ // Return up to one target instant card and up to one target sorcery card from your graveyard to your hand, then discard a card. Exile Shreds of Sanity.
+ this.getSpellAbility().addEffect(new ShredsOfSanityEffect());
+ this.getSpellAbility().addTarget(new TargetCard(0, 1, Zone.GRAVEYARD, filterInstant));
+ this.getSpellAbility().addTarget(new TargetCard(0, 1, Zone.GRAVEYARD, filterSorcery));
+ this.getSpellAbility().addEffect(new ExileSourceEffect());
+ }
+
+ public ShredsOfSanity(final ShredsOfSanity card) {
+ super(card);
+ }
+
+ @Override
+ public ShredsOfSanity copy() {
+ return new ShredsOfSanity(this);
+ }
+}
+
+class ShredsOfSanityEffect extends OneShotEffect {
+
+ public ShredsOfSanityEffect() {
+ super(Outcome.Benefit);
+ this.staticText = "return up to one target instant card and up to one target sorcery card from your graveyard to your hand, then discard a card";
+ }
+
+ public ShredsOfSanityEffect(final ShredsOfSanityEffect effect) {
+ super(effect);
+ }
+
+ @Override
+ public ShredsOfSanityEffect copy() {
+ return new ShredsOfSanityEffect(this);
+ }
+
+ @Override
+ public boolean apply(Game game, Ability source) {
+ Player controller = game.getPlayer(source.getControllerId());
+ if (controller != null) {
+ Cards cardsToHand = new CardsImpl();
+ Card card = game.getCard(getTargetPointer().getFirst(game, source));
+ if (card != null) {
+ cardsToHand.add(card);
+ }
+ card = game.getCard(source.getTargets().get(1).getFirstTarget());
+ if (card != null) {
+ cardsToHand.add(card);
+ }
+ controller.moveCards(cardsToHand, Zone.HAND, source, game);
+ controller.discardOne(false, source, game);
+ return true;
+ }
+ return false;
+ }
+}
diff --git a/Mage.Sets/src/mage/sets/eldritchmoon/SkirsdagSupplicant.java b/Mage.Sets/src/mage/sets/eldritchmoon/SkirsdagSupplicant.java
new file mode 100644
index 00000000000..34941dfe896
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/eldritchmoon/SkirsdagSupplicant.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.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.LoseLifeAllPlayersEffect;
+import mage.cards.CardImpl;
+import mage.constants.CardType;
+import mage.constants.Rarity;
+import mage.constants.Zone;
+
+/**
+ *
+ * @author LevelX2
+ */
+public class SkirsdagSupplicant extends CardImpl {
+
+ public SkirsdagSupplicant(UUID ownerId) {
+ super(ownerId, 104, "Skirsdag Supplicant", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{2}{B}");
+ this.expansionSetCode = "EMN";
+ this.subtype.add("Human");
+ this.subtype.add("Cleric");
+ this.power = new MageInt(2);
+ this.toughness = new MageInt(3);
+
+ // {B}, {T}, Discard a card: Each player loses 2 life.
+ Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new LoseLifeAllPlayersEffect(2), new ManaCostsImpl("{B}"));
+ ability.addCost(new TapSourceCost());
+ ability.addCost(new DiscardCardCost());
+ this.addAbility(ability);
+ }
+
+ public SkirsdagSupplicant(final SkirsdagSupplicant card) {
+ super(card);
+ }
+
+ @Override
+ public SkirsdagSupplicant copy() {
+ return new SkirsdagSupplicant(this);
+ }
+}
diff --git a/Mage.Sets/src/mage/sets/eldritchmoon/SlayersCleaver.java b/Mage.Sets/src/mage/sets/eldritchmoon/SlayersCleaver.java
new file mode 100644
index 00000000000..b59fd670a74
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/eldritchmoon/SlayersCleaver.java
@@ -0,0 +1,120 @@
+/*
+ * 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.costs.mana.ManaCostsImpl;
+import mage.abilities.effects.RequirementEffect;
+import mage.abilities.effects.common.continuous.BoostEquippedEffect;
+import mage.abilities.keyword.EquipAbility;
+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.permanent.Permanent;
+
+/**
+ *
+ * @author LevelX2
+ */
+public class SlayersCleaver extends CardImpl {
+
+ public SlayersCleaver(UUID ownerId) {
+ super(ownerId, 198, "Slayer's Cleaver", Rarity.UNCOMMON, new CardType[]{CardType.ARTIFACT}, "{3}");
+ this.expansionSetCode = "EMN";
+ this.subtype.add("Equipment");
+
+ // Equipped creature gets +3/+1 and must be blocked by an Eldrazi if able.
+ Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(3, 1));
+ // TODO: The effect does not work correctly yet, we need to do some chnanges to combat handling to fix this
+ ability.addEffect(new SlayersCleaverEffect());
+ this.addAbility(ability);
+ // Equip {4}
+ this.addAbility(new EquipAbility(Outcome.BoostCreature, new ManaCostsImpl<>("{4}")));
+ }
+
+ public SlayersCleaver(final SlayersCleaver card) {
+ super(card);
+ }
+
+ @Override
+ public SlayersCleaver copy() {
+ return new SlayersCleaver(this);
+ }
+}
+
+class SlayersCleaverEffect extends RequirementEffect {
+
+ public SlayersCleaverEffect() {
+ this(Duration.WhileOnBattlefield);
+ }
+
+ public SlayersCleaverEffect(Duration duration) {
+ super(duration);
+ staticText = "and must be blocked by an Eldrazi if able";
+ }
+
+ public SlayersCleaverEffect(final SlayersCleaverEffect effect) {
+ super(effect);
+ }
+
+ @Override
+ public boolean applies(Permanent permanent, Ability source, Game game) {
+ return permanent.canBlock(source.getSourceId(), game) && permanent.hasSubtype("Eldrazi");
+ }
+
+ @Override
+ public boolean mustAttack(Game game) {
+ return false;
+ }
+
+ @Override
+ public boolean mustBlock(Game game) {
+ return false;
+ }
+
+ @Override
+ public UUID mustBlockAttackerIfElseUnblocked(Ability source, Game game) {
+ Permanent equipment = game.getPermanent(source.getSourceId());
+ if (equipment != null) {
+ return equipment.getAttachedTo();
+ }
+ return null;
+ }
+
+ @Override
+ public SlayersCleaverEffect copy() {
+ return new SlayersCleaverEffect(this);
+ }
+
+}
diff --git a/Mage.Sets/src/mage/sets/eldritchmoon/SpellQueller.java b/Mage.Sets/src/mage/sets/eldritchmoon/SpellQueller.java
new file mode 100644
index 00000000000..3e40d16c2d3
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/eldritchmoon/SpellQueller.java
@@ -0,0 +1,174 @@
+/*
+ * 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.EntersBattlefieldTriggeredAbility;
+import mage.abilities.common.LeavesBattlefieldTriggeredAbility;
+import mage.abilities.effects.OneShotEffect;
+import mage.abilities.effects.common.ReturnFromExileForSourceEffect;
+import mage.abilities.keyword.FlashAbility;
+import mage.abilities.keyword.FlyingAbility;
+import mage.cards.Card;
+import mage.cards.CardImpl;
+import mage.constants.CardType;
+import mage.constants.Outcome;
+import mage.constants.Rarity;
+import mage.filter.Filter;
+import mage.filter.FilterSpell;
+import mage.filter.predicate.mageobject.ConvertedManaCostPredicate;
+import mage.game.ExileZone;
+import mage.game.Game;
+import mage.game.permanent.Permanent;
+import mage.game.stack.Spell;
+import mage.players.Player;
+import mage.target.TargetSpell;
+import mage.util.CardUtil;
+import org.apache.log4j.Logger;
+
+/**
+ *
+ * @author LevelX2
+ */
+public class SpellQueller extends CardImpl {
+
+ private final static FilterSpell filter = new FilterSpell("spell with converted mana cost 4 or less");
+
+ static {
+ filter.add(new ConvertedManaCostPredicate(Filter.ComparisonType.LessThan, 5));
+ }
+
+ public SpellQueller(UUID ownerId) {
+ super(ownerId, 189, "Spell Queller", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{1}{W}{U}");
+ this.expansionSetCode = "EMN";
+ this.subtype.add("Spirit");
+ this.power = new MageInt(2);
+ this.toughness = new MageInt(3);
+
+ // Flash
+ this.addAbility(FlashAbility.getInstance());
+ // Flying
+ this.addAbility(FlyingAbility.getInstance());
+ // When Spell Queller enters the battlefied, exile target spell with converted mana cost 4 or less.
+ Ability ability1 = new EntersBattlefieldTriggeredAbility(new SpellQuellerEntersEffect(), false);
+ ability1.addTarget(new TargetSpell(filter));
+ this.addAbility(ability1);
+
+ // When Spell Queller leaves the battlefield, the exiled card's owner may cast that card without paying its mana cost.
+ Ability ability2 = new LeavesBattlefieldTriggeredAbility(new SpellQuellerLeavesEffect(), false);
+ this.addAbility(ability2);
+ }
+
+ public SpellQueller(final SpellQueller card) {
+ super(card);
+ }
+
+ @Override
+ public SpellQueller copy() {
+ return new SpellQueller(this);
+ }
+}
+
+class SpellQuellerEntersEffect extends OneShotEffect {
+
+ public SpellQuellerEntersEffect() {
+ super(Outcome.Benefit);
+ this.staticText = "exile target spell with converted mana cost 4 or less";
+ }
+
+ public SpellQuellerEntersEffect(final SpellQuellerEntersEffect effect) {
+ super(effect);
+ }
+
+ @Override
+ public SpellQuellerEntersEffect copy() {
+ return new SpellQuellerEntersEffect(this);
+ }
+
+ @Override
+ public boolean apply(Game game, Ability source) {
+ Player controller = game.getPlayer(source.getControllerId());
+ MageObject sourceObject = source.getSourceObject(game);
+ if (controller != null && sourceObject != null) {
+ Spell spell = game.getStack().getSpell(getTargetPointer().getFirst(game, source));
+ if (spell != null) {
+ UUID exileId = CardUtil.getExileZoneId(game, source.getSourceId(), source.getSourceObjectZoneChangeCounter());
+ return controller.moveCardsToExile(spell, source, game, true, exileId, sourceObject.getIdName());
+ }
+ return true;
+ }
+ return false;
+ }
+}
+
+class SpellQuellerLeavesEffect extends OneShotEffect {
+
+ public SpellQuellerLeavesEffect() {
+ super(Outcome.Benefit);
+ this.staticText = "the exiled card's owner may cast that card without paying its mana cost";
+ }
+
+ public SpellQuellerLeavesEffect(final SpellQuellerLeavesEffect effect) {
+ super(effect);
+ }
+
+ @Override
+ public SpellQuellerLeavesEffect copy() {
+ return new SpellQuellerLeavesEffect(this);
+ }
+
+ @Override
+ public boolean apply(Game game, Ability source) {
+ Player controller = game.getPlayer(source.getControllerId());
+ MageObject sourceObject = source.getSourceObject(game);
+ if (controller != null && sourceObject != null) {
+ Permanent permanentLeftBattlefield = (Permanent) getValue("permanentLeftBattlefield");
+ if (permanentLeftBattlefield == null) {
+ Logger.getLogger(ReturnFromExileForSourceEffect.class).error("Permanent not found: " + sourceObject.getName());
+ return false;
+ }
+ ExileZone exile = game.getExile().getExileZone(CardUtil.getExileZoneId(game, source.getSourceId(), permanentLeftBattlefield.getZoneChangeCounter(game)));
+ if (exile != null) { // null is valid if source left battlefield before enters the battlefield effect resolved
+ Card card = exile.getCards(game).iterator().next();
+ if (card != null) {
+ Player cardOwner = game.getPlayer(card.getOwnerId());
+ if (cardOwner != null) {
+ if (cardOwner.chooseUse(Outcome.PlayForFree, "Cast " + card.getLogName() + " without paying cost?", source, game)) {
+ cardOwner.cast(card.getSpellAbility(), game, true);
+ }
+ }
+ }
+ }
+ return true;
+ }
+ return false;
+ }
+}
diff --git a/Mage.Sets/src/mage/sets/eldritchmoon/SpreadingFlames.java b/Mage.Sets/src/mage/sets/eldritchmoon/SpreadingFlames.java
new file mode 100644
index 00000000000..6548566a5a9
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/eldritchmoon/SpreadingFlames.java
@@ -0,0 +1,60 @@
+/*
+ * 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.DamageMultiEffect;
+import mage.cards.CardImpl;
+import mage.constants.CardType;
+import mage.constants.Rarity;
+import mage.target.common.TargetCreatureOrPlayerAmount;
+
+/**
+ *
+ * @author LevelX2
+ */
+public class SpreadingFlames extends CardImpl {
+
+ public SpreadingFlames(UUID ownerId) {
+ super(ownerId, 143, "Spreading Flames", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{6}{R}");
+ this.expansionSetCode = "EMN";
+
+ // Spreading Flames deals 6 damage divided as you choose among any number of target creatures.
+ this.getSpellAbility().addEffect(new DamageMultiEffect(6));
+ this.getSpellAbility().addTarget(new TargetCreatureOrPlayerAmount(6));
+ }
+
+ public SpreadingFlames(final SpreadingFlames card) {
+ super(card);
+ }
+
+ @Override
+ public SpreadingFlames copy() {
+ return new SpreadingFlames(this);
+ }
+}
diff --git a/Mage.Sets/src/mage/sets/eldritchmoon/StensiaBanquet.java b/Mage.Sets/src/mage/sets/eldritchmoon/StensiaBanquet.java
new file mode 100644
index 00000000000..4978bda5c30
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/eldritchmoon/StensiaBanquet.java
@@ -0,0 +1,76 @@
+/*
+ * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, are
+ * permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this list of
+ * conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice, this list
+ * of conditions and the following disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * The views and conclusions contained in the software and documentation are those of the
+ * authors and should not be interpreted as representing official policies, either expressed
+ * or implied, of BetaSteward_at_googlemail.com.
+ */
+package mage.sets.eldritchmoon;
+
+import java.util.UUID;
+import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
+import mage.abilities.effects.common.DamageTargetEffect;
+import mage.abilities.effects.common.DrawCardSourceControllerEffect;
+import mage.cards.CardImpl;
+import mage.constants.CardType;
+import mage.constants.Rarity;
+import mage.constants.TargetController;
+import mage.filter.common.FilterLandPermanent;
+import mage.filter.predicate.mageobject.SubtypePredicate;
+import mage.filter.predicate.permanent.ControllerPredicate;
+import mage.target.common.TargetOpponent;
+
+/**
+ *
+ * @author LevelX2
+ */
+public class StensiaBanquet extends CardImpl {
+
+ private static final FilterLandPermanent filter = new FilterLandPermanent("Vampires you control");
+
+ static {
+ filter.add(new SubtypePredicate("Vampires"));
+ filter.add(new ControllerPredicate(TargetController.YOU));
+ }
+
+ public StensiaBanquet(UUID ownerId) {
+ super(ownerId, 144, "Stensia Banquet", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{2}{R}");
+ this.expansionSetCode = "EMN";
+
+ // Stensia Banquet deals damage to target opponent equal to the number of Vampires you control.
+ this.getSpellAbility().addEffect(new DamageTargetEffect(new PermanentsOnBattlefieldCount(filter)));
+ this.getSpellAbility().addTarget(new TargetOpponent());
+
+ // Draw a card.
+ this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(1));
+ }
+
+ public StensiaBanquet(final StensiaBanquet card) {
+ super(card);
+ }
+
+ @Override
+ public StensiaBanquet copy() {
+ return new StensiaBanquet(this);
+ }
+}
diff --git a/Mage.Sets/src/mage/sets/eldritchmoon/StensiaInnkeeper.java b/Mage.Sets/src/mage/sets/eldritchmoon/StensiaInnkeeper.java
new file mode 100644
index 00000000000..6644070f919
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/eldritchmoon/StensiaInnkeeper.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.EntersBattlefieldTriggeredAbility;
+import mage.abilities.effects.common.DontUntapInControllersNextUntapStepTargetEffect;
+import mage.abilities.effects.common.TapTargetEffect;
+import mage.cards.CardImpl;
+import mage.constants.CardType;
+import mage.constants.Rarity;
+import mage.constants.TargetController;
+import mage.filter.common.FilterLandPermanent;
+import mage.filter.predicate.permanent.ControllerPredicate;
+import mage.target.TargetPermanent;
+
+/**
+ *
+ * @author LevelX2
+ */
+public class StensiaInnkeeper extends CardImpl {
+
+ private final static FilterLandPermanent filter = new FilterLandPermanent("land an opponent controls");
+
+ static {
+ filter.add(new ControllerPredicate(TargetController.OPPONENT));
+ }
+
+ public StensiaInnkeeper(UUID ownerId) {
+ super(ownerId, 145, "Stensia Innkeeper", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{3}{R}");
+ this.expansionSetCode = "EMN";
+ this.subtype.add("Vampire");
+ this.power = new MageInt(3);
+ this.toughness = new MageInt(3);
+
+ // When Stensia Innkeeper enters the battlefield, tap target land an opponent controls. That land doesn't untap during its controller's next untap step.
+ Ability ability = new EntersBattlefieldTriggeredAbility(new TapTargetEffect(), false);
+ ability.addEffect(new DontUntapInControllersNextUntapStepTargetEffect("That land"));
+ ability.addTarget(new TargetPermanent(filter));
+ this.addAbility(ability);
+ }
+
+ public StensiaInnkeeper(final StensiaInnkeeper card) {
+ super(card);
+ }
+
+ @Override
+ public StensiaInnkeeper copy() {
+ return new StensiaInnkeeper(this);
+ }
+}
diff --git a/Mage.Sets/src/mage/sets/eldritchmoon/StrangeAugmentation.java b/Mage.Sets/src/mage/sets/eldritchmoon/StrangeAugmentation.java
new file mode 100644
index 00000000000..910c0c60163
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/eldritchmoon/StrangeAugmentation.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.abilities.Ability;
+import mage.abilities.common.SimpleStaticAbility;
+import mage.abilities.condition.common.DeliriumCondition;
+import mage.abilities.decorator.ConditionalContinuousEffect;
+import mage.abilities.effects.common.AttachEffect;
+import mage.abilities.effects.common.continuous.BoostEnchantedEffect;
+import mage.abilities.keyword.EnchantAbility;
+import mage.cards.CardImpl;
+import mage.constants.CardType;
+import mage.constants.Outcome;
+import mage.constants.Rarity;
+import mage.constants.Zone;
+import mage.target.TargetPermanent;
+import mage.target.common.TargetCreaturePermanent;
+
+/**
+ *
+ * @author LevelX2
+ */
+public class StrangeAugmentation extends CardImpl {
+
+ public StrangeAugmentation(UUID ownerId) {
+ super(ownerId, 105, "Strange Augmentation", Rarity.COMMON, new CardType[]{CardType.ENCHANTMENT}, "{B}");
+ 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 +1/+1.
+ this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(1, 1)));
+
+ // Delirium &mdash Enchanted creature gets an additional +2/+2 as long as there are four or more card types among cards in your graveyard.
+ this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinuousEffect(new BoostEnchantedEffect(2, 2), DeliriumCondition.getInstance(),
+ "Delirium — Enchanted creature gets an additional +2/+2 as long as you have no cards in hand")));
+ }
+
+ public StrangeAugmentation(final StrangeAugmentation card) {
+ super(card);
+ }
+
+ @Override
+ public StrangeAugmentation copy() {
+ return new StrangeAugmentation(this);
+ }
+}
diff --git a/Mage.Sets/src/mage/sets/eldritchmoon/SuccumbToTemptation.java b/Mage.Sets/src/mage/sets/eldritchmoon/SuccumbToTemptation.java
new file mode 100644
index 00000000000..5a014740a05
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/eldritchmoon/SuccumbToTemptation.java
@@ -0,0 +1,64 @@
+/*
+ * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, are
+ * permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this list of
+ * conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice, this list
+ * of conditions and the following disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * The views and conclusions contained in the software and documentation are those of the
+ * authors and should not be interpreted as representing official policies, either expressed
+ * or implied, of BetaSteward_at_googlemail.com.
+ */
+package mage.sets.eldritchmoon;
+
+import java.util.UUID;
+import mage.abilities.effects.Effect;
+import mage.abilities.effects.common.DrawCardSourceControllerEffect;
+import mage.abilities.effects.common.LoseLifeSourceControllerEffect;
+import mage.cards.CardImpl;
+import mage.constants.CardType;
+import mage.constants.Rarity;
+
+/**
+ *
+ * @author LevelX2
+ */
+public class SuccumbToTemptation extends CardImpl {
+
+ public SuccumbToTemptation(UUID ownerId) {
+ super(ownerId, 107, "Succumb to Temptation", Rarity.COMMON, new CardType[]{}, "{1}{B}{B}");
+ this.expansionSetCode = "EMN";
+ this.supertype.add("Insant");
+
+ // You draw two cards and you lose 2 life.
+ this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(2));
+ Effect effect = new LoseLifeSourceControllerEffect(2);
+ effect.setText("and you lose 2 life");
+ this.getSpellAbility().addEffect(effect);
+ }
+
+ public SuccumbToTemptation(final SuccumbToTemptation card) {
+ super(card);
+ }
+
+ @Override
+ public SuccumbToTemptation copy() {
+ return new SuccumbToTemptation(this);
+ }
+}
diff --git a/Mage.Sets/src/mage/sets/eldritchmoon/TamiyoFieldResearcher.java b/Mage.Sets/src/mage/sets/eldritchmoon/TamiyoFieldResearcher.java
new file mode 100644
index 00000000000..2e8464303c2
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/eldritchmoon/TamiyoFieldResearcher.java
@@ -0,0 +1,265 @@
+/*
+ * 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.ArrayList;
+import java.util.List;
+import java.util.UUID;
+import mage.MageObject;
+import mage.MageObjectReference;
+import mage.abilities.Ability;
+import mage.abilities.DelayedTriggeredAbility;
+import mage.abilities.LoyaltyAbility;
+import mage.abilities.common.PlanswalkerEntersWithLoyalityCountersAbility;
+import mage.abilities.common.SimpleStaticAbility;
+import mage.abilities.condition.CompoundCondition;
+import mage.abilities.condition.Condition;
+import mage.abilities.condition.common.SourceIsSpellCondition;
+import mage.abilities.costs.AlternativeCostSourceAbility;
+import mage.abilities.effects.ContinuousEffectImpl;
+import mage.abilities.effects.OneShotEffect;
+import mage.abilities.effects.common.DontUntapInControllersNextUntapStepTargetEffect;
+import mage.abilities.effects.common.DrawCardSourceControllerEffect;
+import mage.abilities.effects.common.GetEmblemEffect;
+import mage.abilities.effects.common.TapTargetEffect;
+import mage.cards.Card;
+import mage.cards.CardImpl;
+import mage.cards.SplitCardHalf;
+import mage.constants.CardType;
+import mage.constants.Duration;
+import mage.constants.Layer;
+import mage.constants.Outcome;
+import mage.constants.Rarity;
+import mage.constants.SubLayer;
+import mage.constants.Zone;
+import mage.filter.FilterPermanent;
+import mage.filter.common.FilterCreaturePermanent;
+import mage.filter.common.FilterNonlandCard;
+import mage.filter.predicate.Predicates;
+import mage.filter.predicate.mageobject.CardTypePredicate;
+import mage.game.Game;
+import mage.game.command.Emblem;
+import mage.game.events.DamagedEvent;
+import mage.game.events.GameEvent;
+import mage.game.permanent.Permanent;
+import mage.game.stack.Spell;
+import mage.players.Player;
+import mage.target.TargetPermanent;
+import mage.target.common.TargetCreaturePermanent;
+
+/**
+ *
+ * @author LevelX2
+ */
+public class TamiyoFieldResearcher extends CardImpl {
+
+ private final static FilterPermanent filter = new FilterPermanent("nonland permanent");
+
+ static {
+ filter.add(Predicates.not(new CardTypePredicate(CardType.LAND)));
+ }
+
+ public TamiyoFieldResearcher(UUID ownerId) {
+ super(ownerId, 190, "Tamiyo, Field Researcher", Rarity.MYTHIC, new CardType[]{CardType.PLANESWALKER}, "{1}{G}{W}{U}");
+ this.expansionSetCode = "EMN";
+ this.subtype.add("Tamiyo");
+
+ this.addAbility(new PlanswalkerEntersWithLoyalityCountersAbility(4));
+
+ // +1: Choose up to two target creatures. Until your next turn, whenever either of those creatures deals combat damage, you draw a card.
+ Ability ability = new LoyaltyAbility(new TamiyoFieldResearcherEffect1(), 1);
+ ability.addTarget(new TargetCreaturePermanent(0, 2, new FilterCreaturePermanent("creatures"), false));
+ this.addAbility(ability);
+
+ // -2: Tap up to two target nonland permanents. They don't untap during their controller's next untap step.
+ ability = new LoyaltyAbility(new TapTargetEffect(), -2);
+ ability.addTarget(new TargetPermanent(0, 2, filter, false));
+ ability.addEffect(new DontUntapInControllersNextUntapStepTargetEffect("They"));
+ this.addAbility(ability);
+
+ // -7: Draw three cards. You get an emblem with "You may cast nonland cards from your hand without paying their mana costs."
+ ability = new LoyaltyAbility(new DrawCardSourceControllerEffect(3), -7);
+ ability.addEffect(new GetEmblemEffect(new TamiyoFieldResearcherEmblem()));
+ this.addAbility(ability);
+ }
+
+ public TamiyoFieldResearcher(final TamiyoFieldResearcher card) {
+ super(card);
+ }
+
+ @Override
+ public TamiyoFieldResearcher copy() {
+ return new TamiyoFieldResearcher(this);
+ }
+}
+
+class TamiyoFieldResearcherEffect1 extends OneShotEffect {
+
+ public TamiyoFieldResearcherEffect1() {
+ super(Outcome.PreventDamage);
+ this.staticText = "Choose up to two target creatures. Until your next turn, whenever either of those creatures deals combat damage, you draw a card";
+ }
+
+ public TamiyoFieldResearcherEffect1(final TamiyoFieldResearcherEffect1 effect) {
+ super(effect);
+ }
+
+ @Override
+ public TamiyoFieldResearcherEffect1 copy() {
+ return new TamiyoFieldResearcherEffect1(this);
+ }
+
+ @Override
+ public boolean apply(Game game, Ability source) {
+ Player controller = game.getPlayer(source.getControllerId());
+ if (controller != null) {
+ ArrayList creatures = new ArrayList<>();
+ for (UUID uuid : getTargetPointer().getTargets(game, source)) {
+ creatures.add(new MageObjectReference(uuid, game));
+ }
+ if (!creatures.isEmpty()) {
+ DelayedTriggeredAbility delayedAbility = new TamiyoFieldResearcherDelayedTriggeredAbility(creatures);
+ game.addDelayedTriggeredAbility(delayedAbility, source);
+ }
+ return true;
+ }
+ return false;
+ }
+}
+
+class TamiyoFieldResearcherDelayedTriggeredAbility extends DelayedTriggeredAbility {
+
+ private List creatures;
+
+ public TamiyoFieldResearcherDelayedTriggeredAbility(List creatures) {
+ super(new DrawCardSourceControllerEffect(1), Duration.UntilYourNextTurn);
+ this.creatures = creatures;
+ }
+
+ public TamiyoFieldResearcherDelayedTriggeredAbility(final TamiyoFieldResearcherDelayedTriggeredAbility ability) {
+ super(ability);
+ this.creatures = ability.creatures;
+ }
+
+ @Override
+ public boolean checkEventType(GameEvent event, Game game) {
+ return event instanceof DamagedEvent;
+ }
+
+ @Override
+ public boolean checkTrigger(GameEvent event, Game game) {
+ if (((DamagedEvent) event).isCombatDamage()) {
+ Permanent damageSource = game.getPermanent(event.getSourceId());
+ if (damageSource != null) {
+ return creatures.contains(new MageObjectReference(damageSource, game));
+ }
+ }
+ return false;
+ }
+
+ @Override
+ public TamiyoFieldResearcherDelayedTriggeredAbility copy() {
+ return new TamiyoFieldResearcherDelayedTriggeredAbility(this);
+ }
+
+ @Override
+ public String getRule() {
+ return "Until your next turn, whenever either of those creatures deals combat damage, you draw a card.";
+ }
+}
+
+class TamiyoFieldResearcherEmblem extends Emblem {
+ // You may cast nonland cards from your hand without paying their mana costs.
+
+ public TamiyoFieldResearcherEmblem() {
+
+ this.setName("EMBLEM: Tamiyo, Field Researcher");
+
+ this.getAbilities().add(new SimpleStaticAbility(Zone.COMMAND, new TamiyoFieldResearcherCastingEffect()));
+ }
+}
+
+class TamiyoFieldResearcherCastingEffect extends ContinuousEffectImpl {
+
+ public TamiyoFieldResearcherCastingEffect() {
+ super(Duration.WhileOnBattlefield, Outcome.Detriment);
+ staticText = "You may cast nonland cards from your hand without paying their mana costs";
+ }
+
+ public TamiyoFieldResearcherCastingEffect(final TamiyoFieldResearcherCastingEffect effect) {
+ super(effect);
+ }
+
+ @Override
+ public TamiyoFieldResearcherCastingEffect copy() {
+ return new TamiyoFieldResearcherCastingEffect(this);
+ }
+
+ @Override
+ public boolean apply(Layer layer, SubLayer sublayer, Ability source, Game game) {
+ Player controller = game.getPlayer(source.getControllerId());
+ if (controller != null) {
+ controller.getAlternativeSourceCosts().add(new AlternativeCostSourceAbility(
+ null, new CompoundCondition(SourceIsSpellCondition.getInstance(), new IsBeingCastFromHandCondition()), null, new FilterNonlandCard(), true));
+ return true;
+ }
+ return false;
+ }
+
+ @Override
+ public boolean apply(Game game, Ability source) {
+ return false;
+ }
+
+ @Override
+ public boolean hasLayer(Layer layer) {
+ return layer == Layer.RulesEffects;
+ }
+}
+
+class IsBeingCastFromHandCondition implements Condition {
+
+ @Override
+ public boolean apply(Game game, Ability source) {
+ MageObject object = game.getObject(source.getSourceId());
+ if (object instanceof SplitCardHalf) {
+ UUID splitCardId = ((Card) object).getMainCard().getId();
+ object = game.getObject(splitCardId);
+ }
+ if (object instanceof Spell) { // needed to check if it can be cast by alternate cost
+ Spell spell = (Spell) object;
+ return spell.getFromZone() == Zone.HAND;
+ }
+ if (object instanceof Card) { // needed for the check what's playable
+ Card card = (Card) object;
+ return game.getPlayer(card.getOwnerId()).getHand().get(card.getId(), game) != null;
+ }
+ return false;
+ }
+
+}
diff --git a/Mage.Sets/src/mage/sets/eldritchmoon/ThermoAlchemist.java b/Mage.Sets/src/mage/sets/eldritchmoon/ThermoAlchemist.java
new file mode 100644
index 00000000000..14a4015e7bf
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/eldritchmoon/ThermoAlchemist.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.SimpleActivatedAbility;
+import mage.abilities.common.SpellCastControllerTriggeredAbility;
+import mage.abilities.costs.common.TapSourceCost;
+import mage.abilities.effects.common.DamagePlayersEffect;
+import mage.abilities.effects.common.UntapSourceEffect;
+import mage.abilities.keyword.DefenderAbility;
+import mage.cards.CardImpl;
+import mage.constants.CardType;
+import mage.constants.Rarity;
+import mage.constants.TargetController;
+import mage.constants.Zone;
+import mage.filter.common.FilterInstantOrSorcerySpell;
+
+/**
+ *
+ * @author LevelX2
+ */
+public class ThermoAlchemist extends CardImpl {
+
+ public ThermoAlchemist(UUID ownerId) {
+ super(ownerId, 147, "Thermo-Alchemist", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{1}{R}");
+ this.expansionSetCode = "EMN";
+ this.subtype.add("Human");
+ this.subtype.add("Shaman");
+ this.power = new MageInt(0);
+ this.toughness = new MageInt(3);
+
+ // Defender
+ this.addAbility(DefenderAbility.getInstance());
+ // {T}: Thermo-Alchemist deals 1 damage to each opponent.
+ Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamagePlayersEffect(1, TargetController.OPPONENT), new TapSourceCost());
+ this.addAbility(ability);
+ // Whenever you cast an instant or sorcery spell, untap Thermo-Alchemist.
+ this.addAbility(new SpellCastControllerTriggeredAbility(new UntapSourceEffect(), new FilterInstantOrSorcerySpell(), false));
+ }
+
+ public ThermoAlchemist(final ThermoAlchemist card) {
+ super(card);
+ }
+
+ @Override
+ public ThermoAlchemist copy() {
+ return new ThermoAlchemist(this);
+ }
+}
diff --git a/Mage.Sets/src/mage/sets/eldritchmoon/ThirstingAxe.java b/Mage.Sets/src/mage/sets/eldritchmoon/ThirstingAxe.java
new file mode 100644
index 00000000000..d54f8ad59e0
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/eldritchmoon/ThirstingAxe.java
@@ -0,0 +1,121 @@
+/*
+ * 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.TriggeredAbility;
+import mage.abilities.common.BeginningOfYourEndStepTriggeredAbility;
+import mage.abilities.common.SimpleStaticAbility;
+import mage.abilities.condition.CompoundCondition;
+import mage.abilities.condition.Condition;
+import mage.abilities.condition.InvertCondition;
+import mage.abilities.condition.common.AttachedCondition;
+import mage.abilities.condition.common.WatcherCondition;
+import mage.abilities.costs.mana.GenericManaCost;
+import mage.abilities.decorator.ConditionalTriggeredAbility;
+import mage.abilities.effects.common.SacrificeEquippedEffect;
+import mage.abilities.effects.common.continuous.BoostEquippedEffect;
+import mage.abilities.keyword.EquipAbility;
+import mage.cards.CardImpl;
+import mage.constants.*;
+import mage.game.Game;
+import mage.game.events.DamagedCreatureEvent;
+import mage.game.events.GameEvent;
+import mage.game.permanent.Permanent;
+import mage.watchers.Watcher;
+
+/**
+ *
+ * @author Quercitron
+ */
+public class ThirstingAxe extends CardImpl {
+
+ public ThirstingAxe(UUID ownerId) {
+ super(ownerId, 202, "Thirsting Axe", Rarity.UNCOMMON, new CardType[]{CardType.ARTIFACT}, "{3}");
+ this.expansionSetCode = "EMN";
+ this.subtype.add("Equipment");
+
+ // Equipped creature gets +4/+0.
+ this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(4, 0)));
+
+ // At the beginning of your end step, if equipped creature didn't deal combat damage to a creature this turn, sacrifice it.
+ TriggeredAbility ability = new BeginningOfYourEndStepTriggeredAbility(new SacrificeEquippedEffect(), false);
+ Condition condition = new CompoundCondition(
+ new AttachedCondition(),
+ new InvertCondition(new WatcherCondition(CombatDamageToCreatureByEquippedWatcher.BASIC_KEY, WatcherScope.CARD)));
+ String triggeredAbilityText = "At the beginning of your end step, if equipped creature " +
+ "didn't deal combat damage to a creature this turn, sacrifice it.";
+ ConditionalTriggeredAbility sacrificeTriggeredAbility = new ConditionalTriggeredAbility(ability, condition, triggeredAbilityText);
+ this.addAbility(sacrificeTriggeredAbility, new CombatDamageToCreatureByEquippedWatcher());
+
+ // Equip {2}
+ this.addAbility(new EquipAbility(Outcome.AddAbility, new GenericManaCost(2)));
+ }
+
+ public ThirstingAxe(final ThirstingAxe card) {
+ super(card);
+ }
+
+ @Override
+ public ThirstingAxe copy() {
+ return new ThirstingAxe(this);
+ }
+}
+
+class CombatDamageToCreatureByEquippedWatcher extends Watcher {
+
+ public final static String BASIC_KEY = "CombatDamageToCreatureByEquippedWatcher";
+
+ public CombatDamageToCreatureByEquippedWatcher() {
+ super(BASIC_KEY, WatcherScope.CARD);
+ }
+
+ public CombatDamageToCreatureByEquippedWatcher(final CombatDamageToCreatureByEquippedWatcher watcher) {
+ super(watcher);
+ }
+
+ @Override
+ public CombatDamageToCreatureByEquippedWatcher copy() {
+ return new CombatDamageToCreatureByEquippedWatcher(this);
+ }
+
+ @Override
+ public void watch(GameEvent event, Game game) {
+ if (event.getType() == GameEvent.EventType.DAMAGED_CREATURE) {
+ Permanent equipment = game.getPermanent(this.getSourceId());
+ if (equipment != null && equipment.getAttachedTo() != null) {
+ if (equipment.getAttachedTo().equals(event.getSourceId())) {
+ if (((DamagedCreatureEvent)event).isCombatDamage()) {
+ condition = true;
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/Mage.Sets/src/mage/sets/eldritchmoon/ThrabenFoulbloods.java b/Mage.Sets/src/mage/sets/eldritchmoon/ThrabenFoulbloods.java
new file mode 100644
index 00000000000..24b56235081
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/eldritchmoon/ThrabenFoulbloods.java
@@ -0,0 +1,75 @@
+/*
+ * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, are
+ * permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this list of
+ * conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice, this list
+ * of conditions and the following disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * The views and conclusions contained in the software and documentation are those of the
+ * authors and should not be interpreted as representing official policies, either expressed
+ * or implied, of BetaSteward_at_googlemail.com.
+ */
+package mage.sets.eldritchmoon;
+
+import java.util.UUID;
+import mage.MageInt;
+import mage.abilities.Ability;
+import mage.abilities.common.SimpleStaticAbility;
+import mage.abilities.condition.common.DeliriumCondition;
+import mage.abilities.decorator.ConditionalContinuousEffect;
+import mage.abilities.effects.common.continuous.BoostSourceEffect;
+import mage.abilities.effects.common.continuous.GainAbilitySourceEffect;
+import mage.abilities.keyword.MenaceAbility;
+import mage.cards.CardImpl;
+import mage.constants.CardType;
+import mage.constants.Duration;
+import mage.constants.Rarity;
+import mage.constants.Zone;
+
+/**
+ *
+ * @author LevelX2
+ */
+public class ThrabenFoulbloods extends CardImpl {
+
+ public ThrabenFoulbloods(UUID ownerId) {
+ super(ownerId, 108, "Thraben Foulbloods", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{2}{B}");
+ this.expansionSetCode = "EMN";
+ this.subtype.add("Zombie");
+ this.subtype.add("Hound");
+ this.power = new MageInt(3);
+ this.toughness = new MageInt(2);
+
+ // Delirium — Thraben Foulbloods gets +1/+1 and has menace as long as there are four or more card types among cards in your graveyard. (A creature with menace can't be blocked except by two or more creatures.)
+ ConditionalContinuousEffect effect = new ConditionalContinuousEffect(new BoostSourceEffect(1, 1, Duration.WhileOnBattlefield), DeliriumCondition.getInstance(), "Delirium — {this} gets +1/+1");
+ Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, effect);
+ ability.addEffect(new ConditionalContinuousEffect(new GainAbilitySourceEffect(new MenaceAbility()), DeliriumCondition.getInstance(),
+ "and has menace as long as there are four or more card types among cards in your graveyard. (A creature with menace can't be blocked except by two or more creatures.)"));
+ this.addAbility(ability);
+ }
+
+ public ThrabenFoulbloods(final ThrabenFoulbloods card) {
+ super(card);
+ }
+
+ @Override
+ public ThrabenFoulbloods copy() {
+ return new ThrabenFoulbloods(this);
+ }
+}
diff --git a/Mage.Sets/src/mage/sets/eldritchmoon/VampireCutthroat.java b/Mage.Sets/src/mage/sets/eldritchmoon/VampireCutthroat.java
new file mode 100644
index 00000000000..9b69fd448c2
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/eldritchmoon/VampireCutthroat.java
@@ -0,0 +1,66 @@
+/*
+ * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, are
+ * permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this list of
+ * conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice, this list
+ * of conditions and the following disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * The views and conclusions contained in the software and documentation are those of the
+ * authors and should not be interpreted as representing official policies, either expressed
+ * or implied, of BetaSteward_at_googlemail.com.
+ */
+package mage.sets.eldritchmoon;
+
+import java.util.UUID;
+import mage.MageInt;
+import mage.abilities.keyword.SkulkAbility;
+import mage.abilities.keyword.LifelinkAbility;
+import mage.cards.CardImpl;
+import mage.constants.CardType;
+import mage.constants.Rarity;
+
+/**
+ *
+ * @author LevelX2
+ */
+public class VampireCutthroat extends CardImpl {
+
+ public VampireCutthroat(UUID ownerId) {
+ super(ownerId, 110, "Vampire Cutthroat", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{B}");
+ this.expansionSetCode = "EMN";
+ this.subtype.add("Vampire");
+ this.subtype.add("Rogue");
+ this.power = new MageInt(1);
+ this.toughness = new MageInt(1);
+
+ // Skulk
+ this.addAbility(new SkulkAbility());
+ // Lifelink
+ this.addAbility(LifelinkAbility.getInstance());
+ }
+
+ public VampireCutthroat(final VampireCutthroat card) {
+ super(card);
+ }
+
+ @Override
+ public VampireCutthroat copy() {
+ return new VampireCutthroat(this);
+ }
+}
diff --git a/Mage.Sets/src/mage/sets/eldritchmoon/WeaverOfLightning.java b/Mage.Sets/src/mage/sets/eldritchmoon/WeaverOfLightning.java
new file mode 100644
index 00000000000..fc510808737
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/eldritchmoon/WeaverOfLightning.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.SpellCastControllerTriggeredAbility;
+import mage.abilities.effects.common.DamageTargetEffect;
+import mage.abilities.keyword.ReachAbility;
+import mage.cards.CardImpl;
+import mage.constants.CardType;
+import mage.constants.Rarity;
+import mage.constants.TargetController;
+import mage.filter.common.FilterCreaturePermanent;
+import mage.filter.common.FilterInstantOrSorcerySpell;
+import mage.filter.predicate.permanent.ControllerPredicate;
+import mage.target.common.TargetCreaturePermanent;
+
+/**
+ *
+ * @author LevelX2
+ */
+public class WeaverOfLightning extends CardImpl {
+
+ private final static FilterCreaturePermanent filter = new FilterCreaturePermanent("creature an opponent controls");
+
+ static {
+ filter.add(new ControllerPredicate(TargetController.OPPONENT));
+ }
+
+ public WeaverOfLightning(UUID ownerId) {
+ super(ownerId, 149, "Weaver of Lightning", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{2}{R}");
+ this.expansionSetCode = "EMN";
+ this.subtype.add("Human");
+ this.subtype.add("Shaman");
+ this.power = new MageInt(1);
+ this.toughness = new MageInt(4);
+
+ // Reach
+ this.addAbility(ReachAbility.getInstance());
+ // Whenever you cast an instant or sorcery spell, Weaver of Lightning deals 1 damage to target creature an opponent controls.
+ Ability ability = new SpellCastControllerTriggeredAbility(new DamageTargetEffect(1), new FilterInstantOrSorcerySpell(), false);
+ ability.addTarget(new TargetCreaturePermanent(filter));
+ this.addAbility(ability);
+ }
+
+ public WeaverOfLightning(final WeaverOfLightning card) {
+ super(card);
+ }
+
+ @Override
+ public WeaverOfLightning copy() {
+ return new WeaverOfLightning(this);
+ }
+}
diff --git a/Mage.Sets/src/mage/sets/eldritchmoon/WeirdedVampire.java b/Mage.Sets/src/mage/sets/eldritchmoon/WeirdedVampire.java
new file mode 100644
index 00000000000..2aa2aa7f81d
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/eldritchmoon/WeirdedVampire.java
@@ -0,0 +1,64 @@
+/*
+ * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, are
+ * permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this list of
+ * conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice, this list
+ * of conditions and the following disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * The views and conclusions contained in the software and documentation are those of the
+ * authors and should not be interpreted as representing official policies, either expressed
+ * or implied, of BetaSteward_at_googlemail.com.
+ */
+package mage.sets.eldritchmoon;
+
+import java.util.UUID;
+import mage.MageInt;
+import mage.abilities.costs.mana.ManaCostsImpl;
+import mage.abilities.keyword.MadnessAbility;
+import mage.cards.CardImpl;
+import mage.constants.CardType;
+import mage.constants.Rarity;
+
+/**
+ *
+ * @author LevelX2
+ */
+public class WeirdedVampire extends CardImpl {
+
+ public WeirdedVampire(UUID ownerId) {
+ super(ownerId, 113, "Weirded Vampire", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{3}{B}");
+ this.expansionSetCode = "EMN";
+ this.subtype.add("Vampire");
+ this.subtype.add("Horror");
+ this.power = new MageInt(3);
+ this.toughness = new MageInt(3);
+
+ // Madness {2}{B}
+ this.addAbility(new MadnessAbility(this, new ManaCostsImpl("{2}{B}")));
+ }
+
+ public WeirdedVampire(final WeirdedVampire card) {
+ super(card);
+ }
+
+ @Override
+ public WeirdedVampire copy() {
+ return new WeirdedVampire(this);
+ }
+}
diff --git a/Mage.Sets/src/mage/sets/gatecrash/Hindervines.java b/Mage.Sets/src/mage/sets/gatecrash/Hindervines.java
index 3c31ca36337..2486f81c8a6 100644
--- a/Mage.Sets/src/mage/sets/gatecrash/Hindervines.java
+++ b/Mage.Sets/src/mage/sets/gatecrash/Hindervines.java
@@ -28,11 +28,16 @@
package mage.sets.gatecrash;
import java.util.UUID;
+import mage.abilities.effects.common.PreventAllDamageByAllPermanentsEffect;
+import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Rarity;
+<<<<<<< HEAD
import mage.abilities.effects.common.PreventAllDamageByAllPermanentsEffect;
import mage.cards.CardImpl;
+=======
+>>>>>>> origin/master
import mage.counters.CounterType;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.Predicates;
diff --git a/Mage.Sets/src/mage/sets/guildpact/InkTreaderNephilim.java b/Mage.Sets/src/mage/sets/guildpact/InkTreaderNephilim.java
index b1fb65c8084..5b257415d0c 100644
--- a/Mage.Sets/src/mage/sets/guildpact/InkTreaderNephilim.java
+++ b/Mage.Sets/src/mage/sets/guildpact/InkTreaderNephilim.java
@@ -44,6 +44,7 @@ import mage.game.events.GameEvent;
import mage.game.events.GameEvent.EventType;
import mage.game.permanent.Permanent;
import mage.game.stack.Spell;
+import mage.players.Player;
import mage.target.Target;
import mage.util.TargetAddress;
@@ -97,8 +98,8 @@ class InkTreaderNephilimTriggeredAbility extends TriggeredAbilityImpl {
@Override
public boolean checkTrigger(GameEvent event, Game game) {
Spell spell = game.getStack().getSpell(event.getTargetId());
- if (spell != null &&
- (spell.getCardType().contains(CardType.INSTANT) || spell.getCardType().contains(CardType.SORCERY))){
+ if (spell != null
+ && (spell.getCardType().contains(CardType.INSTANT) || spell.getCardType().contains(CardType.SORCERY))) {
for (Effect effect : getEffects()) {
effect.setValue("triggeringSpell", spell);
}
@@ -133,7 +134,6 @@ class InkTreaderNephilimTriggeredAbility extends TriggeredAbilityImpl {
}
}
-
class InkTreaderNephilimEffect extends CopySpellForEachItCouldTargetEffect {
public InkTreaderNephilimEffect() {
@@ -148,6 +148,11 @@ class InkTreaderNephilimEffect extends CopySpellForEachItCouldTargetEffect filter) {
super(filter);
}
-
+
+ @Override
+ protected Player getPlayer(Game game, Ability source) {
+ return game.getPlayer(source.getControllerId());
+ }
+
@Override
protected Spell getSpell(Game game, Ability source) {
return (Spell) getValue("triggeringSpell");
diff --git a/Mage.Sets/src/mage/sets/tempest/LightningBlast.java b/Mage.Sets/src/mage/sets/tempest/LightningBlast.java
index 9790a07e146..bd977cb86be 100644
--- a/Mage.Sets/src/mage/sets/tempest/LightningBlast.java
+++ b/Mage.Sets/src/mage/sets/tempest/LightningBlast.java
@@ -28,10 +28,10 @@
package mage.sets.tempest;
import java.util.UUID;
-import mage.constants.CardType;
-import mage.constants.Rarity;
import mage.abilities.effects.common.DamageTargetEffect;
import mage.cards.CardImpl;
+import mage.constants.CardType;
+import mage.constants.Rarity;
import mage.target.common.TargetCreatureOrPlayer;
/**
@@ -44,6 +44,7 @@ public class LightningBlast extends CardImpl {
super(ownerId, 185, "Lightning Blast", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{3}{R}");
this.expansionSetCode = "TMP";
+ // Lightning Blast deals 4 damage to target creature.
this.getSpellAbility().addEffect(new DamageTargetEffect(4));
this.getSpellAbility().addTarget(new TargetCreatureOrPlayer());
}
diff --git a/Mage.Sets/src/mage/sets/timeshifted/Darkness.java b/Mage.Sets/src/mage/sets/timeshifted/Darkness.java
index fbebfd7b95f..4fd5121abcb 100644
--- a/Mage.Sets/src/mage/sets/timeshifted/Darkness.java
+++ b/Mage.Sets/src/mage/sets/timeshifted/Darkness.java
@@ -28,12 +28,17 @@
package mage.sets.timeshifted;
import java.util.UUID;
+<<<<<<< HEAD
import mage.constants.CardType;
import mage.constants.Rarity;
+=======
+>>>>>>> origin/master
import mage.abilities.effects.common.PreventAllDamageByAllPermanentsEffect;
import mage.cards.CardImpl;
+import mage.constants.CardType;
import mage.constants.Duration;
+import mage.constants.Rarity;
/**
*
diff --git a/Mage.Sets/src/mage/sets/torment/Radiate.java b/Mage.Sets/src/mage/sets/torment/Radiate.java
index 85a52897a8c..c4d3d99a22c 100644
--- a/Mage.Sets/src/mage/sets/torment/Radiate.java
+++ b/Mage.Sets/src/mage/sets/torment/Radiate.java
@@ -44,11 +44,11 @@ import mage.filter.predicate.ObjectPlayerPredicate;
import mage.game.Game;
import mage.game.stack.Spell;
import mage.game.stack.StackObject;
+import mage.players.Player;
import mage.target.Target;
import mage.target.TargetSpell;
import mage.util.TargetAddress;
-
/**
* @author duncant
*/
@@ -61,7 +61,7 @@ public class Radiate extends CardImpl {
filter.add(new SpellWithOnlyPermanentOrPlayerTargetsPredicate());
filter.setMessage("instant or sorcery spell that targets only a single permanent or player");
}
-
+
public Radiate(UUID ownerId) {
super(ownerId, 113, "Radiate", Rarity.RARE, new CardType[]{CardType.INSTANT}, "{3}{R}{R}");
this.expansionSetCode = "TOR";
@@ -82,6 +82,7 @@ public class Radiate extends CardImpl {
}
class SpellWithOnlySingleTargetPredicate implements ObjectPlayerPredicate> {
+
@Override
public boolean apply(ObjectPlayer input, Game game) {
Spell spell = input.getObject();
@@ -104,6 +105,7 @@ class SpellWithOnlySingleTargetPredicate implements ObjectPlayerPredicate