From 2819fd60763e4be407b23e417d553ad4cc65561e Mon Sep 17 00:00:00 2001 From: melvin Date: Sun, 26 May 2013 11:21:49 +0800 Subject: [PATCH] convert from java code to groovy code --- .../Magarena/scripts/Necropede.groovy | 27 ++++--------------- release/Magarena/scripts/Necropede.txt | 2 +- 2 files changed, 6 insertions(+), 23 deletions(-) rename src/magic/card/Necropede.java => release/Magarena/scripts/Necropede.groovy (56%) diff --git a/src/magic/card/Necropede.java b/release/Magarena/scripts/Necropede.groovy similarity index 56% rename from src/magic/card/Necropede.java rename to release/Magarena/scripts/Necropede.groovy index f9446f24ad..90d135d3c5 100644 --- a/src/magic/card/Necropede.java +++ b/release/Magarena/scripts/Necropede.groovy @@ -1,20 +1,5 @@ -package magic.card; - -import magic.model.MagicCounterType; -import magic.model.MagicGame; -import magic.model.MagicLocationType; -import magic.model.MagicPermanent; -import magic.model.action.MagicChangeCountersAction; -import magic.model.action.MagicPermanentAction; -import magic.model.choice.MagicMayChoice; -import magic.model.choice.MagicTargetChoice; -import magic.model.event.MagicEvent; -import magic.model.target.MagicWeakenTargetPicker; -import magic.model.trigger.MagicGraveyardTriggerData; -import magic.model.trigger.MagicWhenPutIntoGraveyardTrigger; - -public class Necropede { - public static final MagicWhenPutIntoGraveyardTrigger T = new MagicWhenPutIntoGraveyardTrigger() { +[ + new MagicWhenPutIntoGraveyardTrigger() { @Override public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicGraveyardTriggerData triggerData) { return (triggerData.fromLocation == MagicLocationType.Play) ? @@ -31,9 +16,7 @@ public class Necropede { } @Override - public void executeEvent( - final MagicGame game, - final MagicEvent event) { + public void executeEvent(final MagicGame game, final MagicEvent event) { if (event.isYes()) { event.processTargetPermanent(game,new MagicPermanentAction() { public void doAction(final MagicPermanent creature) { @@ -42,5 +25,5 @@ public class Necropede { }); } } - }; -} + } +] diff --git a/release/Magarena/scripts/Necropede.txt b/release/Magarena/scripts/Necropede.txt index 6c622c4c6b..ce3c569557 100644 --- a/release/Magarena/scripts/Necropede.txt +++ b/release/Magarena/scripts/Necropede.txt @@ -9,4 +9,4 @@ cost={2} pt=1/1 ability=infect timing=main -requires_card_code +requires_groovy_code