convert from java code to groovy code

master
melvin 2013-05-26 20:08:46 +08:00
parent 9f4faab1f7
commit 2b5f519d25
2 changed files with 9 additions and 25 deletions

View File

@ -1,16 +1,5 @@
package magic.card;
import magic.data.TokenCardDefinitions;
import magic.model.MagicGame;
import magic.model.MagicPermanent;
import magic.model.MagicPlayer;
import magic.model.action.MagicPlayTokensAction;
import magic.model.event.MagicEvent;
import magic.model.trigger.MagicWhenAttacksTrigger;
import magic.model.trigger.MagicWhenComesIntoPlayTrigger;
public class Grave_Titan {
public static final MagicWhenComesIntoPlayTrigger T = new MagicWhenComesIntoPlayTrigger() {
[
new MagicWhenComesIntoPlayTrigger() {
@Override
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicPlayer player) {
return new MagicEvent(
@ -20,18 +9,15 @@ public class Grave_Titan {
);
}
@Override
public void executeEvent(
final MagicGame game,
final MagicEvent event) {
public void executeEvent(final MagicGame game, final MagicEvent event) {
game.doAction(new MagicPlayTokensAction(
event.getPlayer(),
TokenCardDefinitions.get("Zombie"),
2
));
}
};
public static final MagicWhenAttacksTrigger T2 = new MagicWhenAttacksTrigger() {
},
new MagicWhenAttacksTrigger() {
@Override
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicPermanent creature) {
return (permanent==creature) ?
@ -43,14 +29,12 @@ public class Grave_Titan {
MagicEvent.NONE;
}
@Override
public void executeEvent(
final MagicGame game,
final MagicEvent event) {
public void executeEvent(final MagicGame game, final MagicEvent event) {
game.doAction(new MagicPlayTokensAction(
event.getPlayer(),
TokenCardDefinitions.get("Zombie"),
2
));
}
};
}
}
]

View File

@ -9,4 +9,4 @@ cost={4}{B}{B}
pt=6/6
ability=deathtouch
timing=fmain
requires_card_code
requires_groovy_code