50 lines
1.9 KiB
Groovy
50 lines
1.9 KiB
Groovy
[
|
|
new MagicSpellCardEvent() {
|
|
@Override
|
|
public MagicEvent getEvent(final MagicCardOnStack cardOnStack,final MagicPayedCost payedCost) {
|
|
return new MagicEvent(
|
|
cardOnStack,
|
|
MagicTargetChoice.TARGET_NONLAND_PERMANENT_YOU_DONT_CONTROL,
|
|
MagicBounceTargetPicker.create(),
|
|
this,
|
|
"Return target nonland permanent\$ you don't 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));
|
|
}
|
|
});
|
|
}
|
|
},
|
|
new MagicCardActivation(
|
|
new MagicActivationHints(MagicTiming.Tapping,true),
|
|
"Overload"
|
|
) {
|
|
public MagicEvent[] getCostEvent(final MagicCard source) {
|
|
return [
|
|
new MagicPayManaCostEvent(source,"{6}{U}")
|
|
];
|
|
}
|
|
@Override
|
|
public MagicEvent getEvent(final MagicCardOnStack cardOnStack,final MagicPayedCost payedCost) {
|
|
return new MagicEvent(
|
|
cardOnStack,
|
|
this,
|
|
"Return each nonland permanent you don't control to its owner's hand."
|
|
);
|
|
}
|
|
@Override
|
|
public void executeEvent(final MagicGame game, final MagicEvent event) {
|
|
final Collection<MagicPermanent> targets=
|
|
game.filterPermanents(event.getPlayer(),MagicTargetFilter.TARGET_NONLAND_PERMANENT_YOUR_OPPONENT_CONTROLS);
|
|
for (final MagicPermanent target : targets) {
|
|
game.doAction(new MagicRemoveFromPlayAction(target,MagicLocationType.OwnersHand));
|
|
}
|
|
}
|
|
}
|
|
]
|