22 lines
855 B
Groovy
22 lines
855 B
Groovy
|
[
|
||
|
new MagicSpellCardEvent() {
|
||
|
@Override
|
||
|
public MagicEvent getEvent(final MagicCardOnStack cardOnStack,final MagicPayedCost payedCost) {
|
||
|
return new MagicEvent(
|
||
|
cardOnStack,
|
||
|
this,
|
||
|
"Destroy all artifacts. They can't be regenerated."
|
||
|
);
|
||
|
}
|
||
|
@Override
|
||
|
public void executeEvent(final MagicGame game, final MagicEvent event) {
|
||
|
final Collection<MagicPermanent> targets =
|
||
|
game.filterPermanents(event.getPlayer(),MagicTargetFilter.TARGET_ARTIFACT);
|
||
|
for (final MagicPermanent target : targets) {
|
||
|
game.doAction(new MagicChangeStateAction(target,MagicPermanentState.CannotBeRegenerated,true));
|
||
|
}
|
||
|
game.doAction(new MagicDestroyAction(targets));
|
||
|
}
|
||
|
}
|
||
|
]
|