magarena/release/Magarena/scripts/Faceless_Devourer.groovy

27 lines
1.2 KiB
Groovy
Raw Normal View History

2013-05-26 03:30:35 -07:00
[
new MagicWhenComesIntoPlayTrigger() {
2013-04-12 19:32:25 -07:00
@Override
2013-06-19 07:23:35 -07:00
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent, final MagicPayedCost payedCost) {
final MagicTargetFilter<MagicPermanent> targetFilter = new MagicOtherPermanentTargetFilter(
2013-04-12 19:32:25 -07:00
MagicTargetFilter.TARGET_CREATURE_WITH_SHADOW,permanent);
final MagicTargetChoice targetChoice = new MagicTargetChoice(
targetFilter,true,MagicTargetHint.None,"another creature with shadow to exile");
return new MagicEvent(
permanent,
targetChoice,
MagicExileTargetPicker.create(),
this,
2013-05-26 03:30:35 -07:00
"Exile another creature with shadow\$."
2013-04-12 19:32:25 -07:00
);
}
@Override
2013-05-26 03:30:35 -07:00
public void executeEvent(final MagicGame game, final MagicEvent event) {
2013-04-12 19:32:25 -07:00
event.processTargetPermanent(game,new MagicPermanentAction() {
public void doAction(final MagicPermanent creature) {
2013-05-26 03:30:35 -07:00
game.doAction(new MagicExileUntilThisLeavesPlayAction(event.getPermanent(),creature));
2013-04-12 19:32:25 -07:00
}
});
}
2013-05-26 03:30:35 -07:00
}
]