convert from java code to groovy code
parent
cd75692d42
commit
3321cb0f1d
|
@ -0,0 +1,23 @@
|
|||
[
|
||||
new MagicLandfallTrigger() {
|
||||
@Override
|
||||
public MagicEvent getEvent(final MagicPermanent permanent) {
|
||||
return new MagicEvent(
|
||||
permanent,
|
||||
this,
|
||||
"SN gains vigilance until end of turn."
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void executeEvent(
|
||||
final MagicGame game,
|
||||
final MagicEvent event,
|
||||
final Object[] choiceResults) {
|
||||
game.doAction(new MagicSetAbilityAction(
|
||||
event.getPermanent(),
|
||||
MagicAbility.Vigilance
|
||||
));
|
||||
}
|
||||
}
|
||||
]
|
|
@ -8,4 +8,4 @@ subtype=Plant
|
|||
cost={2}{G}
|
||||
pt=2/3
|
||||
timing=main
|
||||
requires_card_code
|
||||
requires_groovy_code
|
||||
|
|
|
@ -1,30 +0,0 @@
|
|||
package magic.card;
|
||||
|
||||
import magic.model.MagicAbility;
|
||||
import magic.model.MagicGame;
|
||||
import magic.model.MagicPermanent;
|
||||
import magic.model.action.MagicSetAbilityAction;
|
||||
import magic.model.event.MagicEvent;
|
||||
import magic.model.trigger.MagicLandfallTrigger;
|
||||
|
||||
public class Snapping_Creeper {
|
||||
public static final MagicLandfallTrigger T = new MagicLandfallTrigger() {
|
||||
@Override
|
||||
public MagicEvent getEvent(final MagicPermanent permanent) {
|
||||
return new MagicEvent(
|
||||
permanent,
|
||||
this,
|
||||
"SN gains vigilance until end of turn.");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void executeEvent(
|
||||
final MagicGame game,
|
||||
final MagicEvent event,
|
||||
final Object[] choiceResults) {
|
||||
game.doAction(new MagicSetAbilityAction(
|
||||
event.getPermanent(),
|
||||
MagicAbility.Vigilance));
|
||||
}
|
||||
};
|
||||
}
|
Loading…
Reference in New Issue