magarena/release/Magarena/scripts/Eaten_by_Spiders.groovy

27 lines
1.0 KiB
Groovy
Raw Normal View History

2013-05-19 01:09:47 -07:00
[
new MagicSpellCardEvent() {
@Override
2013-06-15 18:11:36 -07:00
public MagicEvent getEvent(final MagicCardOnStack cardOnStack, final MagicPayedCost payedCost) {
2013-05-19 01:09:47 -07:00
return new MagicEvent(
cardOnStack,
MagicTargetChoice.NEG_TARGET_CREATURE_WITH_FLYING,
new MagicDestroyTargetPicker(false),
this,
"Destroy target creature\$ with flying and " +
"all Equipment attached to that creature."
);
}
@Override
public void executeEvent(final MagicGame game, final MagicEvent event) {
event.processTargetPermanent(game,new MagicPermanentAction() {
public void doAction(final MagicPermanent creature) {
final MagicPermanentList perms = new MagicPermanentList();
perms.add(creature);
perms.addAll(creature.getEquipmentPermanents());
game.doAction(new MagicDestroyAction(perms));
}
});
}
}
]