magarena/release/Magarena/scripts/Hideous_End.groovy

25 lines
984 B
Groovy
Raw Normal View History

2013-05-18 19:43:44 -07:00
[
new MagicSpellCardEvent() {
@Override
public MagicEvent getEvent(final MagicCardOnStack cardOnStack,final MagicPayedCost payedCost) {
return new MagicEvent(
cardOnStack,
MagicTargetChoice.NEG_TARGET_NONBLACK_CREATURE,
new MagicDestroyTargetPicker(false),
this,
"Destroy target nonblack creature\$. Its controller loses 2 life."
);
}
@Override
public void executeEvent(final MagicGame game, final MagicEvent event) {
event.processTargetPermanent(game,new MagicPermanentAction() {
public void doAction(final MagicPermanent creature) {
final MagicPlayer controller=creature.getController();
game.doAction(new MagicDestroyAction(creature));
game.doAction(new MagicChangeLifeAction(controller,-2));
}
});
}
}
]