magarena/release/Magarena/scripts/Emancipation_Angel.groovy

29 lines
1008 B
Groovy

[
new MagicWhenComesIntoPlayTrigger() {
@Override
public MagicEvent executeTrigger(
final MagicGame game,
final MagicPermanent permanent,
final MagicPlayer player) {
return new MagicEvent(
permanent,
MagicTargetChoice.TARGET_PERMANENT_YOU_CONTROL,
MagicBounceTargetPicker.getInstance(),
this,
"Return a permanent\$ you control 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 permanent) {
game.doAction(new MagicRemoveFromPlayAction(
permanent,
MagicLocationType.OwnersHand
));
}
});
}
}
]