26 lines
1.0 KiB
Groovy
26 lines
1.0 KiB
Groovy
|
[
|
||
|
new MagicSpellCardEvent() {
|
||
|
@Override
|
||
|
public MagicEvent getEvent(final MagicCardOnStack cardOnStack,final MagicPayedCost payedCost) {
|
||
|
return new MagicEvent(
|
||
|
cardOnStack,
|
||
|
this,
|
||
|
"Exile all permanents. PN discards his or her hand."
|
||
|
);
|
||
|
}
|
||
|
@Override
|
||
|
public void executeEvent(final MagicGame game, final MagicEvent event) {
|
||
|
final Collection<MagicPermanent> targets =
|
||
|
game.filterPermanents(event.getPlayer(),MagicTargetFilter.TARGET_PERMANENT);
|
||
|
for (final MagicPermanent target : targets) {
|
||
|
game.doAction(new MagicRemoveFromPlayAction(target,MagicLocationType.Exile));
|
||
|
}
|
||
|
final MagicPlayer player = event.getPlayer();
|
||
|
final MagicCardList hand = new MagicCardList(player.getHand());
|
||
|
for (final MagicCard card : hand) {
|
||
|
game.doAction(new MagicDiscardCardAction(player,card));
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
]
|