23 lines
795 B
Groovy
23 lines
795 B
Groovy
[
|
|
new MagicWhenComesIntoPlayTrigger() {
|
|
@Override
|
|
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent, final MagicPlayer player) {
|
|
return new MagicEvent(
|
|
permanent,
|
|
player,
|
|
MagicTargetChoice.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));
|
|
}
|
|
});
|
|
}
|
|
}
|
|
]
|