convert from java code to groovy code
parent
c3d18330c4
commit
17683fc5e1
|
@ -0,0 +1,23 @@
|
||||||
|
[
|
||||||
|
new MagicSpellCardEvent() {
|
||||||
|
@Override
|
||||||
|
public MagicEvent getEvent(final MagicCardOnStack cardOnStack,final MagicPayedCost payedCost) {
|
||||||
|
return new MagicEvent(
|
||||||
|
cardOnStack,
|
||||||
|
MagicTargetChoice.TARGET_PLAYER,
|
||||||
|
this,
|
||||||
|
"Target player$ draws three cards."
|
||||||
|
);
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public void executeEvent(
|
||||||
|
final MagicGame game,
|
||||||
|
final MagicEvent event) {
|
||||||
|
event.processTargetPlayer(game,new MagicPlayerAction() {
|
||||||
|
public void doAction(final MagicPlayer player) {
|
||||||
|
game.doAction(new MagicDrawAction(player,3));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
|
@ -6,4 +6,4 @@ rarity=R
|
||||||
type=Instant
|
type=Instant
|
||||||
cost={U}
|
cost={U}
|
||||||
timing=draw
|
timing=draw
|
||||||
requires_card_code
|
requires_groovy_code
|
||||||
|
|
|
@ -1,34 +0,0 @@
|
||||||
package magic.card;
|
|
||||||
|
|
||||||
import magic.model.MagicGame;
|
|
||||||
import magic.model.MagicPayedCost;
|
|
||||||
import magic.model.MagicPlayer;
|
|
||||||
import magic.model.action.MagicDrawAction;
|
|
||||||
import magic.model.action.MagicPlayerAction;
|
|
||||||
import magic.model.choice.MagicTargetChoice;
|
|
||||||
import magic.model.event.MagicEvent;
|
|
||||||
import magic.model.event.MagicSpellCardEvent;
|
|
||||||
import magic.model.stack.MagicCardOnStack;
|
|
||||||
|
|
||||||
public class Ancestral_Recall {
|
|
||||||
public static final MagicSpellCardEvent E = new MagicSpellCardEvent() {
|
|
||||||
@Override
|
|
||||||
public MagicEvent getEvent(final MagicCardOnStack cardOnStack,final MagicPayedCost payedCost) {
|
|
||||||
return new MagicEvent(
|
|
||||||
cardOnStack,
|
|
||||||
MagicTargetChoice.TARGET_PLAYER,
|
|
||||||
this,
|
|
||||||
"Target player$ draws three cards.");
|
|
||||||
}
|
|
||||||
@Override
|
|
||||||
public void executeEvent(
|
|
||||||
final MagicGame game,
|
|
||||||
final MagicEvent event) {
|
|
||||||
event.processTargetPlayer(game,new MagicPlayerAction() {
|
|
||||||
public void doAction(final MagicPlayer player) {
|
|
||||||
game.doAction(new MagicDrawAction(player,3));
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
|
Loading…
Reference in New Issue