magarena/release/Magarena/scripts/Hoard_Smelter_Dragon.groovy

36 lines
1.3 KiB
Groovy
Raw Normal View History

2013-05-28 00:13:31 -07:00
[
new MagicPermanentActivation(
new MagicActivationHints(MagicTiming.Removal),
"Destroy"
) {
@Override
public Iterable<MagicEvent> getCostEvent(final MagicPermanent source) {
2013-05-28 00:13:31 -07:00
return [new MagicPayManaCostEvent(source,"{3}{R}")];
}
@Override
public MagicEvent getPermanentEvent(final MagicPermanent source,final MagicPayedCost payedCost) {
return new MagicEvent(
source,
MagicTargetChoice.TARGET_ARTIFACT,
new MagicDestroyTargetPicker(false),
this,
"Destroy target artifact\$. SN gets +X/+0 " +
"until end of turn, where X is that artifact's converted mana cost."
);
}
@Override
public void executeEvent(final MagicGame game, final MagicEvent event) {
event.processTargetPermanent(game,new MagicPermanentAction() {
public void doAction(final MagicPermanent permanent) {
game.doAction(new MagicDestroyAction(permanent));
game.doAction(new MagicChangeTurnPTAction(
event.getPermanent(),
permanent.getConvertedCost(),
0
));
}
});
}
}
]