Implemented Shimmerwing Chimera

This commit is contained in:
Evan Kranzler 2020-01-03 22:10:45 -05:00
parent cc2e42dc00
commit d5474df005
3 changed files with 68 additions and 7 deletions

View file

@ -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);
}
}

View file

@ -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));

View file

@ -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) {