magarena/release/Magarena/scripts/Elvish_Piper.groovy

35 lines
1.2 KiB
Groovy
Raw Normal View History

2013-05-28 02:35:53 -07:00
[
new MagicPermanentActivation(
new MagicActivationHints(MagicTiming.Token),
"Put"
2013-05-28 02:35:53 -07:00
) {
@Override
public Iterable<MagicEvent> getCostEvent(final MagicPermanent source) {
2013-05-28 02:35:53 -07:00
return [
new MagicTapEvent(source),
new MagicPayManaCostEvent(source,"{G}")
];
}
@Override
public MagicEvent getPermanentEvent(final MagicPermanent source, final MagicPayedCost payedCost) {
return new MagicEvent(
source,
MagicTargetChoice.CREATURE_CARD_FROM_HAND,
MagicGraveyardTargetPicker.PutOntoBattlefield,
2013-05-28 02:35:53 -07:00
this,
"PN puts a creature card\$ from his or her hand onto the battlefield."
2013-05-28 02:35:53 -07:00
);
}
@Override
public void executeEvent(final MagicGame game, final MagicEvent event) {
2013-12-01 00:44:42 -08:00
event.processTargetCard(game, {
final MagicCard card ->
game.doAction(new MagicRemoveCardAction(card,MagicLocationType.OwnersHand));
game.doAction(new MagicPlayCardAction(card,event.getPlayer()));
2013-05-28 02:35:53 -07:00
});
}
}
]