magarena/release/Magarena/scripts/Greenside_Watcher.groovy

33 lines
1001 B
Groovy

[
new MagicPermanentActivation(
new MagicActivationHints(MagicTiming.Tapping),
"Untap"
) {
@Override
public Iterable<MagicEvent> getCostEvent(final MagicPermanent source) {
return [new MagicTapEvent(source)];
}
@Override
public MagicEvent getPermanentEvent(final MagicPermanent source,final MagicPayedCost payedCost) {
return new MagicEvent(
source,
MagicTargetChoice.Positive("target Gate"),
MagicTapTargetPicker.Untap,
this,
"Untap target Gate\$."
);
}
@Override
public void executeEvent(final MagicGame game, final MagicEvent event) {
event.processTargetPermanent(game,new MagicPermanentAction() {
public void doAction(final MagicPermanent gate) {
game.doAction(new MagicUntapAction(gate));
}
});
}
}
]