24 lines
868 B
Groovy
24 lines
868 B
Groovy
|
[
|
||
|
new MagicSpellCardEvent() {
|
||
|
@Override
|
||
|
public MagicEvent getEvent(final MagicCardOnStack cardOnStack,final MagicPayedCost payedCost) {
|
||
|
return new MagicEvent(
|
||
|
cardOnStack,
|
||
|
MagicTargetChoice.NEG_TARGET_SPELL,
|
||
|
this,
|
||
|
"Counter target spell\$. If you do, put it on top of its owner's library."
|
||
|
);
|
||
|
}
|
||
|
@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,MagicLocationType.TopOfOwnersLibrary));
|
||
|
}
|
||
|
});
|
||
|
}
|
||
|
}
|
||
|
]
|