From a658c561b899078c9b426d95423a55ee240b7973 Mon Sep 17 00:00:00 2001 From: melvin Date: Mon, 1 Apr 2013 21:23:31 +0800 Subject: [PATCH] convert from java code to groovy code --- .../Magarena/scripts/Arcbound_Crusher.groovy | 27 +++++++++++++++ release/Magarena/scripts/Arcbound_Crusher.txt | 2 +- src/magic/card/Arcbound_Crusher.java | 34 ------------------- 3 files changed, 28 insertions(+), 35 deletions(-) create mode 100644 release/Magarena/scripts/Arcbound_Crusher.groovy delete mode 100644 src/magic/card/Arcbound_Crusher.java diff --git a/release/Magarena/scripts/Arcbound_Crusher.groovy b/release/Magarena/scripts/Arcbound_Crusher.groovy new file mode 100644 index 0000000000..c231b3011c --- /dev/null +++ b/release/Magarena/scripts/Arcbound_Crusher.groovy @@ -0,0 +1,27 @@ +[ + new MagicWhenOtherComesIntoPlayTrigger() { + @Override + public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicPermanent otherPermanent) { + return (otherPermanent != permanent && + otherPermanent.isArtifact()) ? + new MagicEvent( + permanent, + this, + "Put a +1/+1 counter on SN." + ): + MagicEvent.NONE; + } + + @Override + public void executeEvent( + final MagicGame game, + final MagicEvent event) { + game.doAction(new MagicChangeCountersAction( + event.getPermanent(), + MagicCounterType.PlusOne, + 1, + true + )); + } + } +] diff --git a/release/Magarena/scripts/Arcbound_Crusher.txt b/release/Magarena/scripts/Arcbound_Crusher.txt index 39d0340a61..a4736a8737 100644 --- a/release/Magarena/scripts/Arcbound_Crusher.txt +++ b/release/Magarena/scripts/Arcbound_Crusher.txt @@ -8,4 +8,4 @@ subtype=Juggernaut cost={4} ability=trample,modular 1 timing=fmain -requires_card_code +requires_groovy_code diff --git a/src/magic/card/Arcbound_Crusher.java b/src/magic/card/Arcbound_Crusher.java deleted file mode 100644 index be799ea858..0000000000 --- a/src/magic/card/Arcbound_Crusher.java +++ /dev/null @@ -1,34 +0,0 @@ -package magic.card; - -import magic.model.MagicCounterType; -import magic.model.MagicGame; -import magic.model.MagicPermanent; -import magic.model.action.MagicChangeCountersAction; -import magic.model.event.MagicEvent; -import magic.model.trigger.MagicWhenOtherComesIntoPlayTrigger; - -public class Arcbound_Crusher { - public static final MagicWhenOtherComesIntoPlayTrigger T3 = new MagicWhenOtherComesIntoPlayTrigger() { - @Override - public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicPermanent otherPermanent) { - return (otherPermanent != permanent && - otherPermanent.isArtifact()) ? - new MagicEvent( - permanent, - this, - "Put a +1/+1 counter on SN."): - MagicEvent.NONE; - } - - @Override - public void executeEvent( - final MagicGame game, - final MagicEvent event) { - game.doAction(new MagicChangeCountersAction( - event.getPermanent(), - MagicCounterType.PlusOne, - 1, - true)); - } - }; -}