33 lines
1.1 KiB
Groovy
33 lines
1.1 KiB
Groovy
[
|
|
new MagicPermanentActivation(
|
|
MagicActivation.NO_COND,
|
|
new MagicActivationHints(MagicTiming.Counter),
|
|
"Counter"
|
|
) {
|
|
|
|
@Override
|
|
public MagicEvent[] getCostEvent(final MagicPermanent source) {
|
|
return [new MagicSacrificeEvent(source)];
|
|
}
|
|
|
|
@Override
|
|
public MagicEvent getPermanentEvent(final MagicPermanent source,final MagicPayedCost payedCost) {
|
|
return new MagicEvent(
|
|
source,
|
|
MagicTargetChoice.NEG_TARGET_INSTANT_OR_SORCERY_SPELL,
|
|
this,
|
|
"Counter target instant or sorcery spell\$ unless its controller pays {1}."
|
|
);
|
|
}
|
|
|
|
@Override
|
|
public void executeEvent(final MagicGame game, final MagicEvent event) {
|
|
event.processTargetCardOnStack(game,new MagicCardOnStackAction() {
|
|
public void doAction(final MagicCardOnStack targetSpell) {
|
|
game.addEvent(new MagicCounterUnlessEvent(event.getSource(),targetSpell,MagicManaCost.create("{1}")));
|
|
}
|
|
});
|
|
}
|
|
}
|
|
]
|