2013-10-12 19:07:02 -07:00
|
|
|
def COLORED_PERMANENT = new MagicPermanentFilterImpl() {
|
2013-10-13 03:07:33 -07:00
|
|
|
public boolean accept(final MagicGame game,final MagicPlayer player,final MagicPermanent target) {
|
|
|
|
return MagicColor.isColorless(target) == false;
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2013-10-12 19:07:02 -07:00
|
|
|
[
|
|
|
|
new MagicSpellCardEvent() {
|
|
|
|
@Override
|
|
|
|
public MagicEvent getEvent(final MagicCardOnStack cardOnStack, final MagicPayedCost payedCost) {
|
|
|
|
return new MagicEvent(
|
|
|
|
cardOnStack,
|
|
|
|
this,
|
2013-10-13 03:07:33 -07:00
|
|
|
"Each player sacrifices all colored permanents he or she controls."
|
2013-10-12 19:07:02 -07:00
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void executeEvent(final MagicGame game, final MagicEvent event) {
|
2013-10-13 03:07:33 -07:00
|
|
|
for (final MagicPermanent target : game.filterPermanents(COLORED_PERMANENT)) {
|
|
|
|
game.doAction(new MagicSacrificeAction(target));
|
|
|
|
}
|
2013-10-12 19:07:02 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
]
|