diff --git a/Mage.Sets/src/mage/cards/s/ShimmerwingChimera.java b/Mage.Sets/src/mage/cards/s/ShimmerwingChimera.java new file mode 100644 index 0000000000..9693375b44 --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/ShimmerwingChimera.java @@ -0,0 +1,58 @@ +package mage.cards.s; + +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; +import mage.abilities.effects.common.ReturnToHandTargetEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.TargetController; +import mage.filter.FilterPermanent; +import mage.filter.common.FilterControlledEnchantmentPermanent; +import mage.filter.predicate.permanent.AnotherPredicate; +import mage.target.TargetPermanent; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class ShimmerwingChimera extends CardImpl { + + private static final FilterPermanent filter + = new FilterControlledEnchantmentPermanent("other target enchantment you control"); + + static { + filter.add(AnotherPredicate.instance); + } + + public ShimmerwingChimera(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT, CardType.CREATURE}, "{3}{U}"); + + this.subtype.add(SubType.CHIMERA); + this.power = new MageInt(3); + this.toughness = new MageInt(2); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + + // At the beginning of your upkeep, return up to one other target enchantment you control to its owner's hand. + Ability ability = new BeginningOfUpkeepTriggeredAbility( + new ReturnToHandTargetEffect(), TargetController.YOU, false + ); + ability.addTarget(new TargetPermanent(0, 1, filter, false)); + this.addAbility(ability); + } + + private ShimmerwingChimera(final ShimmerwingChimera card) { + super(card); + } + + @Override + public ShimmerwingChimera copy() { + return new ShimmerwingChimera(this); + } +} diff --git a/Mage.Sets/src/mage/sets/TherosBeyondDeath.java b/Mage.Sets/src/mage/sets/TherosBeyondDeath.java index 32dc19a906..dbcb547116 100644 --- a/Mage.Sets/src/mage/sets/TherosBeyondDeath.java +++ b/Mage.Sets/src/mage/sets/TherosBeyondDeath.java @@ -96,6 +96,7 @@ public final class TherosBeyondDeath extends ExpansionSet { cards.add(new SetCardInfo("Serpent of Yawning Depths", 291, Rarity.RARE, mage.cards.s.SerpentOfYawningDepths.class)); cards.add(new SetCardInfo("Setessan Champion", 198, Rarity.RARE, mage.cards.s.SetessanChampion.class)); cards.add(new SetCardInfo("Setessan Petitioner", 199, Rarity.UNCOMMON, mage.cards.s.SetessanPetitioner.class)); + cards.add(new SetCardInfo("Shimmerwing Chimera", 64, Rarity.UNCOMMON, mage.cards.s.ShimmerwingChimera.class)); cards.add(new SetCardInfo("Sphinx Mindbreaker", 290, Rarity.RARE, mage.cards.s.SphinxMindbreaker.class)); cards.add(new SetCardInfo("Staggering Insight", 228, Rarity.UNCOMMON, mage.cards.s.StaggeringInsight.class)); cards.add(new SetCardInfo("Stinging Lionfish", 69, Rarity.UNCOMMON, mage.cards.s.StingingLionfish.class)); diff --git a/Mage/src/main/java/mage/abilities/effects/common/ReturnToHandTargetEffect.java b/Mage/src/main/java/mage/abilities/effects/common/ReturnToHandTargetEffect.java index 574c005917..6f932960ff 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/ReturnToHandTargetEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/ReturnToHandTargetEffect.java @@ -1,10 +1,5 @@ package mage.abilities.effects.common; -import java.util.ArrayList; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Set; -import java.util.UUID; import mage.MageObject; import mage.abilities.Ability; import mage.abilities.Mode; @@ -18,6 +13,8 @@ import mage.players.Player; import mage.target.Target; import mage.util.CardUtil; +import java.util.*; + /** * @author BetaSteward_at_googlemail.com */ @@ -94,8 +91,13 @@ public class ReturnToHandTargetEffect extends OneShotEffect { Target target = mode.getTargets().get(0); StringBuilder sb = new StringBuilder("return "); if (target.getNumberOfTargets() == 0 && target.getMaxNumberOfTargets() > 0) { - sb.append("up to ").append(CardUtil.numberToText(target.getMaxNumberOfTargets())).append(" target ") - .append(target.getTargetName()).append(" to their owners' hand"); + sb.append("up to "); + sb.append(CardUtil.numberToText(target.getMaxNumberOfTargets())); + if (!target.getTargetName().contains("target")) { + sb.append(" target "); + } + sb.append(target.getTargetName()); + sb.append(" to their owners' hand"); return sb.toString(); } else { if (target.getNumberOfTargets() > 1) {