magarena/incomplete/Condescend.groovy

24 lines
930 B
Groovy

[
new MagicSpellCardEvent() {
@Override
public MagicEvent getEvent(final MagicCardOnStack cardOnStack,final MagicPayedCost payedCost) {
return new MagicEvent(
cardOnStack,
MagicTargetChoice.NEG_TARGET_SPELL,
payedCost.getX(),
this,
"Counter target spell\$ unless its controller pays {RN}.\$ " +
"Scry 2."
);
}
@Override
public void executeEvent(final MagicGame game, final MagicEvent event) {
event.processTargetCardOnStack(game, {
final MagicCardOnStack targetSpell ->
game.addEvent(new MagicCounterUnlessEvent(event.getSource(),targetSpell,MagicManaCost.create("{" + event.getRefInt() + "}")));
game.addEvent(new MagicScryXEvent(event.getSource(),event.getPlayer(),2));
});
}
}
]