Implemented Moonlit Scavengers

This commit is contained in:
Evan Kranzler 2019-09-20 19:06:22 -04:00
parent 6578dbc3d8
commit a31bf66bee
2 changed files with 62 additions and 0 deletions

View file

@ -0,0 +1,61 @@
package mage.cards.m;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.condition.Condition;
import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition;
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
import mage.abilities.effects.common.ReturnToHandTargetEffect;
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.FilterArtifactOrEnchantmentPermanent;
import mage.filter.predicate.permanent.ControllerPredicate;
import mage.target.common.TargetOpponentsCreaturePermanent;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class MoonlitScavengers extends CardImpl {
private static final FilterPermanent filter = new FilterArtifactOrEnchantmentPermanent();
static {
filter.add(new ControllerPredicate(TargetController.YOU));
}
private static final Condition condition = new PermanentsOnTheBattlefieldCondition(filter);
public MoonlitScavengers(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{U}");
this.subtype.add(SubType.MERFOLK);
this.subtype.add(SubType.ROGUE);
this.power = new MageInt(4);
this.toughness = new MageInt(5);
// When Moonlit Scavengers enters the battlefield, if you control an artifact or enchantment, return target creature an opponent controls to its owner's hand.
Ability ability = new ConditionalInterveningIfTriggeredAbility(
new EntersBattlefieldTriggeredAbility(new ReturnToHandTargetEffect()), condition,
"When {this} enters the battlefield, if you control an artifact or enchantment, " +
"return target creature an opponent controls to its owner's hand."
);
ability.addTarget(new TargetOpponentsCreaturePermanent());
this.addAbility(ability);
}
private MoonlitScavengers(final MoonlitScavengers card) {
super(card);
}
@Override
public MoonlitScavengers copy() {
return new MoonlitScavengers(this);
}
}

View file

@ -170,6 +170,7 @@ public final class ThroneOfEldraine extends ExpansionSet {
cards.add(new SetCardInfo("Midnight Clock", 54, Rarity.RARE, mage.cards.m.MidnightClock.class));
cards.add(new SetCardInfo("Mirrormade", 55, Rarity.RARE, mage.cards.m.Mirrormade.class));
cards.add(new SetCardInfo("Mistford River Turtle", 56, Rarity.COMMON, mage.cards.m.MistfordRiverTurtle.class));
cards.add(new SetCardInfo("Moonlit Scavengers", 57, Rarity.COMMON, mage.cards.m.MoonlitScavengers.class));
cards.add(new SetCardInfo("Mountain", 262, Rarity.LAND, mage.cards.basiclands.Mountain.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("Mountain", 263, Rarity.LAND, mage.cards.basiclands.Mountain.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("Mountain", 264, Rarity.LAND, mage.cards.basiclands.Mountain.class, NON_FULL_USE_VARIOUS));