From aff66014d5464d90693456e5253711a0f2a1791b Mon Sep 17 00:00:00 2001 From: ShawnieBoy Date: Sat, 4 Jan 2014 01:03:42 +0000 Subject: [PATCH] New Card Scripts + Groovy --- release/Magarena/scripts/AEtherize.groovy | 20 +++++++++++ release/Magarena/scripts/AEtherize.txt | 9 +++++ .../Magarena/scripts/Aerial_Maneuver.groovy | 23 +++++++++++++ release/Magarena/scripts/Aerial_Maneuver.txt | 9 +++++ .../Magarena/scripts/Aerial_Predation.groovy | 23 +++++++++++++ release/Magarena/scripts/Aerial_Predation.txt | 9 +++++ .../Magarena/scripts/Akroma_s_Blessing.groovy | 24 +++++++++++++ .../Magarena/scripts/Akroma_s_Blessing.txt | 10 ++++++ release/Magarena/scripts/Altar_s_Reap.txt | 10 ++++++ release/Magarena/scripts/Ambush.groovy | 20 +++++++++++ release/Magarena/scripts/Ambush.txt | 9 +++++ release/Magarena/scripts/Animate_Land.groovy | 34 +++++++++++++++++++ release/Magarena/scripts/Animate_Land.txt | 9 +++++ .../Magarena/scripts/Argent_Mutation.groovy | 29 ++++++++++++++++ release/Magarena/scripts/Argent_Mutation.txt | 9 +++++ .../Magarena/scripts/Armed_Response.groovy | 28 +++++++++++++++ release/Magarena/scripts/Armed_Response.txt | 9 +++++ .../Magarena/scripts/Aura_Extraction.groovy | 25 ++++++++++++++ release/Magarena/scripts/Aura_Extraction.txt | 10 ++++++ 19 files changed, 319 insertions(+) create mode 100644 release/Magarena/scripts/AEtherize.groovy create mode 100644 release/Magarena/scripts/AEtherize.txt create mode 100644 release/Magarena/scripts/Aerial_Maneuver.groovy create mode 100644 release/Magarena/scripts/Aerial_Maneuver.txt create mode 100644 release/Magarena/scripts/Aerial_Predation.groovy create mode 100644 release/Magarena/scripts/Aerial_Predation.txt create mode 100644 release/Magarena/scripts/Akroma_s_Blessing.groovy create mode 100644 release/Magarena/scripts/Akroma_s_Blessing.txt create mode 100644 release/Magarena/scripts/Altar_s_Reap.txt create mode 100644 release/Magarena/scripts/Ambush.groovy create mode 100644 release/Magarena/scripts/Ambush.txt create mode 100644 release/Magarena/scripts/Animate_Land.groovy create mode 100644 release/Magarena/scripts/Animate_Land.txt create mode 100644 release/Magarena/scripts/Argent_Mutation.groovy create mode 100644 release/Magarena/scripts/Argent_Mutation.txt create mode 100644 release/Magarena/scripts/Armed_Response.groovy create mode 100644 release/Magarena/scripts/Armed_Response.txt create mode 100644 release/Magarena/scripts/Aura_Extraction.groovy create mode 100644 release/Magarena/scripts/Aura_Extraction.txt diff --git a/release/Magarena/scripts/AEtherize.groovy b/release/Magarena/scripts/AEtherize.groovy new file mode 100644 index 0000000000..7fd93c9d0c --- /dev/null +++ b/release/Magarena/scripts/AEtherize.groovy @@ -0,0 +1,20 @@ +[ + new MagicSpellCardEvent() { + @Override + public MagicEvent getEvent(final MagicCardOnStack cardOnStack,final MagicPayedCost payedCost) { + return new MagicEvent( + cardOnStack, + this, + "Return all attacking creatures to their owners' hands." + ); + } + @Override + public void executeEvent(final MagicGame game, final MagicEvent event) { + final Collection targets= + game.filterPermanents(event.getPlayer(),MagicTargetFilter.TARGET_ATTACKING_CREATURE); + for (final MagicPermanent target : targets) { + game.doAction(new MagicRemoveFromPlayAction(target,MagicLocationType.OwnersHand)); + } + } + } +] diff --git a/release/Magarena/scripts/AEtherize.txt b/release/Magarena/scripts/AEtherize.txt new file mode 100644 index 0000000000..ce7e504f7d --- /dev/null +++ b/release/Magarena/scripts/AEtherize.txt @@ -0,0 +1,9 @@ +name=Aetherize +url=http://magiccards.info/gtc/en/29.html +image=http://mtgimage.com/card/aetherize.jpg +value=3.711 +rarity=U +type=Instant +cost={3}{U} +timing=removal +requires_groovy_code diff --git a/release/Magarena/scripts/Aerial_Maneuver.groovy b/release/Magarena/scripts/Aerial_Maneuver.groovy new file mode 100644 index 0000000000..545b51fe2b --- /dev/null +++ b/release/Magarena/scripts/Aerial_Maneuver.groovy @@ -0,0 +1,23 @@ +[ + new MagicSpellCardEvent() { + @Override + public MagicEvent getEvent(final MagicCardOnStack cardOnStack, final MagicPayedCost payedCost) { + return new MagicEvent( + cardOnStack, + MagicTargetChoice.POS_TARGET_CREATURE, + MagicPumpTargetPicker.create(), + this, + "Target creature\$ gets +1/+1 and gains flying and first strike until end of turn." + ); + } + @Override + public void executeEvent(final MagicGame game, final MagicEvent event) { + event.processTargetPermanent(game, { + final MagicPermanent creature -> + game.doAction(new MagicGainAbilityAction(creature, MagicAbility.Flying)); + game.doAction(new MagicGainAbilityAction(creature, MagicAbility.FirstStrike)); + game.doAction(new MagicChangeTurnPTAction(creature, 1, 1)); + }); + } + } +] diff --git a/release/Magarena/scripts/Aerial_Maneuver.txt b/release/Magarena/scripts/Aerial_Maneuver.txt new file mode 100644 index 0000000000..a1def5d13d --- /dev/null +++ b/release/Magarena/scripts/Aerial_Maneuver.txt @@ -0,0 +1,9 @@ +name=Aerial Maneuver +url=http://magiccards.info/gtc/en/1.html +image=http://mtgimage.com/card/aerial%20maneuver.jpg +value=2.6 +rarity=C +type=Instant +cost={1}{W} +timing=pump +requires_groovy_code diff --git a/release/Magarena/scripts/Aerial_Predation.groovy b/release/Magarena/scripts/Aerial_Predation.groovy new file mode 100644 index 0000000000..f3f88d8d85 --- /dev/null +++ b/release/Magarena/scripts/Aerial_Predation.groovy @@ -0,0 +1,23 @@ +[ + new MagicSpellCardEvent() { + @Override + public MagicEvent getEvent(final MagicCardOnStack cardOnStack, final MagicPayedCost payedCost) { + return new MagicEvent( + cardOnStack, + MagicTargetChoice.NEG_TARGET_CREATURE_WITH_FLYING, + MagicDestroyTargetPicker.Destroy, + this, + "Destroy target creature\$ with flying. " + + "PN gains 2 life." + ); + } + @Override + public void executeEvent(final MagicGame game, final MagicEvent event) { + event.processTargetPermanent(game, { + final MagicPermanent creature -> + game.doAction(new MagicDestroyAction(creature)); + game.doAction(new MagicChangeLifeAction(event.getPlayer(),2)); + }); + } + } +] diff --git a/release/Magarena/scripts/Aerial_Predation.txt b/release/Magarena/scripts/Aerial_Predation.txt new file mode 100644 index 0000000000..ccd9f9c009 --- /dev/null +++ b/release/Magarena/scripts/Aerial_Predation.txt @@ -0,0 +1,9 @@ +name=Aerial Predation +url=http://magiccards.info/rtr/en/113.html +image=http://mtgimage.com/card/aerial%20predation.jpg +value=1.942 +rarity=C +type=Instant +cost={2}{G} +timing=removal +requires_groovy_code diff --git a/release/Magarena/scripts/Akroma_s_Blessing.groovy b/release/Magarena/scripts/Akroma_s_Blessing.groovy new file mode 100644 index 0000000000..0f20489990 --- /dev/null +++ b/release/Magarena/scripts/Akroma_s_Blessing.groovy @@ -0,0 +1,24 @@ +[ + new MagicSpellCardEvent() { + @Override + public MagicEvent getEvent(final MagicCardOnStack cardOnStack, final MagicPayedCost payedCost) { + return new MagicEvent( + cardOnStack, + MagicColorChoice.ALL_INSTANCE, + this, + "Choose a color\$. " + + "Creatures PN controls have protection from the chosen color until end of turn." + ); + } + @Override + public void executeEvent(final MagicGame game, final MagicEvent event) { + final MagicColor color = event.getChosenColor(); + final MagicAbility protection = color.getProtectionAbility(); + final Collection targets = + game.filterPermanents(event.getPlayer(),MagicTargetFilter.TARGET_CREATURE_YOU_CONTROL); + for (final MagicPermanent target : targets) { + game.doAction(new MagicGainAbilityAction(target, protection)); + } + } + } +] diff --git a/release/Magarena/scripts/Akroma_s_Blessing.txt b/release/Magarena/scripts/Akroma_s_Blessing.txt new file mode 100644 index 0000000000..ba8e6f33d7 --- /dev/null +++ b/release/Magarena/scripts/Akroma_s_Blessing.txt @@ -0,0 +1,10 @@ +name=Akroma's Blessing +url=http://magiccards.info/on/en/1.html +image=http://mtgimage.com/card/akroma's%20blessing.jpg +value=3.766 +rarity=U +type=Instant +cost={2}{W} +ability=cycling {W} +timing=pump +requires_groovy_code diff --git a/release/Magarena/scripts/Altar_s_Reap.txt b/release/Magarena/scripts/Altar_s_Reap.txt new file mode 100644 index 0000000000..c1e86d6ea9 --- /dev/null +++ b/release/Magarena/scripts/Altar_s_Reap.txt @@ -0,0 +1,10 @@ +name=Altar's Reap +url=http://magiccards.info/m14/en/84.html +image=http://mtgimage.com/card/altar's%20reap.jpg +value=3.675 +rarity=C +type=Instant +cost={1}{B} +effect=PN draws two cards. +timing=draw +requires_groovy_code=Bone Splinters diff --git a/release/Magarena/scripts/Ambush.groovy b/release/Magarena/scripts/Ambush.groovy new file mode 100644 index 0000000000..f62c0d2d21 --- /dev/null +++ b/release/Magarena/scripts/Ambush.groovy @@ -0,0 +1,20 @@ +[ + new MagicSpellCardEvent() { + @Override + public MagicEvent getEvent(final MagicCardOnStack cardOnStack,final MagicPayedCost payedCost) { + return new MagicEvent( + cardOnStack, + this, + "Blocking creatures gain first strike until end of turn." + ); + } + @Override + public void executeEvent(final MagicGame game, final MagicEvent event) { + final Collection targets= + game.filterPermanents(event.getPlayer(),MagicTargetFilter.TARGET_BLOCKING_CREATURE); + for (final MagicPermanent target : targets) { + game.doAction(new MagicGainAbilityAction(target, MagicAbility.FirstStrike)); + } + } + } +] diff --git a/release/Magarena/scripts/Ambush.txt b/release/Magarena/scripts/Ambush.txt new file mode 100644 index 0000000000..deb717c7fa --- /dev/null +++ b/release/Magarena/scripts/Ambush.txt @@ -0,0 +1,9 @@ +name=Ambush +url=http://magiccards.info/hl/en/78.html +image=http://mtgimage.com/card/ambush.jpg +value=1.817 +rarity=C +type=Instant +cost={3}{R} +timing=pump +requires_groovy_code diff --git a/release/Magarena/scripts/Animate_Land.groovy b/release/Magarena/scripts/Animate_Land.groovy new file mode 100644 index 0000000000..9a541955a3 --- /dev/null +++ b/release/Magarena/scripts/Animate_Land.groovy @@ -0,0 +1,34 @@ +def PT = new MagicStatic(MagicLayer.SetPT, MagicStatic.UntilEOT) { + @Override + public void modPowerToughness(final MagicPermanent source,final MagicPermanent permanent,final MagicPowerToughness pt) { + pt.set(3,3); + } +}; +def ST = new MagicStatic(MagicLayer.Type, MagicStatic.UntilEOT) { + @Override + public int getTypeFlags(final MagicPermanent permanent,final int flags) { + return flags|MagicType.Creature.getMask(); + } +}; +[ + new MagicSpellCardEvent() { + + @Override + public MagicEvent getEvent(final MagicCardOnStack cardOnStack, final MagicPayedCost payedCost) { + return new MagicEvent( + cardOnStack, + MagicTargetChoice.POS_TARGET_LAND, + this, + "Target land\$ becomes a 3/3 creature until end of turn." + ); + } + + @Override + public void executeEvent(final MagicGame game, final MagicEvent event) { + event.processTargetPermanent(game, { + final MagicPermanent land -> + game.doAction(new MagicBecomesCreatureAction(land,PT,ST)); + }); + } + } +] diff --git a/release/Magarena/scripts/Animate_Land.txt b/release/Magarena/scripts/Animate_Land.txt new file mode 100644 index 0000000000..9edd32cf45 --- /dev/null +++ b/release/Magarena/scripts/Animate_Land.txt @@ -0,0 +1,9 @@ +name=Animate Land +url=http://magiccards.info/ne/en/101.html +image=http://mtgimage.com/card/animate%20land.jpg +value=3.961 +rarity=U +type=Instant +cost={G} +timing=pump +requires_groovy_code diff --git a/release/Magarena/scripts/Argent_Mutation.groovy b/release/Magarena/scripts/Argent_Mutation.groovy new file mode 100644 index 0000000000..282b7f98e5 --- /dev/null +++ b/release/Magarena/scripts/Argent_Mutation.groovy @@ -0,0 +1,29 @@ +def ST = new MagicStatic(MagicLayer.Type, MagicStatic.UntilEOT) { + @Override + public int getTypeFlags(final MagicPermanent permanent,final int flags) { + return flags|MagicType.Artifact.getMask(); + } +}; + +[ + new MagicSpellCardEvent() { + @Override + public MagicEvent getEvent(final MagicCardOnStack cardOnStack, final MagicPayedCost payedCost) { + return new MagicEvent( + cardOnStack, + MagicTargetChoice.TARGET_PERMANENT, + this, + "Target permanent\$ becomes an artifact in addition to its other types until end of turn. " + + "PN draws a card." + ); + } + @Override + public void executeEvent(final MagicGame game, final MagicEvent event) { + event.processTargetPermanent(game, { + final MagicPermanent land -> + game.doAction(new MagicAddStaticAction(land, ST)); + game.doAction(new MagicDrawAction(event.getPlayer())); + }); + } + } +] diff --git a/release/Magarena/scripts/Argent_Mutation.txt b/release/Magarena/scripts/Argent_Mutation.txt new file mode 100644 index 0000000000..d6df9f77e9 --- /dev/null +++ b/release/Magarena/scripts/Argent_Mutation.txt @@ -0,0 +1,9 @@ +name=Argent Mutation +url=http://magiccards.info/nph/en/27.html +image=http://mtgimage.com/card/argent%20mutation.jpg +value=1.766 +rarity=U +type=Instant +cost={2}{U} +timing=pump +requires_groovy_code diff --git a/release/Magarena/scripts/Armed_Response.groovy b/release/Magarena/scripts/Armed_Response.groovy new file mode 100644 index 0000000000..f72ddf6834 --- /dev/null +++ b/release/Magarena/scripts/Armed_Response.groovy @@ -0,0 +1,28 @@ +[ + new MagicSpellCardEvent() { + @Override + public MagicEvent getEvent(final MagicCardOnStack cardOnStack,final MagicPayedCost payedCost) { + return new MagicEvent( + cardOnStack, + MagicTargetChoice.NEG_TARGET_ATTACKING_CREATURE, + this, + "SN deals damage to target attacking creature\$ equal to the" + + "number of Equipment PN controls." + ); + } + @Override + public void executeEvent(final MagicGame game, final MagicEvent event) { + final MagicPlayer player = event.getPlayer(); + final int amount = player.getNrOfPermanents(MagicSubType.Equipment); + event.processTargetPermanent(game, { + final MagicPermanent creature -> + final MagicDamage damage = new MagicDamage( + event.getSource(), + creature, + amount + ); + game.doAction(new MagicDealDamageAction(damage)); + }); + } + } +] diff --git a/release/Magarena/scripts/Armed_Response.txt b/release/Magarena/scripts/Armed_Response.txt new file mode 100644 index 0000000000..a79041098b --- /dev/null +++ b/release/Magarena/scripts/Armed_Response.txt @@ -0,0 +1,9 @@ +name=Armed Response +url=http://magiccards.info/5dn/en/2.html +image=http://mtgimage.com/card/armed%20response.jpg +value=1.597 +rarity=C +type=Instant +cost={2}{W} +timing=removal +requires_groovy_code diff --git a/release/Magarena/scripts/Aura_Extraction.groovy b/release/Magarena/scripts/Aura_Extraction.groovy new file mode 100644 index 0000000000..dde53ebb8d --- /dev/null +++ b/release/Magarena/scripts/Aura_Extraction.groovy @@ -0,0 +1,25 @@ +[ + new MagicSpellCardEvent() { + @Override + public MagicEvent getEvent(final MagicCardOnStack cardOnStack,final MagicPayedCost payedCost) { + return new MagicEvent( + cardOnStack, + MagicTargetChoice.TARGET_ENCHANTMENT, + MagicBounceTargetPicker.create(), + this, + "Put target enchantment\$ on top of its owner's library." + ); + } + + @Override + public void executeEvent(final MagicGame game, final MagicEvent event) { + event.processTargetPermanent(game, { + final MagicPermanent enchantment -> + game.doAction(new MagicRemoveFromPlayAction( + enchantment, + MagicLocationType.TopOfOwnersLibrary + )); + }); + } + } +] diff --git a/release/Magarena/scripts/Aura_Extraction.txt b/release/Magarena/scripts/Aura_Extraction.txt new file mode 100644 index 0000000000..43fa9e2edd --- /dev/null +++ b/release/Magarena/scripts/Aura_Extraction.txt @@ -0,0 +1,10 @@ +name=Aura Extraction +url=http://magiccards.info/on/en/5.html +image=http://mtgimage.com/card/aura%20extraction.jpg +value=2.312 +rarity=U +type=Instant +cost={1}{W} +ability=cycling {2} +timing=removal +requires_groovy_code