convert from java code to groovy code
parent
e5eff0c758
commit
f4152ae7a7
|
@ -1,20 +1,5 @@
|
||||||
package magic.card;
|
[
|
||||||
|
new MagicSpellCardEvent() {
|
||||||
import magic.model.MagicCard;
|
|
||||||
import magic.model.MagicGame;
|
|
||||||
import magic.model.MagicLocationType;
|
|
||||||
import magic.model.MagicPayedCost;
|
|
||||||
import magic.model.action.MagicCardAction;
|
|
||||||
import magic.model.action.MagicMoveCardAction;
|
|
||||||
import magic.model.action.MagicRemoveCardAction;
|
|
||||||
import magic.model.choice.MagicTargetChoice;
|
|
||||||
import magic.model.event.MagicEvent;
|
|
||||||
import magic.model.event.MagicSpellCardEvent;
|
|
||||||
import magic.model.stack.MagicCardOnStack;
|
|
||||||
import magic.model.target.MagicGraveyardTargetPicker;
|
|
||||||
|
|
||||||
public class Reclaim {
|
|
||||||
public static final MagicSpellCardEvent S = new MagicSpellCardEvent() {
|
|
||||||
@Override
|
@Override
|
||||||
public MagicEvent getEvent(final MagicCardOnStack cardOnStack,final MagicPayedCost payedCost) {
|
public MagicEvent getEvent(final MagicCardOnStack cardOnStack,final MagicPayedCost payedCost) {
|
||||||
return new MagicEvent(
|
return new MagicEvent(
|
||||||
|
@ -22,13 +7,11 @@ public class Reclaim {
|
||||||
MagicTargetChoice.TARGET_CARD_FROM_GRAVEYARD,
|
MagicTargetChoice.TARGET_CARD_FROM_GRAVEYARD,
|
||||||
new MagicGraveyardTargetPicker(false),
|
new MagicGraveyardTargetPicker(false),
|
||||||
this,
|
this,
|
||||||
"Put target card$ from your graveyard on top of your library."
|
"Put target card\$ from your graveyard on top of your library."
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
public void executeEvent(
|
public void executeEvent(final MagicGame game, final MagicEvent event) {
|
||||||
final MagicGame game,
|
|
||||||
final MagicEvent event) {
|
|
||||||
event.processTargetCard(game,new MagicCardAction() {
|
event.processTargetCard(game,new MagicCardAction() {
|
||||||
public void doAction(final MagicCard targetCard) {
|
public void doAction(final MagicCard targetCard) {
|
||||||
game.doAction(new MagicRemoveCardAction(targetCard,MagicLocationType.Graveyard));
|
game.doAction(new MagicRemoveCardAction(targetCard,MagicLocationType.Graveyard));
|
||||||
|
@ -40,5 +23,5 @@ public class Reclaim {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
}
|
]
|
|
@ -6,4 +6,4 @@ rarity=C
|
||||||
type=Instant
|
type=Instant
|
||||||
cost={G}
|
cost={G}
|
||||||
timing=draw
|
timing=draw
|
||||||
requires_card_code
|
requires_groovy_code
|
||||||
|
|
Loading…
Reference in New Issue