magarena/release/Magarena/scripts/Nephalia_Smuggler.groovy

44 lines
1.7 KiB
Groovy

[
new MagicPermanentActivation(
new MagicActivationHints(MagicTiming.Main),
"Card"
) {
@Override
public Iterable<MagicEvent> getCostEvent(final MagicPermanent source) {
return [
new MagicTapEvent(source),
new MagicPayManaCostEvent(source,"{3}{U}")
];
}
@Override
public MagicEvent getPermanentEvent(final MagicPermanent source, final MagicPayedCost payedCost) {
final MagicTargetChoice targetChoice = new MagicTargetChoice(
new MagicOtherPermanentTargetFilter(
MagicTargetFilter.TARGET_CREATURE_YOU_CONTROL,
source
),
MagicTargetHint.None,
"another target creature to exile"
);
return new MagicEvent(
source,
targetChoice,
MagicBounceTargetPicker.create(),
this,
"Exile another target creature you control\$, then " +
"return that card to the battlefield under your control."
);
}
@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.Exile));
game.doAction(new MagicRemoveCardAction(creature.getCard(),MagicLocationType.Exile));
game.doAction(new MagicPlayCardAction(creature.getCard(),event.getPlayer()));
}
});
}
}
]