magarena/release/Magarena/scripts/Roaring_Primadox.groovy

29 lines
1.0 KiB
Groovy
Raw Normal View History

2013-05-18 18:42:47 -07:00
[
new MagicAtUpkeepTrigger() {
2013-04-12 19:32:25 -07:00
@Override
public MagicEvent executeTrigger(
final MagicGame game,
final MagicPermanent permanent,
final MagicPlayer upkeepPlayer) {
return permanent.isController(upkeepPlayer) ?
new MagicEvent(
permanent,
MagicTargetChoice.TARGET_CREATURE_YOU_CONTROL,
MagicBounceTargetPicker.getInstance(),
this,
2013-05-18 18:42:47 -07:00
"Return a creature you control to its owner's hand."
):
2013-04-12 19:32:25 -07:00
MagicEvent.NONE;
}
@Override
2013-05-18 18:42:47 -07:00
public void executeEvent(final MagicGame game, final MagicEvent event) {
2013-04-12 19:32:25 -07:00
event.processTargetPermanent(game,new MagicPermanentAction() {
public void doAction(final MagicPermanent creature) {
game.doAction(new MagicRemoveFromPlayAction(creature,MagicLocationType.OwnersHand));
}
});
}
2013-05-18 18:42:47 -07:00
}
]