magarena/release/Magarena/scripts/Angel_of_Glory_s_Rise.groovy

37 lines
1.3 KiB
Groovy
Raw Normal View History

2013-05-26 22:24:58 -07:00
[
new MagicWhenComesIntoPlayTrigger() {
@Override
public MagicEvent executeTrigger(
final MagicGame game,
final MagicPermanent permanent,
2013-06-19 07:23:35 -07:00
final MagicPayedCost payedCost) {
2013-05-26 22:24:58 -07:00
return new MagicEvent(
permanent,
this,
"Exile all Zombies, then return all Human creature " +
"cards from PN's graveyard to the battlefield."
);
}
@Override
public void executeEvent(final MagicGame game, final MagicEvent event) {
final MagicPlayer player = event.getPlayer();
final List<MagicPermanent> zombies =
game.filterPermanents(player,MagicTargetFilter.TARGET_ZOMBIE);
for (final MagicPermanent target : zombies) {
game.doAction(new MagicRemoveFromPlayAction(
target,
MagicLocationType.Exile
));
2013-06-23 18:29:26 -07:00
}
2013-05-26 22:24:58 -07:00
final List<MagicCard> humans =
game.filterCards(player,MagicTargetFilter.TARGET_HUMAN_CARD_FROM_GRAVEYARD);
for (final MagicCard target : humans) {
game.doAction(new MagicReanimateAction(
target,
2013-07-10 05:01:39 -07:00
player
2013-05-26 22:24:58 -07:00
));
}
}
}
]