magarena/release/Magarena/scripts/Ertai__Wizard_Adept.groovy

34 lines
1.0 KiB
Groovy

[
new MagicPermanentActivation(
new MagicActivationHints(MagicTiming.Counter),
"Counter"
) {
@Override
public Iterable<MagicEvent> getCostEvent(final MagicPermanent source) {
return [
new MagicPayManaCostTapEvent(source,"{2}{U}{U}")
];
}
@Override
public MagicEvent getPermanentEvent(final MagicPermanent source,final MagicPayedCost payedCost) {
return new MagicEvent(
source,
MagicTargetChoice.NEG_TARGET_SPELL,
this,
"Counter target spell\$."
);
}
@Override
public void executeEvent(final MagicGame game, final MagicEvent event) {
event.processTargetCardOnStack(game,new MagicCardOnStackAction() {
public void doAction(final MagicCardOnStack targetSpell) {
game.doAction(new MagicCounterItemOnStackAction(targetSpell));
}
});
}
}
]