magarena/release/Magarena/scripts/Terminus.groovy

21 lines
797 B
Groovy
Raw Normal View History

2013-04-01 06:43:08 -07:00
[
new MagicSpellCardEvent() {
@Override
public MagicEvent getEvent(final MagicCardOnStack cardOnStack,final MagicPayedCost payedCost) {
return new MagicEvent(
cardOnStack,
this,
"Put all creatures on the bottom of their owners' libraries."
);
}
@Override
2013-06-15 03:20:38 -07:00
public void executeEvent(final MagicGame game, final MagicEvent event) {
2013-06-23 18:29:26 -07:00
final Collection<MagicPermanent> targets =
2013-04-01 06:43:08 -07:00
game.filterPermanents(event.getPlayer(),MagicTargetFilter.TARGET_CREATURE);
for (final MagicPermanent permanent : targets) {
game.doAction(new MagicRemoveFromPlayAction(permanent,MagicLocationType.BottomOfOwnersLibrary));
}
}
}
]