magarena/release/Magarena/scripts/Vacuumelt.groovy

23 lines
834 B
Groovy
Raw Normal View History

2013-05-19 01:02:35 -07:00
[
new MagicSpellCardEvent() {
@Override
public MagicEvent getEvent(final MagicCardOnStack cardOnStack, final MagicPayedCost payedCost) {
return new MagicEvent(
cardOnStack,
2013-06-23 18:29:26 -07:00
MagicTargetChoice.TARGET_CREATURE,
2013-06-30 01:53:17 -07:00
MagicBounceTargetPicker.create(),
2013-05-19 01:02:35 -07:00
this,
"Return target creature\$ to its owner's hand."
);
}
@Override
public void executeEvent(final MagicGame game, final MagicEvent event) {
event.processTargetPermanent(game,new MagicPermanentAction() {
public void doAction(final MagicPermanent creature) {
game.doAction(new MagicRemoveFromPlayAction(creature,MagicLocationType.OwnersHand));
}
});
}
}
]