convert from java code to groovy code

master
melvin 2013-05-19 16:07:02 +08:00
parent 83923a1ff4
commit 1f3dbb526e
2 changed files with 8 additions and 21 deletions

View File

@ -1,16 +1,5 @@
package magic.card;
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.trigger.MagicWhenOtherComesIntoPlayTrigger;
public class Mirrorworks {
public static final MagicWhenOtherComesIntoPlayTrigger T = new MagicWhenOtherComesIntoPlayTrigger() {
[
new MagicWhenOtherComesIntoPlayTrigger() {
@Override
public MagicEvent executeTrigger(
final MagicGame game,
@ -26,16 +15,14 @@ public class Mirrorworks {
),
otherPermanent,
this,
"You may$ pay {2}$. If you do, put a token that's a " +
"copy of " + otherPermanent + " onto the battlefield."
"You may\$ pay {2}\$. If you do, put a token that's a " +
"copy of RN onto the battlefield."
):
MagicEvent.NONE;
}
@Override
public void executeEvent(
final MagicGame game,
final MagicEvent event) {
public void executeEvent(final MagicGame game, final MagicEvent event) {
if (event.isYes()) {
game.doAction(new MagicPlayTokenAction(
event.getPlayer(),
@ -43,5 +30,5 @@ public class Mirrorworks {
));
}
}
};
}
]

View File

@ -6,4 +6,4 @@ rarity=R
type=Artifact
cost={5}
timing=main
requires_card_code
requires_groovy_code