convert from java code to groovy code

master
melvin 2013-04-03 16:05:13 +08:00
parent eb0c0cca95
commit b6495e4b53
2 changed files with 9 additions and 16 deletions

View File

@ -1,14 +1,5 @@
package magic.card;
import magic.model.MagicGame;
import magic.model.MagicPermanent;
import magic.model.action.MagicChangeLifeAction;
import magic.model.choice.MagicSimpleMayChoice;
import magic.model.event.MagicEvent;
import magic.model.trigger.MagicWhenOtherComesIntoPlayTrigger;
public class Soul_s_Attendant {
public static final MagicWhenOtherComesIntoPlayTrigger T = new MagicWhenOtherComesIntoPlayTrigger() {
[
new MagicWhenOtherComesIntoPlayTrigger() {
@Override
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicPermanent otherPermanent) {
return (otherPermanent != permanent && otherPermanent.isCreature()) ?
@ -17,9 +8,11 @@ public class Soul_s_Attendant {
new MagicSimpleMayChoice(
MagicSimpleMayChoice.GAIN_LIFE,
1,
MagicSimpleMayChoice.DEFAULT_YES),
MagicSimpleMayChoice.DEFAULT_YES
),
this,
"PN may$ gain 1 life.") :
"PN may$ gain 1 life."
):
MagicEvent.NONE;
}
@ -31,5 +24,5 @@ public class Soul_s_Attendant {
game.doAction(new MagicChangeLifeAction(event.getPlayer(),1));
}
}
};
}
}
]

View File

@ -8,4 +8,4 @@ subtype=Human,Cleric
cost={W}
pt=1/1
timing=main
requires_card_code
requires_groovy_code