magarena/release/Magarena/scripts/Shivan_Wurm.groovy

23 lines
902 B
Groovy

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