convert from java code to groovy code
parent
40c20693cc
commit
81050e88ac
|
@ -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));
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
]
|
|
@ -6,4 +6,4 @@ rarity=U
|
|||
type=Artifact
|
||||
cost={2}
|
||||
timing=fmain
|
||||
requires_card_code
|
||||
requires_groovy_code
|
||||
|
|
Loading…
Reference in New Issue