convert from java code to groovy code

master
melvin 2013-03-13 22:16:10 +08:00
parent cd75692d42
commit 3321cb0f1d
3 changed files with 24 additions and 31 deletions

View File

@ -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
));
}
}
]

View File

@ -8,4 +8,4 @@ subtype=Plant
cost={2}{G}
pt=2/3
timing=main
requires_card_code
requires_groovy_code

View File

@ -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));
}
};
}