29 lines
1.1 KiB
Groovy
29 lines
1.1 KiB
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\$. Put X +1/+1 counters on SN, " +
|
|
"where X is that spell's converted mana cost.");
|
|
}
|
|
@Override
|
|
public void executeEvent(final MagicGame game, final MagicEvent event) {
|
|
event.processTargetCardOnStack(game,new MagicCardOnStackAction() {
|
|
public void doAction(final MagicCardOnStack card) {
|
|
game.doAction(new MagicCounterItemOnStackAction(card));
|
|
game.doAction(new MagicChangeCountersAction(
|
|
event.getPermanent(),
|
|
MagicCounterType.PlusOne,
|
|
card.getConvertedCost(),
|
|
true
|
|
));
|
|
}
|
|
});
|
|
}
|
|
}
|
|
]
|