magarena/release/Magarena/scripts/Torch_Fiend.groovy

36 lines
1.1 KiB
Groovy
Raw Normal View History

2013-05-26 22:27:50 -07:00
[
new MagicPermanentActivation(
new MagicActivationHints(MagicTiming.Removal),
"Destroy"
) {
@Override
public Iterable<MagicEvent> getCostEvent(final MagicPermanent source) {
2013-05-26 22:27:50 -07:00
return [
new MagicPayManaCostEvent(source,"{R}"),
new MagicSacrificeEvent(source)
];
}
@Override
public MagicEvent getPermanentEvent(final MagicPermanent source,final MagicPayedCost payedCost) {
return new MagicEvent(
source,
MagicTargetChoice.TARGET_ARTIFACT,
new MagicDestroyTargetPicker(false),
this,
"Destroy target artifact\$."
);
}
@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));
}
});
}
}
]