From d2c671423a2182d144aa4ec53cbec363a9b21153 Mon Sep 17 00:00:00 2001 From: Jericho Pumpkin Date: Fri, 15 Nov 2013 19:15:04 +0000 Subject: [PATCH] Add script for Culling Sun --- release/Magarena/scripts/Culling_Sun.groovy | 24 +++++++++++++++++++++ release/Magarena/scripts/Culling_Sun.txt | 9 ++++++++ 2 files changed, 33 insertions(+) create mode 100644 release/Magarena/scripts/Culling_Sun.groovy create mode 100644 release/Magarena/scripts/Culling_Sun.txt diff --git a/release/Magarena/scripts/Culling_Sun.groovy b/release/Magarena/scripts/Culling_Sun.groovy new file mode 100644 index 0000000000..082018d64c --- /dev/null +++ b/release/Magarena/scripts/Culling_Sun.groovy @@ -0,0 +1,24 @@ +def TARGET_CREATURE_CMC_LEQ_3 = new MagicTargetFilter.MagicCMCPermanentFilter( + MagicTargetFilter.TARGET_CREATURE, + MagicTargetFilter.Operator.LESS_THAN_OR_EQUAL, + 3 +); +[ + new MagicSpellCardEvent() { + @Override + public MagicEvent getEvent(final MagicCardOnStack cardOnStack, final MagicPayedCost payedCost) { + return new MagicEvent( + cardOnStack, + this, + "Destroy each creature with converted mana cost 3 or less." + ); + } + + @Override + public void executeEvent(final MagicGame game, final MagicEvent event) { + final Collection targets = + game.filterPermanents(event.getPlayer(),TARGET_CREATURE_CMC_LEQ_3); + game.doAction(new MagicDestroyAction(targets)); + } + } +] diff --git a/release/Magarena/scripts/Culling_Sun.txt b/release/Magarena/scripts/Culling_Sun.txt new file mode 100644 index 0000000000..63b801a1bf --- /dev/null +++ b/release/Magarena/scripts/Culling_Sun.txt @@ -0,0 +1,9 @@ +name=Culling Sun +url=http://magiccards.info/gp/en/109.html +image=http://magiccards.info/scans/en/gp/109.jpg +value=3.358 +rarity=R +type=Sorcery +cost={2}{W}{W}{B} +timing=main +requires_groovy_code \ No newline at end of file