magarena/release/Magarena/scripts/Roaring_Primadox.groovy

29 lines
1.0 KiB
Groovy

[
new MagicAtUpkeepTrigger() {
@Override
public MagicEvent executeTrigger(
final MagicGame game,
final MagicPermanent permanent,
final MagicPlayer upkeepPlayer) {
return permanent.isController(upkeepPlayer) ?
new MagicEvent(
permanent,
MagicTargetChoice.CREATURE_YOU_CONTROL,
MagicBounceTargetPicker.create(),
this,
"Return a creature you control to its owner's hand."
):
MagicEvent.NONE;
}
@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));
}
});
}
}
]