convert from java code to groovy code

master
melvin 2013-05-19 09:19:39 +08:00
parent 4f8dcaae6c
commit c6c4c23df4
2 changed files with 6 additions and 19 deletions

View File

@ -1,18 +1,5 @@
package magic.card;
import magic.data.TokenCardDefinitions;
import magic.model.MagicGame;
import magic.model.MagicManaCost;
import magic.model.MagicPermanent;
import magic.model.action.MagicPlayTokenAction;
import magic.model.choice.MagicMayChoice;
import magic.model.choice.MagicPayManaCostChoice;
import magic.model.event.MagicEvent;
import magic.model.stack.MagicCardOnStack;
import magic.model.trigger.MagicWhenOtherSpellIsCastTrigger;
public class Myrsmith {
public static final MagicWhenOtherSpellIsCastTrigger T = new MagicWhenOtherSpellIsCastTrigger() {
[
new MagicWhenOtherSpellIsCastTrigger() {
@Override
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicCardOnStack spell) {
return (permanent.isFriend(spell) &&
@ -23,7 +10,7 @@ public class Myrsmith {
new MagicPayManaCostChoice(MagicManaCost.create("{1}"))
),
this,
"PN may$ pay {1}$. If you do, put a 1/1 " +
"PN may\$ pay {1}\$. If you do, put a 1/1 " +
"colorless Myr artifact creature token onto the battlefield."
) :
MagicEvent.NONE;
@ -35,5 +22,5 @@ public class Myrsmith {
game.doAction(new MagicPlayTokenAction(event.getPlayer(),TokenCardDefinitions.get("Myr1")));
}
}
};
}
}
]

View File

@ -8,4 +8,4 @@ subtype=Human,Artificer
cost={1}{W}
pt=2/1
timing=fmain
requires_card_code
requires_groovy_code