magarena/release/Magarena/scripts/Rootrunner.groovy

37 lines
1.2 KiB
Groovy

[
new MagicPermanentActivation(
[MagicConditionFactory.ManaCost("{G}{G}")],
new MagicActivationHints(MagicTiming.Removal),
"Bounce"
) {
@Override
public MagicEvent[] getCostEvent(final MagicPermanent source) {
return [new MagicPayManaCostSacrificeEvent(source,"{G}{G}")];
}
@Override
public MagicEvent getPermanentEvent(final MagicPermanent source,final MagicPayedCost payedCost) {
return new MagicEvent(
source,
MagicTargetChoice.NEG_TARGET_LAND,
MagicBounceTargetPicker.getInstance(),
this,
"Put target land\$ on top of its owner's library."
);
}
@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.TopOfOwnersLibrary
));
}
});
}
}
]