Add script for All Is Dust

master
Jericho Pumpkin 2013-10-10 15:40:07 +00:00
parent 74a07149a7
commit 9df564ae4c
2 changed files with 42 additions and 0 deletions

View File

@ -0,0 +1,32 @@
def COLORED_PERMANENT = new MagicPermanentFilterImpl() {
public boolean accept(final MagicGame game,final MagicPlayer player,final MagicPermanent target) {
return (target.hasColor(MagicColor.Black)
|| target.hasColor(MagicColor.Red)
|| target.hasColor(MagicColor.White)
|| target.hasColor(MagicColor.Green)
|| target.hasColor(MagicColor.Blue));
}
};
[
new MagicSpellCardEvent() {
@Override
public MagicEvent getEvent(final MagicCardOnStack cardOnStack, final MagicPayedCost payedCost) {
return new MagicEvent(
cardOnStack,
this,
"Each player sacrifices all colored permanents."
);
}
@Override
public void executeEvent(final MagicGame game, final MagicEvent event) {
for (final MagicPlayer player : game.getPlayers()) {
final Collection<MagicPermanent> targets =
game.filterPermanents(player, COLORED_PERMANENT);
for (final MagicPermanent target : targets) {
game.doAction(new MagicSacrificeAction(target));
}
}
}
}
]

View File

@ -0,0 +1,10 @@
name=All Is Dust
url=http://magiccards.info/roe/en/1.html
image=http://magiccards.info/scans/en/roe/1.jpg
value=4.477
rarity=M
cost={7}
type=Tribal,Sorcery
subtype=Eldrazi
timing=main
requires_groovy_code