magarena/release/Magarena/scripts/Cyclonic_Rift.groovy

57 lines
2.1 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,
MagicBounceTargetPicker.getInstance(),
this,
"Return target nonland permanent\$ you don't control to its owner's hand."
);
}
@Override
public void executeEvent(
final MagicGame game,
2013-03-22 22:00:53 -07:00
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(
[
MagicConditionFactory.ManaCost("{6}{U}")
2013-02-22 19:19:20 -08:00
],
new MagicActivationHints(MagicTiming.Tapping,true),
"Overload"
) {
public MagicEvent[] getCostEvent(final MagicCard source) {
return [
new MagicPayManaCostEvent(source, source.getController(), MagicManaCost.create("{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
public void executeEvent(
final MagicGame game,
2013-03-22 22:00:53 -07:00
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
}
}
}
]