convert from java code to groovy code
parent
4f8dcaae6c
commit
c6c4c23df4
|
@ -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")));
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
]
|
|
@ -8,4 +8,4 @@ subtype=Human,Artificer
|
|||
cost={1}{W}
|
||||
pt=2/1
|
||||
timing=fmain
|
||||
requires_card_code
|
||||
requires_groovy_code
|
||||
|
|
Loading…
Reference in New Issue