diff --git a/Mage.Sets/src/mage/cards/a/AethergeodeMiner.java b/Mage.Sets/src/mage/cards/a/AethergeodeMiner.java
index 442fba4163a..1fa9b93193e 100644
--- a/Mage.Sets/src/mage/cards/a/AethergeodeMiner.java
+++ b/Mage.Sets/src/mage/cards/a/AethergeodeMiner.java
@@ -1,22 +1,16 @@
package mage.cards.a;
import mage.MageInt;
-import mage.abilities.Ability;
import mage.abilities.common.AttacksTriggeredAbility;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.PayEnergyCost;
-import mage.abilities.effects.OneShotEffect;
+import mage.abilities.effects.common.ExileAndReturnSourceEffect;
import mage.abilities.effects.common.counter.GetEnergyCountersControllerEffect;
-import mage.cards.Card;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
-import mage.constants.Outcome;
+import mage.constants.PutCards;
import mage.constants.SubType;
-import mage.constants.Zone;
-import mage.game.Game;
-import mage.game.permanent.Permanent;
-import mage.players.Player;
import java.util.UUID;
@@ -37,7 +31,9 @@ public final class AethergeodeMiner extends CardImpl {
this.addAbility(new AttacksTriggeredAbility(new GetEnergyCountersControllerEffect(2), false));
// Pay {E}{E}: Exile Aethergeode Miner, then return it to the battlefield under its owner's control.
- this.addAbility(new SimpleActivatedAbility(new AethergeodeMinerEffect(), new PayEnergyCost(2)));
+ this.addAbility(new SimpleActivatedAbility(
+ new ExileAndReturnSourceEffect(PutCards.BATTLEFIELD), new PayEnergyCost(2)
+ ));
}
private AethergeodeMiner(final AethergeodeMiner card) {
@@ -49,33 +45,3 @@ public final class AethergeodeMiner extends CardImpl {
return new AethergeodeMiner(this);
}
}
-
-class AethergeodeMinerEffect extends OneShotEffect {
-
- AethergeodeMinerEffect() {
- super(Outcome.Neutral);
- this.staticText = "exile {this}, then return it to the battlefield under its owner's control";
- }
-
- private AethergeodeMinerEffect(final AethergeodeMinerEffect effect) {
- super(effect);
- }
-
- @Override
- public AethergeodeMinerEffect copy() {
- return new AethergeodeMinerEffect(this);
- }
-
- @Override
- public boolean apply(Game game, Ability source) {
- Player player = game.getPlayer(source.getControllerId());
- Permanent permanent = source.getSourcePermanentIfItStillExists(game);
- if (player == null || permanent == null) {
- return false;
- }
- Card card = permanent.getMainCard();
- player.moveCards(permanent, Zone.EXILED, source, game);
- player.moveCards(card, Zone.BATTLEFIELD, source, game, false, false, true, null);
- return true;
- }
-}
diff --git a/Mage.Sets/src/mage/cards/c/ChandraFireOfKaladesh.java b/Mage.Sets/src/mage/cards/c/ChandraFireOfKaladesh.java
index 0b04f718128..c317cf0600a 100644
--- a/Mage.Sets/src/mage/cards/c/ChandraFireOfKaladesh.java
+++ b/Mage.Sets/src/mage/cards/c/ChandraFireOfKaladesh.java
@@ -12,15 +12,12 @@ import mage.abilities.condition.common.SourceDealtDamageCondition;
import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.decorator.ConditionalOneShotEffect;
import mage.abilities.effects.common.DamageTargetEffect;
-import mage.abilities.effects.common.ExileAndReturnTransformedSourceEffect;
+import mage.abilities.effects.common.ExileAndReturnSourceEffect;
import mage.abilities.effects.common.UntapSourceEffect;
import mage.abilities.keyword.TransformAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
-import mage.constants.CardType;
-import mage.constants.SubType;
-import mage.constants.SuperType;
-import mage.constants.Zone;
+import mage.constants.*;
import mage.filter.FilterSpell;
import mage.filter.predicate.mageobject.ColorPredicate;
import mage.target.common.TargetPlayerOrPlaneswalker;
@@ -53,7 +50,7 @@ public final class ChandraFireOfKaladesh extends CardImpl {
// {T}: Chandra, Fire of Kaladesh deals 1 damage to target player. If Chandra has dealt 3 or more damage this turn, exile her, then return her to the battlefield transformed under her owner's control.
this.addAbility(new TransformAbility());
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new TapSourceCost());
- ability.addEffect(new ConditionalOneShotEffect(new ExileAndReturnTransformedSourceEffect(Pronoun.SHE), new SourceDealtDamageCondition(3)));
+ ability.addEffect(new ConditionalOneShotEffect(new ExileAndReturnSourceEffect(PutCards.BATTLEFIELD_TRANSFORMED,Pronoun.SHE), new SourceDealtDamageCondition(3)));
ability.addTarget(new TargetPlayerOrPlaneswalker());
this.addAbility(ability);
diff --git a/Mage.Sets/src/mage/cards/c/ConquerorsGalleon.java b/Mage.Sets/src/mage/cards/c/ConquerorsGalleon.java
index 9307d6c70e4..c65969f9cc7 100644
--- a/Mage.Sets/src/mage/cards/c/ConquerorsGalleon.java
+++ b/Mage.Sets/src/mage/cards/c/ConquerorsGalleon.java
@@ -5,12 +5,13 @@ import mage.abilities.Pronoun;
import mage.abilities.common.AttacksTriggeredAbility;
import mage.abilities.common.delayed.AtTheEndOfCombatDelayedTriggeredAbility;
import mage.abilities.effects.common.CreateDelayedTriggeredAbilityEffect;
-import mage.abilities.effects.common.ExileAndReturnTransformedSourceEffect;
+import mage.abilities.effects.common.ExileAndReturnSourceEffect;
import mage.abilities.keyword.CrewAbility;
import mage.abilities.keyword.TransformAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
+import mage.constants.PutCards;
import mage.constants.SubType;
import java.util.UUID;
@@ -32,10 +33,13 @@ public final class ConquerorsGalleon extends CardImpl {
// When Conqueror's Galleon attacks, exile it at the end of combat, then return it to the battlefield transformed under your control.
this.addAbility(new TransformAbility());
this.addAbility(new AttacksTriggeredAbility(
- new CreateDelayedTriggeredAbilityEffect(
- new AtTheEndOfCombatDelayedTriggeredAbility(new ExileAndReturnTransformedSourceEffect(Pronoun.IT, null, true))),
- false,
- "When {this} attacks, exile it at the end of combat, then return it to the battlefield transformed under your control."));
+ new CreateDelayedTriggeredAbilityEffect(new AtTheEndOfCombatDelayedTriggeredAbility(
+ new ExileAndReturnSourceEffect(
+ PutCards.BATTLEFIELD_TRANSFORMED, Pronoun.IT, true
+ )
+ )), false, "When {this} attacks, exile it at the end of combat, " +
+ "then return it to the battlefield transformed under your control."
+ ));
// Crew 4
this.addAbility(new CrewAbility(4));
diff --git a/Mage.Sets/src/mage/cards/e/EleshNorn.java b/Mage.Sets/src/mage/cards/e/EleshNorn.java
new file mode 100644
index 00000000000..8ffd88d23b0
--- /dev/null
+++ b/Mage.Sets/src/mage/cards/e/EleshNorn.java
@@ -0,0 +1,139 @@
+package mage.cards.e;
+
+import mage.MageInt;
+import mage.abilities.Ability;
+import mage.abilities.TriggeredAbilityImpl;
+import mage.abilities.common.ActivateAsSorceryActivatedAbility;
+import mage.abilities.costs.Cost;
+import mage.abilities.costs.common.SacrificeTargetCost;
+import mage.abilities.costs.mana.GenericManaCost;
+import mage.abilities.costs.mana.ManaCostsImpl;
+import mage.abilities.effects.OneShotEffect;
+import mage.abilities.effects.common.ExileAndReturnSourceEffect;
+import mage.abilities.keyword.TransformAbility;
+import mage.abilities.keyword.VigilanceAbility;
+import mage.cards.CardImpl;
+import mage.cards.CardSetInfo;
+import mage.constants.*;
+import mage.filter.StaticFilters;
+import mage.game.Game;
+import mage.game.events.GameEvent;
+import mage.players.Player;
+import mage.target.common.TargetControlledPermanent;
+import mage.target.targetpointer.FixedTarget;
+
+import java.util.UUID;
+
+/**
+ * @author TheElk801
+ */
+public final class EleshNorn extends CardImpl {
+
+ public EleshNorn(UUID ownerId, CardSetInfo setInfo) {
+ super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}{W}");
+
+ this.addSuperType(SuperType.LEGENDARY);
+ this.subtype.add(SubType.PHYREXIAN);
+ this.subtype.add(SubType.PRAETOR);
+ this.power = new MageInt(3);
+ this.toughness = new MageInt(5);
+ this.secondSideCardClazz = mage.cards.t.TheArgentEtchings.class;
+
+ // Vigilance
+ this.addAbility(VigilanceAbility.getInstance());
+
+ // Whenever a source an opponent controls deals damage to you or a permanent you control, that source's controller loses 2 life unless they pay {1}.
+ this.addAbility(new EleshNornTriggeredAbility());
+
+ // {2}{W}, Sacrifice three other creatures: Exile Elesh Norn, then return it to the battlefield transformed under its owner's control. Activate only as a sorcery.
+ this.addAbility(new TransformAbility());
+ Ability ability = new ActivateAsSorceryActivatedAbility(
+ new ExileAndReturnSourceEffect(PutCards.BATTLEFIELD_TRANSFORMED),
+ new ManaCostsImpl<>("{2}{W}")
+ );
+ ability.addCost(new SacrificeTargetCost(new TargetControlledPermanent(3, StaticFilters.FILTER_CONTROLLED_ANOTHER_CREATURE)));
+ this.addAbility(ability);
+ }
+
+ private EleshNorn(final EleshNorn card) {
+ super(card);
+ }
+
+ @Override
+ public EleshNorn copy() {
+ return new EleshNorn(this);
+ }
+}
+
+class EleshNornTriggeredAbility extends TriggeredAbilityImpl {
+
+ EleshNornTriggeredAbility() {
+ super(Zone.BATTLEFIELD, new EleshNornEffect());
+ }
+
+ private EleshNornTriggeredAbility(final EleshNornTriggeredAbility ability) {
+ super(ability);
+ }
+
+ @Override
+ public EleshNornTriggeredAbility copy() {
+ return new EleshNornTriggeredAbility(this);
+ }
+
+ @Override
+ public boolean checkEventType(GameEvent event, Game game) {
+ switch (event.getType()) {
+ case DAMAGED_PLAYER:
+ case DAMAGE_PERMANENT:
+ return true;
+ }
+ return false;
+ }
+
+ @Override
+ public boolean checkTrigger(GameEvent event, Game game) {
+ if (!game.getOpponents(getControllerId()).contains(game.getControllerId(event.getSourceId()))) {
+ return false;
+ }
+ getEffects().setTargetPointer(new FixedTarget(game.getControllerId(event.getSourceId())));
+ switch (event.getType()) {
+ case DAMAGED_PLAYER:
+ return isControlledBy(event.getTargetId());
+ case DAMAGE_PERMANENT:
+ return isControlledBy(game.getControllerId(event.getTargetId()));
+ }
+ return false;
+ }
+
+ @Override
+ public String getRule() {
+ return "Whenever a source an opponent controls deals damage to you or a permanent you control, " +
+ "that source's controller loses 2 life unless they pay {1}.";
+ }
+}
+
+class EleshNornEffect extends OneShotEffect {
+
+ EleshNornEffect() {
+ super(Outcome.Benefit);
+ }
+
+ private EleshNornEffect(final EleshNornEffect effect) {
+ super(effect);
+ }
+
+ @Override
+ public EleshNornEffect copy() {
+ return new EleshNornEffect(this);
+ }
+
+ @Override
+ public boolean apply(Game game, Ability source) {
+ Player player = game.getPlayer(getTargetPointer().getFirst(game, source));
+ Cost cost = new GenericManaCost(1);
+ if (player != null && cost.canPay(source, source, player.getId(), game) && player.chooseUse(Outcome.PreventDamage, "Pay {1}?", source, game) && cost.pay(source, game, source, player.getId(), false)) {
+ return false;
+ }
+ return player.loseLife(2, game, source, false) > 0;
+ }
+}
diff --git a/Mage.Sets/src/mage/cards/f/FlickeringSpirit.java b/Mage.Sets/src/mage/cards/f/FlickeringSpirit.java
index 7b9dfefd6d5..b1e484873e0 100644
--- a/Mage.Sets/src/mage/cards/f/FlickeringSpirit.java
+++ b/Mage.Sets/src/mage/cards/f/FlickeringSpirit.java
@@ -1,21 +1,15 @@
package mage.cards.f;
import mage.MageInt;
-import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.mana.ManaCostsImpl;
-import mage.abilities.effects.OneShotEffect;
+import mage.abilities.effects.common.ExileAndReturnSourceEffect;
import mage.abilities.keyword.FlyingAbility;
-import mage.cards.Card;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
-import mage.constants.Outcome;
+import mage.constants.PutCards;
import mage.constants.SubType;
-import mage.constants.Zone;
-import mage.game.Game;
-import mage.game.permanent.Permanent;
-import mage.players.Player;
import java.util.UUID;
@@ -34,7 +28,9 @@ public final class FlickeringSpirit extends CardImpl {
this.addAbility(FlyingAbility.getInstance());
// {3}{W}: Exile Flickering Spirit, then return it to the battlefield under its owner's control.
- this.addAbility(new SimpleActivatedAbility(new FlickeringSpiritEffect(), new ManaCostsImpl<>("{3}{W}")));
+ this.addAbility(new SimpleActivatedAbility(
+ new ExileAndReturnSourceEffect(PutCards.BATTLEFIELD), new ManaCostsImpl<>("{3}{W}")
+ ));
}
private FlickeringSpirit(final FlickeringSpirit card) {
@@ -46,37 +42,3 @@ public final class FlickeringSpirit extends CardImpl {
return new FlickeringSpirit(this);
}
}
-
-class FlickeringSpiritEffect extends OneShotEffect {
-
- FlickeringSpiritEffect() {
- super(Outcome.Neutral);
- this.staticText = "Exile {this}, then return it to the battlefield under its owner's control";
- }
-
- private FlickeringSpiritEffect(final FlickeringSpiritEffect effect) {
- super(effect);
- }
-
- @Override
- public FlickeringSpiritEffect copy() {
- return new FlickeringSpiritEffect(this);
- }
-
- @Override
- public boolean apply(Game game, Ability source) {
- Player player = game.getPlayer(source.getControllerId());
- Permanent permanent = source.getSourcePermanentIfItStillExists(game);
- if (permanent == null
- || player == null) {
- return false;
- }
- if (player.moveCards(permanent, Zone.EXILED, source, game)) {
- Card card = game.getExile().getCard(source.getSourceId(), game);
- if (card != null) {
- return player.moveCards(card, Zone.BATTLEFIELD, source, game);
- }
- }
- return false;
- }
-}
diff --git a/Mage.Sets/src/mage/cards/j/JaceVrynsProdigy.java b/Mage.Sets/src/mage/cards/j/JaceVrynsProdigy.java
index 9b2e0358f7a..c82fe4458ff 100644
--- a/Mage.Sets/src/mage/cards/j/JaceVrynsProdigy.java
+++ b/Mage.Sets/src/mage/cards/j/JaceVrynsProdigy.java
@@ -11,14 +11,11 @@ import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.decorator.ConditionalOneShotEffect;
import mage.abilities.effects.Effect;
import mage.abilities.effects.common.DrawDiscardControllerEffect;
-import mage.abilities.effects.common.ExileAndReturnTransformedSourceEffect;
+import mage.abilities.effects.common.ExileAndReturnSourceEffect;
import mage.abilities.keyword.TransformAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
-import mage.constants.CardType;
-import mage.constants.SubType;
-import mage.constants.SuperType;
-import mage.constants.Zone;
+import mage.constants.*;
/**
*
@@ -39,7 +36,7 @@ public final class JaceVrynsProdigy extends CardImpl {
// {T}: Draw a card, then discard a card. If there are five or more cards in your graveyard, exile Jace, Vryn's Prodigy, then return him to the battefield transformed under his owner's control.
this.addAbility(new TransformAbility());
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DrawDiscardControllerEffect(1, 1), new TapSourceCost());
- Effect effect = new ConditionalOneShotEffect(new ExileAndReturnTransformedSourceEffect(Pronoun.HE), new CardsInControllerGraveyardCondition(5));
+ Effect effect = new ConditionalOneShotEffect(new ExileAndReturnSourceEffect(PutCards.BATTLEFIELD_TRANSFORMED,Pronoun.HE), new CardsInControllerGraveyardCondition(5));
ability.addEffect(effect);
this.addAbility(ability);
diff --git a/Mage.Sets/src/mage/cards/j/JinGitaxias.java b/Mage.Sets/src/mage/cards/j/JinGitaxias.java
index 4fd1fe8ae65..d1cd556b994 100644
--- a/Mage.Sets/src/mage/cards/j/JinGitaxias.java
+++ b/Mage.Sets/src/mage/cards/j/JinGitaxias.java
@@ -1,13 +1,12 @@
package mage.cards.j;
import mage.MageInt;
-import mage.abilities.Pronoun;
import mage.abilities.common.SpellCastControllerTriggeredAbility;
import mage.abilities.condition.common.CardsInHandCondition;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.decorator.ConditionalActivatedAbility;
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
-import mage.abilities.effects.common.ExileAndReturnTransformedSourceEffect;
+import mage.abilities.effects.common.ExileAndReturnSourceEffect;
import mage.abilities.keyword.TransformAbility;
import mage.abilities.keyword.WardAbility;
import mage.cards.CardImpl;
@@ -50,7 +49,7 @@ public class JinGitaxias extends CardImpl {
//only as a sorcery and only if you have seven or more cards in hand.
this.addAbility(new TransformAbility());
ConditionalActivatedAbility conditionalActivatedAbility =
- new ConditionalActivatedAbility(Zone.BATTLEFIELD, new ExileAndReturnTransformedSourceEffect(Pronoun.IT),
+ new ConditionalActivatedAbility(Zone.BATTLEFIELD, new ExileAndReturnSourceEffect(PutCards.BATTLEFIELD_TRANSFORMED),
new ManaCostsImpl<>("{3}{U}"), new CardsInHandCondition(ComparisonType.MORE_THAN, 6));
conditionalActivatedAbility.setTiming(TimingRule.SORCERY);
this.addAbility(conditionalActivatedAbility);
diff --git a/Mage.Sets/src/mage/cards/k/KytheonHeroOfAkros.java b/Mage.Sets/src/mage/cards/k/KytheonHeroOfAkros.java
index 49348aea3ad..52d823bb8e2 100644
--- a/Mage.Sets/src/mage/cards/k/KytheonHeroOfAkros.java
+++ b/Mage.Sets/src/mage/cards/k/KytheonHeroOfAkros.java
@@ -12,17 +12,13 @@ import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.condition.Condition;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
-import mage.abilities.effects.common.ExileAndReturnTransformedSourceEffect;
+import mage.abilities.effects.common.ExileAndReturnSourceEffect;
import mage.abilities.effects.common.continuous.GainAbilitySourceEffect;
import mage.abilities.keyword.IndestructibleAbility;
import mage.abilities.keyword.TransformAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
-import mage.constants.CardType;
-import mage.constants.SubType;
-import mage.constants.Duration;
-import mage.constants.SuperType;
-import mage.constants.Zone;
+import mage.constants.*;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.watchers.common.AttackedOrBlockedThisCombatWatcher;
@@ -45,7 +41,7 @@ public final class KytheonHeroOfAkros extends CardImpl {
// At end of combat, if Kytheon, Hero of Akros and at least two other creatures attacked this combat, exile Kytheon,
// then return him to the battlefield transformed under his owner's control.
this.addAbility(new TransformAbility());
- this.addAbility(new ConditionalInterveningIfTriggeredAbility(new EndOfCombatTriggeredAbility(new ExileAndReturnTransformedSourceEffect(Pronoun.HE), false),
+ this.addAbility(new ConditionalInterveningIfTriggeredAbility(new EndOfCombatTriggeredAbility(new ExileAndReturnSourceEffect(PutCards.BATTLEFIELD_TRANSFORMED,Pronoun.HE), false),
new KytheonHeroOfAkrosCondition(), "At end of combat, if {this} and at least two other creatures attacked this combat, exile {this}, "
+ "then return him to the battlefield transformed under his owner's control."), new AttackedOrBlockedThisCombatWatcher());
diff --git a/Mage.Sets/src/mage/cards/l/LilianaHereticalHealer.java b/Mage.Sets/src/mage/cards/l/LilianaHereticalHealer.java
index 20a173235ee..f2b05037264 100644
--- a/Mage.Sets/src/mage/cards/l/LilianaHereticalHealer.java
+++ b/Mage.Sets/src/mage/cards/l/LilianaHereticalHealer.java
@@ -1,27 +1,23 @@
-
package mage.cards.l;
-import java.util.UUID;
import mage.MageInt;
import mage.abilities.Pronoun;
import mage.abilities.common.DiesCreatureTriggeredAbility;
import mage.abilities.effects.common.CreateTokenEffect;
-import mage.abilities.effects.common.ExileAndReturnTransformedSourceEffect;
+import mage.abilities.effects.common.ExileAndReturnSourceEffect;
import mage.abilities.keyword.LifelinkAbility;
import mage.abilities.keyword.TransformAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
-import mage.constants.CardType;
-import mage.constants.SubType;
-import mage.constants.SuperType;
-import mage.constants.TargetController;
+import mage.constants.*;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.mageobject.AnotherPredicate;
import mage.filter.predicate.permanent.TokenPredicate;
import mage.game.permanent.token.ZombieToken;
+import java.util.UUID;
+
/**
- *
* @author LevelX2
*/
public final class LilianaHereticalHealer extends CardImpl {
@@ -35,7 +31,7 @@ public final class LilianaHereticalHealer extends CardImpl {
}
public LilianaHereticalHealer(UUID ownerId, CardSetInfo setInfo) {
- super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}{B}");
+ super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{B}{B}");
addSuperType(SuperType.LEGENDARY);
this.subtype.add(SubType.HUMAN);
this.subtype.add(SubType.CLERIC);
@@ -49,8 +45,9 @@ public final class LilianaHereticalHealer extends CardImpl {
this.addAbility(LifelinkAbility.getInstance());
// Whenever another nontoken creature you control dies, exile Liliana Heretical Healer, then return her to the battlefield transformed under her owner's control. If you do, create a 2/2 black Zombie creature token.
- this.addAbility(new DiesCreatureTriggeredAbility(new ExileAndReturnTransformedSourceEffect(Pronoun.SHE,
- new CreateTokenEffect(new ZombieToken())), false, filter));
+ this.addAbility(new DiesCreatureTriggeredAbility(new ExileAndReturnSourceEffect(
+ PutCards.BATTLEFIELD_TRANSFORMED, Pronoun.SHE, false, new CreateTokenEffect(new ZombieToken())
+ ), false, filter));
}
private LilianaHereticalHealer(final LilianaHereticalHealer card) {
diff --git a/Mage.Sets/src/mage/cards/n/NicolBolasTheRavager.java b/Mage.Sets/src/mage/cards/n/NicolBolasTheRavager.java
index 1a201fe5bb1..b8452f421fc 100644
--- a/Mage.Sets/src/mage/cards/n/NicolBolasTheRavager.java
+++ b/Mage.Sets/src/mage/cards/n/NicolBolasTheRavager.java
@@ -7,17 +7,13 @@ import mage.abilities.common.ActivateAsSorceryActivatedAbility;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.dynamicvalue.common.StaticValue;
-import mage.abilities.effects.common.ExileAndReturnTransformedSourceEffect;
+import mage.abilities.effects.common.ExileAndReturnSourceEffect;
import mage.abilities.effects.common.discard.DiscardEachPlayerEffect;
-import mage.constants.SubType;
-import mage.constants.SuperType;
+import mage.constants.*;
import mage.abilities.keyword.FlyingAbility;
import mage.abilities.keyword.TransformAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
-import mage.constants.CardType;
-import mage.constants.TargetController;
-import mage.constants.Zone;
/**
*
@@ -46,7 +42,7 @@ public final class NicolBolasTheRavager extends CardImpl {
this.addAbility(new TransformAbility());
this.addAbility(new ActivateAsSorceryActivatedAbility(
Zone.BATTLEFIELD,
- new ExileAndReturnTransformedSourceEffect(Pronoun.HE),
+ new ExileAndReturnSourceEffect(PutCards.BATTLEFIELD_TRANSFORMED,Pronoun.HE),
new ManaCostsImpl<>("{4}{U}{B}{R}")
));
}
diff --git a/Mage.Sets/src/mage/cards/n/NissaVastwoodSeer.java b/Mage.Sets/src/mage/cards/n/NissaVastwoodSeer.java
index 5d05e75c2b9..93bfb831373 100644
--- a/Mage.Sets/src/mage/cards/n/NissaVastwoodSeer.java
+++ b/Mage.Sets/src/mage/cards/n/NissaVastwoodSeer.java
@@ -8,15 +8,12 @@ import mage.abilities.common.EntersBattlefieldControlledTriggeredAbility;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition;
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
-import mage.abilities.effects.common.ExileAndReturnTransformedSourceEffect;
+import mage.abilities.effects.common.ExileAndReturnSourceEffect;
import mage.abilities.effects.common.search.SearchLibraryPutInHandEffect;
import mage.abilities.keyword.TransformAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
-import mage.constants.CardType;
-import mage.constants.ComparisonType;
-import mage.constants.SubType;
-import mage.constants.SuperType;
+import mage.constants.*;
import mage.filter.FilterCard;
import mage.filter.common.FilterLandPermanent;
import mage.target.common.TargetCardInLibrary;
@@ -49,7 +46,7 @@ public final class NissaVastwoodSeer extends CardImpl {
// Whenever a land enters the battlefield under your control, if you control seven or more lands, exile Nissa, then return her to the battlefield transformed under her owner's control.
this.addAbility(new TransformAbility());
this.addAbility(new ConditionalInterveningIfTriggeredAbility(
- new EntersBattlefieldControlledTriggeredAbility(new ExileAndReturnTransformedSourceEffect(Pronoun.SHE), new FilterLandPermanent()),
+ new EntersBattlefieldControlledTriggeredAbility(new ExileAndReturnSourceEffect(PutCards.BATTLEFIELD_TRANSFORMED,Pronoun.SHE), new FilterLandPermanent()),
new PermanentsOnTheBattlefieldCondition(new FilterLandPermanent(), ComparisonType.MORE_THAN, 6, true),
"Whenever a land enters the battlefield under your control, if you control seven or more lands, exile {this}, then return her to the battlefield transformed under her owner's control."));
}
diff --git a/Mage.Sets/src/mage/cards/o/OjutaiExemplars.java b/Mage.Sets/src/mage/cards/o/OjutaiExemplars.java
index a59c40824b2..9101c99ed2e 100644
--- a/Mage.Sets/src/mage/cards/o/OjutaiExemplars.java
+++ b/Mage.Sets/src/mage/cards/o/OjutaiExemplars.java
@@ -4,19 +4,18 @@ import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.Mode;
import mage.abilities.common.SpellCastControllerTriggeredAbility;
-import mage.abilities.effects.OneShotEffect;
+import mage.abilities.effects.common.ExileAndReturnSourceEffect;
import mage.abilities.effects.common.TapTargetEffect;
import mage.abilities.effects.common.continuous.GainAbilitySourceEffect;
import mage.abilities.keyword.FirstStrikeAbility;
import mage.abilities.keyword.LifelinkAbility;
-import mage.cards.Card;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
-import mage.constants.*;
+import mage.constants.CardType;
+import mage.constants.Duration;
+import mage.constants.PutCards;
+import mage.constants.SubType;
import mage.filter.StaticFilters;
-import mage.game.Game;
-import mage.game.permanent.Permanent;
-import mage.players.Player;
import mage.target.common.TargetCreaturePermanent;
import java.util.UUID;
@@ -49,7 +48,7 @@ public final class OjutaiExemplars extends CardImpl {
ability.addMode(mode);
// or Exile Ojutai Exemplars, then return it to the battlefield tapped under its owner's control.
- ability.addMode(new Mode(new OjutaiExemplarsEffect()));
+ ability.addMode(new Mode(new ExileAndReturnSourceEffect(PutCards.BATTLEFIELD_TAPPED)));
this.addAbility(ability);
}
@@ -63,33 +62,3 @@ public final class OjutaiExemplars extends CardImpl {
return new OjutaiExemplars(this);
}
}
-
-class OjutaiExemplarsEffect extends OneShotEffect {
-
- OjutaiExemplarsEffect() {
- super(Outcome.Neutral);
- this.staticText = "Exile {this}, then return it to the battlefield tapped under its owner's control";
- }
-
- private OjutaiExemplarsEffect(final OjutaiExemplarsEffect effect) {
- super(effect);
- }
-
- @Override
- public OjutaiExemplarsEffect copy() {
- return new OjutaiExemplarsEffect(this);
- }
-
- @Override
- public boolean apply(Game game, Ability source) {
- Player player = game.getPlayer(source.getControllerId());
- Permanent permanent = source.getSourcePermanentIfItStillExists(game);
- if (player == null || permanent == null) {
- return false;
- }
- Card card = permanent.getMainCard();
- player.moveCards(permanent, Zone.EXILED, source, game);
- player.moveCards(card, Zone.BATTLEFIELD, source, game, true, false, true, null);
- return true;
- }
-}
diff --git a/Mage.Sets/src/mage/cards/t/TheArgentEtchings.java b/Mage.Sets/src/mage/cards/t/TheArgentEtchings.java
new file mode 100644
index 00000000000..d37610b8966
--- /dev/null
+++ b/Mage.Sets/src/mage/cards/t/TheArgentEtchings.java
@@ -0,0 +1,118 @@
+package mage.cards.t;
+
+import mage.abilities.Ability;
+import mage.abilities.common.SagaAbility;
+import mage.abilities.effects.OneShotEffect;
+import mage.abilities.effects.common.DestroyAllEffect;
+import mage.abilities.effects.common.ExileSourceAndReturnFaceUpEffect;
+import mage.abilities.effects.common.continuous.BoostControlledEffect;
+import mage.abilities.effects.common.continuous.GainAbilityControlledEffect;
+import mage.abilities.effects.keyword.IncubateEffect;
+import mage.abilities.keyword.DoubleStrikeAbility;
+import mage.cards.CardImpl;
+import mage.cards.CardSetInfo;
+import mage.constants.*;
+import mage.filter.FilterPermanent;
+import mage.filter.StaticFilters;
+import mage.filter.common.FilterControlledPermanent;
+import mage.filter.predicate.Predicates;
+import mage.filter.predicate.mageobject.AnotherPredicate;
+import mage.filter.predicate.permanent.TokenPredicate;
+import mage.game.Game;
+import mage.game.permanent.Permanent;
+
+import java.util.UUID;
+
+/**
+ * @author TheElk801
+ */
+public final class TheArgentEtchings extends CardImpl {
+
+ private static final FilterPermanent filter
+ = new FilterPermanent("other permanents except for artifacts, lands, and Phyrexians");
+
+ static {
+ filter.add(Predicates.not(CardType.ARTIFACT.getPredicate()));
+ filter.add(Predicates.not(CardType.LAND.getPredicate()));
+ filter.add(Predicates.not(SubType.PHYREXIAN.getPredicate()));
+ filter.add(AnotherPredicate.instance);
+ }
+
+ public TheArgentEtchings(UUID ownerId, CardSetInfo setInfo) {
+ super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "");
+
+ this.subtype.add(SubType.SAGA);
+ this.color.setWhite(true);
+ this.nightCard = true;
+
+ // (As this Saga enters and after your draw step, add a lore counter.)
+ SagaAbility sagaAbility = new SagaAbility(this, false);
+
+ // I -- Incubate 2 five times, then transform all Incubator tokens you control.
+ sagaAbility.addChapterEffect(this, SagaChapter.CHAPTER_I, new TheArgentEtchingsEffect());
+
+ // II -- Creatures you control get +1/+1 and gain double strike until end of turn.
+ sagaAbility.addChapterEffect(
+ this, SagaChapter.CHAPTER_II,
+ new BoostControlledEffect(1, 1, Duration.EndOfTurn)
+ .setText("creatures you control get +1/+1"),
+ new GainAbilityControlledEffect(
+ DoubleStrikeAbility.getInstance(), Duration.EndOfTurn,
+ StaticFilters.FILTER_CONTROLLED_CREATURE
+ ).setText("and gain double strike until end of turn")
+ );
+
+ // III -- Destroy all other permanents except for artifacts, lands, and Phyrexians. Exile The Argent Etchings, then return it to the battlefield.
+ sagaAbility.addChapterEffect(
+ this, SagaChapter.CHAPTER_III,
+ new DestroyAllEffect(filter),
+ new ExileSourceAndReturnFaceUpEffect()
+ );
+ this.addAbility(sagaAbility);
+ }
+
+ private TheArgentEtchings(final TheArgentEtchings card) {
+ super(card);
+ }
+
+ @Override
+ public TheArgentEtchings copy() {
+ return new TheArgentEtchings(this);
+ }
+}
+
+class TheArgentEtchingsEffect extends OneShotEffect {
+
+ private static final FilterPermanent filter = new FilterControlledPermanent(SubType.INCUBATOR);
+
+ static {
+ filter.add(TokenPredicate.TRUE);
+ }
+
+ TheArgentEtchingsEffect() {
+ super(Outcome.Benefit);
+ staticText = "incubate 2 five times, then transform all Incubator tokens you control";
+ }
+
+ private TheArgentEtchingsEffect(final TheArgentEtchingsEffect effect) {
+ super(effect);
+ }
+
+ @Override
+ public TheArgentEtchingsEffect copy() {
+ return new TheArgentEtchingsEffect(this);
+ }
+
+ @Override
+ public boolean apply(Game game, Ability source) {
+ for (int i = 0; i < 5; i++) {
+ IncubateEffect.doIncubate(2, game, source);
+ }
+ for (Permanent permanent : game.getBattlefield().getActivePermanents(
+ filter, source.getControllerId(), source, game
+ )) {
+ permanent.transform(source, game);
+ }
+ return true;
+ }
+}
diff --git a/Mage.Sets/src/mage/cards/t/TheGreatSynthesis.java b/Mage.Sets/src/mage/cards/t/TheGreatSynthesis.java
index 6b5ad2c6525..8b1a86ca0dc 100644
--- a/Mage.Sets/src/mage/cards/t/TheGreatSynthesis.java
+++ b/Mage.Sets/src/mage/cards/t/TheGreatSynthesis.java
@@ -4,16 +4,16 @@ import mage.abilities.Ability;
import mage.abilities.common.SagaAbility;
import mage.abilities.dynamicvalue.common.CardsInControllerHandCount;
import mage.abilities.effects.OneShotEffect;
-import mage.abilities.effects.common.DestroyAllEffect;
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
-import mage.abilities.effects.common.ExileSagaAndReturnTransformedEffect;
+import mage.abilities.effects.common.ExileSourceAndReturnFaceUpEffect;
import mage.abilities.effects.common.ReturnToHandFromBattlefieldAllEffect;
import mage.abilities.effects.common.continuous.MaximumHandSizeControllerEffect;
-import mage.cards.*;
+import mage.cards.CardImpl;
+import mage.cards.CardSetInfo;
+import mage.cards.Cards;
import mage.constants.*;
import mage.filter.StaticFilters;
import mage.filter.common.FilterCreaturePermanent;
-import mage.filter.common.FilterNonlandCard;
import mage.filter.predicate.Predicates;
import mage.game.Game;
import mage.players.Player;
@@ -52,8 +52,11 @@ public class TheGreatSynthesis extends CardImpl {
//III — You may cast any number of spells from your hand without paying their mana cost. Exile The Great
//Synthesis, then return it to the battlefield (front face up).
- sagaAbility.addChapterEffect(this, SagaChapter.CHAPTER_III, new TheGreatSynthesisCastEffect(),
- new TheGreatSynthesisExileReturnEffect());
+ sagaAbility.addChapterEffect(
+ this, SagaChapter.CHAPTER_III,
+ new TheGreatSynthesisCastEffect(),
+ new ExileSourceAndReturnFaceUpEffect()
+ );
this.addAbility(sagaAbility);
}
@@ -94,41 +97,3 @@ class TheGreatSynthesisCastEffect extends OneShotEffect {
return true;
}
}
-
-class TheGreatSynthesisExileReturnEffect extends OneShotEffect {
- public TheGreatSynthesisExileReturnEffect() {
- super(Outcome.PutCreatureInPlay);
- staticText = "exile {this}, then return it to the battlefield (front face up)";
- }
-
- private TheGreatSynthesisExileReturnEffect(final TheGreatSynthesisExileReturnEffect effect) {
- super(effect);
- }
-
- @Override
- public TheGreatSynthesisExileReturnEffect copy() {
- return new TheGreatSynthesisExileReturnEffect(this);
- }
-
- @Override
- public boolean apply(Game game, Ability source) {
- if (game.getState().getZone(source.getSourceId()) != Zone.BATTLEFIELD) {
- return false;
- }
- Card card = game.getCard(source.getSourceId());
- if (card == null) {
- return false;
- }
-
- Player player = game.getPlayer(source.getControllerId());
- if (player == null) {
- return false;
- }
-
- if (!player.moveCards(card, Zone.EXILED, source, game)) {
- return false;
- }
- return player.moveCards(card, Zone.BATTLEFIELD, source, game);
- }
-
-}
diff --git a/Mage.Sets/src/mage/sets/MarchOfTheMachine.java b/Mage.Sets/src/mage/sets/MarchOfTheMachine.java
index c454e9bdfff..00bd5374ab0 100644
--- a/Mage.Sets/src/mage/sets/MarchOfTheMachine.java
+++ b/Mage.Sets/src/mage/sets/MarchOfTheMachine.java
@@ -88,6 +88,7 @@ public final class MarchOfTheMachine extends ExpansionSet {
cards.add(new SetCardInfo("Doomskar Warrior", 185, Rarity.RARE, mage.cards.d.DoomskarWarrior.class));
cards.add(new SetCardInfo("Dreg Recycler", 100, Rarity.COMMON, mage.cards.d.DregRecycler.class));
cards.add(new SetCardInfo("Dusk Legion Duelist", 11, Rarity.RARE, mage.cards.d.DuskLegionDuelist.class));
+ cards.add(new SetCardInfo("Elesh Norn", 12, Rarity.MYTHIC, mage.cards.e.EleshNorn.class));
cards.add(new SetCardInfo("Elspeth's Smite", 13, Rarity.UNCOMMON, mage.cards.e.ElspethsSmite.class));
cards.add(new SetCardInfo("Elvish Vatkeeper", 223, Rarity.UNCOMMON, mage.cards.e.ElvishVatkeeper.class));
cards.add(new SetCardInfo("Enduring Bondwarden", 14, Rarity.COMMON, mage.cards.e.EnduringBondwarden.class));
@@ -292,6 +293,7 @@ public final class MarchOfTheMachine extends ExpansionSet {
cards.add(new SetCardInfo("Tarkir Duneshaper", 43, Rarity.COMMON, mage.cards.t.TarkirDuneshaper.class));
cards.add(new SetCardInfo("Temporal Cleansing", 80, Rarity.COMMON, mage.cards.t.TemporalCleansing.class));
cards.add(new SetCardInfo("Tenured Oilcaster", 126, Rarity.COMMON, mage.cards.t.TenuredOilcaster.class));
+ cards.add(new SetCardInfo("The Argent Etchings", 12, Rarity.MYTHIC, mage.cards.t.TheArgentEtchings.class));
cards.add(new SetCardInfo("The Broken Sky", 241, Rarity.RARE, mage.cards.t.TheBrokenSky.class));
cards.add(new SetCardInfo("The Great Synthesis", 65, Rarity.MYTHIC, mage.cards.t.TheGreatSynthesis.class));
cards.add(new SetCardInfo("Thornwood Falls", 274, Rarity.COMMON, mage.cards.t.ThornwoodFalls.class));
diff --git a/Mage/src/main/java/mage/abilities/effects/common/ExileAndReturnTransformedSourceEffect.java b/Mage/src/main/java/mage/abilities/effects/common/ExileAndReturnSourceEffect.java
similarity index 51%
rename from Mage/src/main/java/mage/abilities/effects/common/ExileAndReturnTransformedSourceEffect.java
rename to Mage/src/main/java/mage/abilities/effects/common/ExileAndReturnSourceEffect.java
index dd6210a9521..4356b695b75 100644
--- a/Mage/src/main/java/mage/abilities/effects/common/ExileAndReturnTransformedSourceEffect.java
+++ b/Mage/src/main/java/mage/abilities/effects/common/ExileAndReturnSourceEffect.java
@@ -6,9 +6,8 @@ import mage.abilities.Pronoun;
import mage.abilities.effects.ContinuousEffect;
import mage.abilities.effects.Effect;
import mage.abilities.effects.OneShotEffect;
-import mage.abilities.keyword.TransformAbility;
-import mage.cards.Card;
import mage.constants.Outcome;
+import mage.constants.PutCards;
import mage.constants.Zone;
import mage.game.Game;
import mage.game.permanent.Permanent;
@@ -17,18 +16,23 @@ import mage.players.Player;
/**
* @author LevelX2
*/
-public class ExileAndReturnTransformedSourceEffect extends OneShotEffect {
+public class ExileAndReturnSourceEffect extends OneShotEffect {
- protected final Pronoun pronoun;
- protected final Effect additionalEffect;
- protected final boolean returnUnderYourControl;
+ private final Pronoun pronoun;
+ private final Effect additionalEffect;
+ private final boolean returnUnderYourControl;
+ private final PutCards putCards;
- public ExileAndReturnTransformedSourceEffect(Pronoun pronoun) {
- this(pronoun, null);
+ public ExileAndReturnSourceEffect(PutCards putCards) {
+ this(putCards, Pronoun.IT);
}
- public ExileAndReturnTransformedSourceEffect(Pronoun pronoun, Effect additionalEffect) {
- this(pronoun, additionalEffect, false);
+ public ExileAndReturnSourceEffect(PutCards putCards, Pronoun pronoun) {
+ this(putCards, pronoun, false);
+ }
+
+ public ExileAndReturnSourceEffect(PutCards putCards, Pronoun pronoun, boolean returnUnderYourControl) {
+ this(putCards, pronoun, returnUnderYourControl, null);
}
/**
@@ -36,43 +40,41 @@ public class ExileAndReturnTransformedSourceEffect extends OneShotEffect {
* @param additionalEffect that effect is applies as source is exiled
* @param returnUnderYourControl return under your or owner control
*/
- public ExileAndReturnTransformedSourceEffect(Pronoun pronoun, Effect additionalEffect, boolean returnUnderYourControl) {
+ public ExileAndReturnSourceEffect(PutCards putCards, Pronoun pronoun, boolean returnUnderYourControl, Effect additionalEffect) {
super(Outcome.Benefit);
this.pronoun = pronoun;
+ this.putCards = putCards;
this.additionalEffect = additionalEffect;
this.returnUnderYourControl = returnUnderYourControl;
}
- protected ExileAndReturnTransformedSourceEffect(final ExileAndReturnTransformedSourceEffect effect) {
+ protected ExileAndReturnSourceEffect(final ExileAndReturnSourceEffect effect) {
super(effect);
+ this.putCards = effect.putCards;
this.pronoun = effect.pronoun;
this.additionalEffect = effect.additionalEffect;
this.returnUnderYourControl = effect.returnUnderYourControl;
}
@Override
- public ExileAndReturnTransformedSourceEffect copy() {
- return new ExileAndReturnTransformedSourceEffect(this);
+ public ExileAndReturnSourceEffect copy() {
+ return new ExileAndReturnSourceEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
// Creature has to be on the battlefield to get exiled and be able to return transformed
- Permanent sourceObject = source.getSourcePermanentIfItStillExists(game);
Player controller = game.getPlayer(source.getControllerId());
- if (sourceObject == null || controller == null) {
+ Permanent permanent = source.getSourcePermanentIfItStillExists(game);
+ if (permanent == null || controller == null) {
return true;
}
- if (!controller.moveCards(sourceObject, Zone.EXILED, source, game)) {
- return true;
- }
- game.getState().setValue(TransformAbility.VALUE_KEY_ENTER_TRANSFORMED + source.getSourceId(), Boolean.TRUE);
- Card cardFromExile = game.getCard(source.getSourceId());
- if (cardFromExile == null) {
- return true;
- }
- controller.moveCards(cardFromExile, Zone.BATTLEFIELD, source, game, false, false, !this.returnUnderYourControl, null);
- if (additionalEffect == null) {
+ controller.moveCards(permanent, Zone.EXILED, source, game);
+ putCards.moveCard(
+ returnUnderYourControl ? controller : game.getPlayer(permanent.getOwnerId()),
+ permanent.getMainCard(), source, game, "card"
+ );
+ if (additionalEffect == null || game.getPermanent(permanent.getId()) == null) {
return true;
}
if (additionalEffect instanceof ContinuousEffect) {
@@ -88,8 +90,8 @@ public class ExileAndReturnTransformedSourceEffect extends OneShotEffect {
if (staticText != null && !staticText.isEmpty()) {
return staticText;
}
- return "exile {this}, then return " + pronoun.getObjective()
- + " to the battlefield transformed under " + pronoun.getPossessive()
- + ' ' + (this.returnUnderYourControl ? "your" : "owner's") + " control";
+ return "exile {this}, then return " + pronoun.getObjective() + ' ' +
+ putCards.getMessage(false, false).replace("onto", "to") + " under " +
+ (this.returnUnderYourControl ? "your" : pronoun.getPossessive() + ' ' + "owner's") + " control";
}
}
diff --git a/Mage/src/main/java/mage/abilities/effects/common/ExileSagaAndReturnTransformedEffect.java b/Mage/src/main/java/mage/abilities/effects/common/ExileSagaAndReturnTransformedEffect.java
index e213bfc1c42..462bce4b9de 100644
--- a/Mage/src/main/java/mage/abilities/effects/common/ExileSagaAndReturnTransformedEffect.java
+++ b/Mage/src/main/java/mage/abilities/effects/common/ExileSagaAndReturnTransformedEffect.java
@@ -1,14 +1,15 @@
package mage.abilities.effects.common;
import mage.abilities.Pronoun;
+import mage.constants.PutCards;
/**
* @author TheElk801
*/
-public class ExileSagaAndReturnTransformedEffect extends ExileAndReturnTransformedSourceEffect {
+public class ExileSagaAndReturnTransformedEffect extends ExileAndReturnSourceEffect {
public ExileSagaAndReturnTransformedEffect() {
- super(Pronoun.IT, null, true);
+ super(PutCards.BATTLEFIELD_TRANSFORMED, Pronoun.IT, true, null);
staticText = "exile this Saga, then return it to the battlefield transformed under your control";
}
diff --git a/Mage/src/main/java/mage/abilities/effects/common/ExileSourceAndReturnFaceUpEffect.java b/Mage/src/main/java/mage/abilities/effects/common/ExileSourceAndReturnFaceUpEffect.java
new file mode 100644
index 00000000000..1e14b8fb0df
--- /dev/null
+++ b/Mage/src/main/java/mage/abilities/effects/common/ExileSourceAndReturnFaceUpEffect.java
@@ -0,0 +1,24 @@
+package mage.abilities.effects.common;
+
+import mage.abilities.Pronoun;
+import mage.constants.PutCards;
+
+/**
+ * @author TheElk801
+ */
+public class ExileSourceAndReturnFaceUpEffect extends ExileAndReturnSourceEffect {
+
+ public ExileSourceAndReturnFaceUpEffect() {
+ super(PutCards.BATTLEFIELD, Pronoun.IT, true, null);
+ staticText = "exile {this}, then return it to the battlefield. (front face up)";
+ }
+
+ private ExileSourceAndReturnFaceUpEffect(final ExileSourceAndReturnFaceUpEffect effect) {
+ super(effect);
+ }
+
+ @Override
+ public ExileSourceAndReturnFaceUpEffect copy() {
+ return new ExileSourceAndReturnFaceUpEffect(this);
+ }
+}
diff --git a/Mage/src/main/java/mage/constants/PutCards.java b/Mage/src/main/java/mage/constants/PutCards.java
index e471d9e3d3f..24e6fb7b006 100644
--- a/Mage/src/main/java/mage/constants/PutCards.java
+++ b/Mage/src/main/java/mage/constants/PutCards.java
@@ -1,6 +1,7 @@
package mage.constants;
import mage.abilities.Ability;
+import mage.abilities.keyword.TransformAbility;
import mage.cards.Card;
import mage.cards.Cards;
import mage.cards.CardsImpl;
@@ -8,7 +9,6 @@ import mage.game.Game;
import mage.players.Player;
/**
- *
* @author awjackson
*/
@@ -17,6 +17,7 @@ public enum PutCards {
GRAVEYARD(Outcome.Discard, Zone.GRAVEYARD, "into your graveyard"),
BATTLEFIELD(Outcome.PutCardInPlay, Zone.BATTLEFIELD, "onto the battlefield"),
BATTLEFIELD_TAPPED(Outcome.PutCardInPlay, Zone.BATTLEFIELD, "onto the battlefield tapped"),
+ BATTLEFIELD_TRANSFORMED(Outcome.PutCardInPlay, Zone.BATTLEFIELD, "onto the battlefield transformed"),
EXILED(Outcome.Exile, Zone.EXILED, "into exile"), // may need special case code to generate correct text
TOP_OR_BOTTOM(Outcome.Benefit, Zone.LIBRARY, "on the top or bottom of your library"),
TOP_ANY(Outcome.Benefit, Zone.LIBRARY, "on top of your library", " in any order"),
@@ -73,6 +74,8 @@ public enum PutCards {
return player.putCardsOnBottomOfLibrary(new CardsImpl(card), game, source, false);
case BATTLEFIELD_TAPPED:
return player.moveCards(card, Zone.BATTLEFIELD, source, game, true, false, false, null);
+ case BATTLEFIELD_TRANSFORMED:
+ game.getState().setValue(TransformAbility.VALUE_KEY_ENTER_TRANSFORMED + card.getId(), Boolean.TRUE);
case BATTLEFIELD:
case EXILED:
case HAND:
@@ -95,6 +98,8 @@ public enum PutCards {
return player.putCardsOnBottomOfLibrary(cards, game, source, false);
case BATTLEFIELD_TAPPED:
return player.moveCards(cards.getCards(game), Zone.BATTLEFIELD, source, game, true, false, false, null);
+ case BATTLEFIELD_TRANSFORMED:
+ cards.stream().forEach(uuid -> game.getState().setValue(TransformAbility.VALUE_KEY_ENTER_TRANSFORMED + uuid, Boolean.TRUE));
case BATTLEFIELD:
case EXILED:
case HAND: