forked from External/mage
52 lines
1.7 KiB
Java
52 lines
1.7 KiB
Java
package mage.cards.m;
|
|
|
|
import mage.MageInt;
|
|
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
|
import mage.abilities.effects.common.search.SearchLibraryPutInHandEffect;
|
|
import mage.cards.CardImpl;
|
|
import mage.cards.CardSetInfo;
|
|
import mage.constants.CardType;
|
|
import mage.constants.ComparisonType;
|
|
import mage.constants.SubType;
|
|
import mage.filter.FilterCard;
|
|
import mage.filter.common.FilterInstantOrSorceryCard;
|
|
import mage.filter.predicate.mageobject.ManaValuePredicate;
|
|
import mage.target.common.TargetCardInLibrary;
|
|
|
|
import java.util.UUID;
|
|
|
|
/**
|
|
* @author TheElk801
|
|
*/
|
|
public final class Micromancer extends CardImpl {
|
|
|
|
private static final FilterCard filter
|
|
= new FilterInstantOrSorceryCard("instant or sorcery card with mana value 1");
|
|
|
|
static {
|
|
filter.add(new ManaValuePredicate(ComparisonType.EQUAL_TO, 1));
|
|
}
|
|
|
|
public Micromancer(UUID ownerId, CardSetInfo setInfo) {
|
|
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{U}");
|
|
|
|
this.subtype.add(SubType.HUMAN);
|
|
this.subtype.add(SubType.WIZARD);
|
|
this.power = new MageInt(3);
|
|
this.toughness = new MageInt(3);
|
|
|
|
// When Micromancer enters the battlefield, you may search your library for an instant or sorcery card with mana value 1, reveal it, put it into your hand, then shuffle.
|
|
this.addAbility(new EntersBattlefieldTriggeredAbility(new SearchLibraryPutInHandEffect(
|
|
new TargetCardInLibrary(filter), true, true
|
|
), true));
|
|
}
|
|
|
|
private Micromancer(final Micromancer card) {
|
|
super(card);
|
|
}
|
|
|
|
@Override
|
|
public Micromancer copy() {
|
|
return new Micromancer(this);
|
|
}
|
|
}
|