convert from java code to groovy code

master
melvin 2013-04-01 22:01:07 +08:00
parent 40c20693cc
commit 81050e88ac
2 changed files with 9 additions and 20 deletions

View File

@ -1,17 +1,5 @@
package magic.card;
import magic.model.MagicColor;
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.stack.MagicCardOnStack;
import magic.model.trigger.MagicWhenOtherSpellIsCastTrigger;
public class Kraken_s_Eye {
public static final MagicWhenOtherSpellIsCastTrigger T = new MagicWhenOtherSpellIsCastTrigger() {
[
new MagicWhenOtherSpellIsCastTrigger() {
@Override
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicCardOnStack cardOnStack) {
return cardOnStack.hasColor(MagicColor.Blue) ?
@ -20,17 +8,18 @@ public class Kraken_s_Eye {
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;
}
@Override
public void executeEvent(final MagicGame game, final MagicEvent event) {
if (event.isYes()) {
game.doAction(new MagicChangeLifeAction(event.getPlayer(),1));
}
}
};
}
}
]

View File

@ -6,4 +6,4 @@ rarity=U
type=Artifact
cost={2}
timing=fmain
requires_card_code
requires_groovy_code