magarena/release/Magarena/scripts/Stingerfling_Spider.groovy

28 lines
992 B
Groovy
Raw Normal View History

2013-05-18 18:29:35 -07:00
[
new MagicWhenComesIntoPlayTrigger() {
2013-04-12 19:32:25 -07:00
@Override
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent, final MagicPlayer player) {
return new MagicEvent(
permanent,
new MagicMayChoice(
MagicTargetChoice.NEG_TARGET_CREATURE_WITH_FLYING
),
new MagicDestroyTargetPicker(false),
this,
2013-05-18 18:29:35 -07:00
"PN may\$ destroy target creature\$ with flying."
2013-04-12 19:32:25 -07:00
);
}
@Override
2013-05-18 18:29:35 -07:00
public void executeEvent(final MagicGame game, final MagicEvent event) {
2013-04-12 19:32:25 -07:00
if (event.isYes()) {
event.processTargetPermanent(game,new MagicPermanentAction() {
public void doAction(final MagicPermanent permanent) {
game.doAction(new MagicDestroyAction(permanent));
}
});
}
}
2013-05-18 18:29:35 -07:00
}
]