forked from External/mage
47 lines
1.8 KiB
Java
47 lines
1.8 KiB
Java
package mage.cards.p;
|
|
|
|
import mage.MageInt;
|
|
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
|
import mage.abilities.effects.common.LookLibraryAndPickControllerEffect;
|
|
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
|
import mage.cards.CardImpl;
|
|
import mage.cards.CardSetInfo;
|
|
import mage.constants.CardType;
|
|
import mage.constants.PutCards;
|
|
import mage.constants.SubType;
|
|
import mage.counters.CounterType;
|
|
import mage.filter.FilterCard;
|
|
import mage.filter.common.FilterBySubtypeCard;
|
|
|
|
import java.util.UUID;
|
|
|
|
/**
|
|
* @author TheElk801
|
|
*/
|
|
public final class PulsarSquadronAce extends CardImpl {
|
|
|
|
private static final FilterCard filter = new FilterBySubtypeCard(SubType.SPACECRAFT);
|
|
|
|
public PulsarSquadronAce(UUID ownerId, CardSetInfo setInfo) {
|
|
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{W}");
|
|
|
|
this.subtype.add(SubType.HUMAN);
|
|
this.subtype.add(SubType.PILOT);
|
|
this.power = new MageInt(1);
|
|
this.toughness = new MageInt(2);
|
|
|
|
// When this creature enters, look at the top five cards of your library. You may reveal a Spacecraft card from among them and put it into your hand. Put the rest on the bottom of your library in a random order. If you didn't put a card into your hand this way, put a +1/+1 counter on this creature.
|
|
this.addAbility(new EntersBattlefieldTriggeredAbility(new LookLibraryAndPickControllerEffect(
|
|
5, 1, filter, PutCards.HAND, PutCards.BOTTOM_RANDOM
|
|
).withOtherwiseEffect(new AddCountersSourceEffect(CounterType.P1P1.createInstance()))));
|
|
}
|
|
|
|
private PulsarSquadronAce(final PulsarSquadronAce card) {
|
|
super(card);
|
|
}
|
|
|
|
@Override
|
|
public PulsarSquadronAce copy() {
|
|
return new PulsarSquadronAce(this);
|
|
}
|
|
}
|