magarena/release/Magarena/scripts/Skyshroud_Ranger.groovy

37 lines
1.2 KiB
Groovy
Raw Normal View History

2013-05-28 01:00:37 -07:00
[
new MagicPermanentActivation(
[
MagicCondition.SORCERY_CONDITION
],
new MagicActivationHints(MagicTiming.Land),
"Land"
) {
@Override
public Iterable<MagicEvent> getCostEvent(final MagicPermanent source) {
2013-05-28 01:00:37 -07:00
return [new MagicTapEvent(source)];
}
@Override
public MagicEvent getPermanentEvent(final MagicPermanent source,final MagicPayedCost payedCost) {
return new MagicEvent(
source,
MagicTargetChoice.LAND_CARD_FROM_HAND,
MagicGraveyardTargetPicker.PutOntoBattlefield,
2013-05-28 01:00:37 -07:00
this,
"PN puts a land card\$ from his or her hand onto the battlefield."
2013-05-28 01:00:37 -07:00
);
}
@Override
public void executeEvent(final MagicGame game, final MagicEvent event) {
event.processTargetCard(game,new MagicCardAction() {
public void doAction(final MagicCard card) {
game.doAction(new MagicRemoveCardAction(card,MagicLocationType.OwnersHand));
game.doAction(new MagicPlayCardAction(card,event.getPlayer()));
}
});
2013-05-28 01:00:37 -07:00
}
}
]