diff --git a/Mage.Sets/src/mage/cards/c/ConquerorsGalleon.java b/Mage.Sets/src/mage/cards/c/ConquerorsGalleon.java index 064d077641..362fc83a94 100644 --- a/Mage.Sets/src/mage/cards/c/ConquerorsGalleon.java +++ b/Mage.Sets/src/mage/cards/c/ConquerorsGalleon.java @@ -1,8 +1,7 @@ - package mage.cards.c; -import java.util.UUID; import mage.MageInt; +import mage.abilities.Gender; import mage.abilities.common.AttacksTriggeredAbility; import mage.abilities.common.delayed.AtTheEndOfCombatDelayedTriggeredAbility; import mage.abilities.effects.common.CreateDelayedTriggeredAbilityEffect; @@ -14,8 +13,9 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; +import java.util.UUID; + /** - * * @author TheElk801 */ public final class ConquerorsGalleon extends CardImpl { @@ -34,7 +34,7 @@ public final class ConquerorsGalleon extends CardImpl { this.addAbility(new TransformAbility()); this.addAbility(new AttacksTriggeredAbility( new CreateDelayedTriggeredAbilityEffect( - new AtTheEndOfCombatDelayedTriggeredAbility(new ExileAndReturnTransformedSourceEffect())), + new AtTheEndOfCombatDelayedTriggeredAbility(new ExileAndReturnTransformedSourceEffect(Gender.NEUTRAL, null, true))), false, "When {this} attacks, exile it at the end of combat, then return it to the battlefield transformed under your control.")); diff --git a/Mage/src/main/java/mage/abilities/effects/common/ExileAndReturnTransformedSourceEffect.java b/Mage/src/main/java/mage/abilities/effects/common/ExileAndReturnTransformedSourceEffect.java index 3a5d55092a..4201f8e84a 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/ExileAndReturnTransformedSourceEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/ExileAndReturnTransformedSourceEffect.java @@ -24,6 +24,7 @@ import mage.players.Player; public class ExileAndReturnTransformedSourceEffect extends OneShotEffect { protected Effect additionalEffect; + protected boolean returnUnderYourControl; public ExileAndReturnTransformedSourceEffect() { this(Gender.NEUTRAL); @@ -33,20 +34,28 @@ public class ExileAndReturnTransformedSourceEffect extends OneShotEffect { this(gender, null); } + public ExileAndReturnTransformedSourceEffect(Gender gender, Effect additionalEffect) { + this(gender, additionalEffect, false); + } + /** * @param gender - * @param additionalEffect that effect is applies as source is exiled + * @param additionalEffect that effect is applies as source is exiled + * @param returnUnderYourControl return under your or owner control */ - public ExileAndReturnTransformedSourceEffect(Gender gender, Effect additionalEffect) { + public ExileAndReturnTransformedSourceEffect(Gender gender, Effect additionalEffect, boolean returnUnderYourControl) { super(Outcome.Benefit); this.additionalEffect = additionalEffect; + this.returnUnderYourControl = returnUnderYourControl; this.staticText = "exile {this}, then return " + gender.getPersonalPronoun() - + " to the battlefield transformed under " + gender.getPossesivePronoun() + " owner's control"; + + " to the battlefield transformed under " + gender.getPossesivePronoun() + + " " + (this.returnUnderYourControl ? "your" : "owner's") + " control"; } public ExileAndReturnTransformedSourceEffect(final ExileAndReturnTransformedSourceEffect effect) { super(effect); this.additionalEffect = effect.additionalEffect; + this.returnUnderYourControl = effect.returnUnderYourControl; } @Override @@ -64,7 +73,7 @@ public class ExileAndReturnTransformedSourceEffect extends OneShotEffect { game.getState().setValue(TransformAbility.VALUE_KEY_ENTER_TRANSFORMED + source.getSourceId(), Boolean.TRUE); Card cardFromExile = game.getCard(source.getSourceId()); if (cardFromExile != null) { - controller.moveCards(cardFromExile, Zone.BATTLEFIELD, source, game, false, false, true, null); + controller.moveCards(cardFromExile, Zone.BATTLEFIELD, source, game, false, false, !this.returnUnderYourControl, null); if (additionalEffect != null) { if (additionalEffect instanceof ContinuousEffect) { game.addEffect((ContinuousEffect) additionalEffect, source);