convert from java code to groovy code

master
melvin 2013-05-19 09:33:09 +08:00
parent 5f20961e06
commit 2d0babd1fb
2 changed files with 8 additions and 23 deletions

View File

@ -1,19 +1,5 @@
package magic.card; [
new MagicWhenComesIntoPlayTrigger() {
import magic.model.MagicGame;
import magic.model.MagicPermanent;
import magic.model.MagicPlayer;
import magic.model.action.MagicDestroyAction;
import magic.model.action.MagicPermanentAction;
import magic.model.choice.MagicMayChoice;
import magic.model.choice.MagicTargetChoice;
import magic.model.event.MagicEvent;
import magic.model.target.MagicDestroyTargetPicker;
import magic.model.trigger.MagicWhenComesIntoPlayTrigger;
public class Slayer_of_the_Wicked {
public static final MagicWhenComesIntoPlayTrigger T = new MagicWhenComesIntoPlayTrigger() {
@Override @Override
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent, final MagicPlayer player) { public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent, final MagicPlayer player) {
return new MagicEvent( return new MagicEvent(
@ -23,13 +9,12 @@ public class Slayer_of_the_Wicked {
), ),
new MagicDestroyTargetPicker(false), new MagicDestroyTargetPicker(false),
this, this,
"PN may$ destroy target Vampire, Werewolf, or Zombie$."); "PN may\$ destroy target Vampire, Werewolf, or Zombie\$."
);
} }
@Override @Override
public void executeEvent( public void executeEvent(final MagicGame game, final MagicEvent event) {
final MagicGame game,
final MagicEvent event) {
if (event.isYes()) { if (event.isYes()) {
event.processTargetPermanent(game,new MagicPermanentAction() { event.processTargetPermanent(game,new MagicPermanentAction() {
public void doAction(final MagicPermanent permanent) { public void doAction(final MagicPermanent permanent) {
@ -38,5 +23,5 @@ public class Slayer_of_the_Wicked {
}); });
} }
} }
}; }
} ]

View File

@ -8,4 +8,4 @@ subtype=Human,Soldier
cost={3}{W} cost={3}{W}
pt=3/2 pt=3/2
timing=fmain timing=fmain
requires_card_code requires_groovy_code