convert from java code to groovy code

master
melvin 2013-05-26 11:21:49 +08:00
parent 03c438bb2d
commit 2819fd6076
2 changed files with 6 additions and 23 deletions

View File

@ -1,20 +1,5 @@
package magic.card;
import magic.model.MagicCounterType;
import magic.model.MagicGame;
import magic.model.MagicLocationType;
import magic.model.MagicPermanent;
import magic.model.action.MagicChangeCountersAction;
import magic.model.action.MagicPermanentAction;
import magic.model.choice.MagicMayChoice;
import magic.model.choice.MagicTargetChoice;
import magic.model.event.MagicEvent;
import magic.model.target.MagicWeakenTargetPicker;
import magic.model.trigger.MagicGraveyardTriggerData;
import magic.model.trigger.MagicWhenPutIntoGraveyardTrigger;
public class Necropede {
public static final MagicWhenPutIntoGraveyardTrigger T = new MagicWhenPutIntoGraveyardTrigger() {
[
new MagicWhenPutIntoGraveyardTrigger() {
@Override
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicGraveyardTriggerData triggerData) {
return (triggerData.fromLocation == MagicLocationType.Play) ?
@ -31,9 +16,7 @@ public class Necropede {
}
@Override
public void executeEvent(
final MagicGame game,
final MagicEvent event) {
public void executeEvent(final MagicGame game, final MagicEvent event) {
if (event.isYes()) {
event.processTargetPermanent(game,new MagicPermanentAction() {
public void doAction(final MagicPermanent creature) {
@ -42,5 +25,5 @@ public class Necropede {
});
}
}
};
}
}
]

View File

@ -9,4 +9,4 @@ cost={2}
pt=1/1
ability=infect
timing=main
requires_card_code
requires_groovy_code