magarena/release/Magarena/scripts/Admonition_Angel.groovy

36 lines
1.4 KiB
Groovy
Raw Normal View History

2013-05-26 22:10:42 -07:00
[
new MagicLandfallTrigger() {
2013-04-12 19:32:25 -07:00
@Override
protected MagicEvent getEvent(final MagicPermanent permanent) {
final MagicTargetFilter<MagicPermanent> targetFilter =
new MagicTargetFilter.MagicOtherPermanentTargetFilter(
MagicTargetFilter.TARGET_NONLAND_PERMANENT,
permanent);
final MagicTargetChoice targetChoice =
new MagicTargetChoice(
targetFilter,
true,
MagicTargetHint.None,
"another target nonland permanent to exile");
return new MagicEvent(
permanent,
new MagicMayChoice(targetChoice),
MagicExileTargetPicker.create(),
this,
2013-05-26 22:10:42 -07:00
"PN may\$ exile another target nonland permanent\$."
);
2013-04-12 19:32:25 -07:00
}
@Override
2013-05-26 22:10:42 -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 target) {
game.doAction(new MagicExileUntilThisLeavesPlayAction(event.getPermanent(),target));
}
});
}
}
2013-05-26 22:10:42 -07:00
}
]