magarena/release/Magarena/scripts/Molten_Rain.groovy

29 lines
1.1 KiB
Groovy
Raw Normal View History

2013-05-19 01:26:36 -07:00
[
new MagicSpellCardEvent() {
@Override
public MagicEvent getEvent(final MagicCardOnStack cardOnStack,final MagicPayedCost payedCost) {
return new MagicEvent(
cardOnStack,
MagicTargetChoice.NEG_TARGET_LAND,
MagicDestroyTargetPicker.Destroy,
2013-05-19 01:26:36 -07:00
this,
2013-06-23 18:29:26 -07:00
"Destroy target land\$. " +
2013-05-19 01:26:36 -07:00
"If that land was nonbasic, SN deals 2 damage to the land's controller."
);
}
@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));
if (!permanent.isBasic()) {
final MagicDamage damage = new MagicDamage(event.getSource(),permanent.getController(),2);
game.doAction(new MagicDealDamageAction(damage));
}
}
});
}
}
]