diff --git a/Mage.Sets/src/mage/cards/t/ThassaDeepDwelling.java b/Mage.Sets/src/mage/cards/t/ThassaDeepDwelling.java index 902a8cb64f..43ef9c402e 100644 --- a/Mage.Sets/src/mage/cards/t/ThassaDeepDwelling.java +++ b/Mage.Sets/src/mage/cards/t/ThassaDeepDwelling.java @@ -1,6 +1,5 @@ package mage.cards.t; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.BeginningOfEndStepTriggeredAbility; @@ -20,20 +19,24 @@ import mage.constants.SubType; import mage.constants.SuperType; import mage.constants.TargetController; import mage.filter.FilterPermanent; -import mage.filter.StaticFilters; +import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.permanent.AnotherPredicate; import mage.target.TargetPermanent; +import java.util.UUID; + /** * @author TheElk801 */ public final class ThassaDeepDwelling extends CardImpl { - private static final FilterPermanent filter = new FilterCreaturePermanent("another target creature"); + private static final FilterPermanent filterAnother = new FilterCreaturePermanent("another target creature"); + private static final FilterPermanent filterOther = new FilterControlledCreaturePermanent("other target creature you control"); static { - filter.add(AnotherPredicate.instance); + filterAnother.add(AnotherPredicate.instance); + filterOther.add(AnotherPredicate.instance); } public ThassaDeepDwelling(UUID ownerId, CardSetInfo setInfo) { @@ -53,12 +56,12 @@ public final class ThassaDeepDwelling extends CardImpl { // At the beginning of your end step, exile up to one other target creature you control, then return that card to the battlefield under your control. Ability ability = new BeginningOfEndStepTriggeredAbility( - new ExileTargetForSourceEffect().setText("exile up to one other target creature you control, then "), + new ExileTargetForSourceEffect()/*.setText("exile up to one other target creature you control")*/, TargetController.YOU, false ); - ability.addEffect(new ReturnToBattlefieldUnderYourControlTargetEffect(true)); + ability.addEffect(new ReturnToBattlefieldUnderYourControlTargetEffect(true).concatBy(", then")); ability.addTarget(new TargetPermanent( - 0, 1, StaticFilters.FILTER_CONTROLLED_ANOTHER_CREATURE, false + 0, 1, filterOther, false )); this.addAbility(ability); @@ -66,7 +69,7 @@ public final class ThassaDeepDwelling extends CardImpl { ability = new SimpleActivatedAbility( new TapTargetEffect("another target creature"), new ManaCostsImpl("{3}{U}") ); - ability.addTarget(new TargetPermanent(filter)); + ability.addTarget(new TargetPermanent(filterAnother)); this.addAbility(ability); } diff --git a/Mage.Tests/src/test/java/org/mage/test/commander/duel/YorvoLordOfGarenbrigOnCommandersTest.java b/Mage.Tests/src/test/java/org/mage/test/commander/duel/YorvoLordOfGarenbrigOnCommandersTest.java index a9e7e1ed57..9fb0832ab5 100644 --- a/Mage.Tests/src/test/java/org/mage/test/commander/duel/YorvoLordOfGarenbrigOnCommandersTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/commander/duel/YorvoLordOfGarenbrigOnCommandersTest.java @@ -38,7 +38,7 @@ public class YorvoLordOfGarenbrigOnCommandersTest extends CardTestCommanderDuelB } @Test - public void test_TriggerOnUroTitalOfNaturesWrath() { + public void test_TriggerOnUroTitanOfNaturesWrath() { // Yorvo, Lord of Garenbrig enters the battlefield with four +1/+1 counters on it. // Whenever another green creature enters the battlefield under your control, put a +1/+1 counter on Yorvo. Then if that creature’s power is greater than Yorvo’s power, put another +1/+1 counter on Yorvo. addCard(Zone.HAND, playerA, "Yorvo, Lord of Garenbrig", 5); // {G}{G}{G} diff --git a/Mage/src/main/java/mage/abilities/effects/common/ExileTargetForSourceEffect.java b/Mage/src/main/java/mage/abilities/effects/common/ExileTargetForSourceEffect.java index d6fd043a15..1ded5be2d4 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/ExileTargetForSourceEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/ExileTargetForSourceEffect.java @@ -1,9 +1,5 @@ - package mage.abilities.effects.common; -import java.util.LinkedHashSet; -import java.util.Set; -import java.util.UUID; import mage.MageObject; import mage.abilities.Ability; import mage.abilities.Mode; @@ -16,8 +12,11 @@ import mage.target.Target; import mage.target.targetpointer.FirstTargetPointer; import mage.util.CardUtil; +import java.util.LinkedHashSet; +import java.util.Set; +import java.util.UUID; + /** - * * @author BetaSteward_at_googlemail.com */ public class ExileTargetForSourceEffect extends OneShotEffect { @@ -70,12 +69,21 @@ public class ExileTargetForSourceEffect extends OneShotEffect { return staticText; } + String upToText = ""; + if (mode.getTargets().get(0).getMinNumberOfTargets() < mode.getTargets().get(0).getMaxNumberOfTargets()) { + upToText = "up to " + CardUtil.numberToText(mode.getTargets().get(0).getMaxNumberOfTargets()) + " "; + } + String targetText = ""; + if (mode.getTargets().get(0).getTargetName().contains("target ")) { + targetText = ""; + } else { + targetText = "target "; + } + if (mode.getTargets().isEmpty()) { return "exile it"; - } else if (mode.getTargets().get(0).getTargetName().startsWith("another")) { - return "exile " + mode.getTargets().get(0).getTargetName(); } else { - return "exile target " + mode.getTargets().get(0).getTargetName(); + return "exile " + upToText + targetText + mode.getTargets().get(0).getTargetName(); } } }