magarena/release/Magarena/scripts/Cyclonic_Rift.groovy

50 lines
1.9 KiB
Groovy
Raw Normal View History

2013-02-22 19:19:20 -08:00
[
new MagicSpellCardEvent() {
@Override
public MagicEvent getEvent(final MagicCardOnStack cardOnStack,final MagicPayedCost payedCost) {
return new MagicEvent(
cardOnStack,
MagicTargetChoice.TARGET_NONLAND_PERMANENT_YOU_DONT_CONTROL,
2013-06-30 01:53:17 -07:00
MagicBounceTargetPicker.create(),
2013-02-22 19:19:20 -08:00
this,
"Return target nonland permanent\$ you don't control to its owner's hand."
);
}
@Override
2013-06-15 03:09:37 -07:00
public void executeEvent(final MagicGame game, final MagicEvent event) {
event.processTargetPermanent(game,new MagicPermanentAction() {
2013-02-22 19:19:20 -08:00
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 [
2013-05-21 19:54:06 -07:00
new MagicPayManaCostEvent(source,"{6}{U}")
2013-02-22 19:19:20 -08:00
];
}
@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
2013-06-15 03:09:37 -07:00
public void executeEvent(final MagicGame game, final MagicEvent event) {
2013-02-22 19:19:20 -08:00
final Collection<MagicPermanent> targets=
game.filterPermanents(event.getPlayer(),MagicTargetFilter.TARGET_NONLAND_PERMANENT_YOUR_OPPONENT_CONTROLS);
for (final MagicPermanent target : targets) {
2013-02-22 21:33:50 -08:00
game.doAction(new MagicRemoveFromPlayAction(target,MagicLocationType.OwnersHand));
2013-02-22 19:19:20 -08:00
}
}
}
]