magarena/release/Magarena/scripts/Arcbound_Reclaimer.groovy

37 lines
1.4 KiB
Groovy

[
new MagicPermanentActivation(
new MagicActivationHints(MagicTiming.Main),
"Card"
) {
@Override
public Iterable<MagicEvent> getCostEvent(final MagicPermanent source) {
return [
new MagicRemoveCounterEvent(source,MagicCounterType.PlusOne,1)
];
}
@Override
public MagicEvent getPermanentEvent(final MagicPermanent source,final MagicPayedCost payedCost) {
return new MagicEvent(
source,
MagicTargetChoice.TARGET_ARTIFACT_CARD_FROM_GRAVEYARD,
MagicGraveyardTargetPicker.ReturnToHand,
this,
"Put target artifact card\$ from your graveyard on top of your library"
);
}
@Override
public void executeEvent(final MagicGame game, final MagicEvent event) {
event.processTargetCard(game,new MagicCardAction() {
public void doAction(final MagicCard targetCard) {
game.doAction(new MagicRemoveCardAction(targetCard,MagicLocationType.Graveyard));
game.doAction(new MagicMoveCardAction(
targetCard,
MagicLocationType.Graveyard,
MagicLocationType.TopOfOwnersLibrary
));
}
});
}
}
]