mirror of
https://github.com/correl/mage.git
synced 2025-01-12 03:00:13 +00:00
[STX] Implemented Curate
This commit is contained in:
parent
04c5afdcc2
commit
05d4a11a91
2 changed files with 78 additions and 0 deletions
77
Mage.Sets/src/mage/cards/c/Curate.java
Normal file
77
Mage.Sets/src/mage/cards/c/Curate.java
Normal file
|
@ -0,0 +1,77 @@
|
|||
package mage.cards.c;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.cards.Cards;
|
||||
import mage.cards.CardsImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
import mage.target.TargetCard;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class Curate extends CardImpl {
|
||||
|
||||
public Curate(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{U}");
|
||||
|
||||
// Look at the top two cards of your library. Put any number of them into your graveyard and the rest back on top of your library in any order.
|
||||
// Draw a card.
|
||||
this.getSpellAbility().addEffect(new CurateEffect());
|
||||
}
|
||||
|
||||
private Curate(final Curate card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Curate copy() {
|
||||
return new Curate(this);
|
||||
}
|
||||
}
|
||||
|
||||
class CurateEffect extends OneShotEffect {
|
||||
|
||||
CurateEffect() {
|
||||
super(Outcome.Benefit);
|
||||
staticText = "look at the top two cards of your library. Put any number of them into your graveyard " +
|
||||
"and the rest back on top of your library in any order.<br>Draw a card";
|
||||
}
|
||||
|
||||
private CurateEffect(final CurateEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CurateEffect copy() {
|
||||
return new CurateEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player player = game.getPlayer(source.getControllerId());
|
||||
if (player == null) {
|
||||
return false;
|
||||
}
|
||||
Cards cards = new CardsImpl(player.getLibrary().getTopCards(game, 2));
|
||||
if (!cards.isEmpty()) {
|
||||
TargetCard target = new TargetCard(0, cards.size(), Zone.LIBRARY, StaticFilters.FILTER_CARD);
|
||||
target.withChooseHint("to graveyard");
|
||||
player.chooseTarget(Outcome.Benefit, cards, target, source, game);
|
||||
player.moveCards(new CardsImpl(target.getTargets()), Zone.GRAVEYARD, source, game);
|
||||
cards.removeAll(target.getTargets());
|
||||
player.putCardsOnTopOfLibrary(cards, game, source, true);
|
||||
}
|
||||
player.drawCards(1, source, game);
|
||||
return true;
|
||||
}
|
||||
}
|
|
@ -41,6 +41,7 @@ public final class StrixhavenSchoolOfMages extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Combat Professor", 11, Rarity.COMMON, mage.cards.c.CombatProfessor.class));
|
||||
cards.add(new SetCardInfo("Creative Outburst", 171, Rarity.UNCOMMON, mage.cards.c.CreativeOutburst.class));
|
||||
cards.add(new SetCardInfo("Culmination of Studies", 173, Rarity.RARE, mage.cards.c.CulminationOfStudies.class));
|
||||
cards.add(new SetCardInfo("Curate", 40, Rarity.COMMON, mage.cards.c.Curate.class));
|
||||
cards.add(new SetCardInfo("Dragonsguard Elite", 127, Rarity.RARE, mage.cards.d.DragonsguardElite.class));
|
||||
cards.add(new SetCardInfo("Dueling Coach", 15, Rarity.UNCOMMON, mage.cards.d.DuelingCoach.class));
|
||||
cards.add(new SetCardInfo("Eager First-Year", 16, Rarity.COMMON, mage.cards.e.EagerFirstYear.class));
|
||||
|
|
Loading…
Reference in a new issue