magarena/release/Magarena/scripts/Vapor_Snag.groovy

25 lines
980 B
Groovy

[
new MagicSpellCardEvent() {
@Override
public MagicEvent getEvent(final MagicCardOnStack cardOnStack, final MagicPayedCost payedCost) {
return new MagicEvent(
cardOnStack,
MagicTargetChoice.TARGET_CREATURE,
MagicBounceTargetPicker.getInstance(),
this,
"Return target creature\$ to its owner's hand. " +
"Its controller loses 1 life."
);
}
@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));
game.doAction(new MagicChangeLifeAction(creature.getController(),-1));
}
});
}
}
]