convert from java code to groovy code
parent
e8d20c6133
commit
ee1ac48247
|
@ -0,0 +1,19 @@
|
|||
[
|
||||
new MagicSpellCardEvent() {
|
||||
@Override
|
||||
public MagicEvent getEvent(final MagicCardOnStack cardOnStack,final MagicPayedCost payedCost) {
|
||||
return new MagicEvent(
|
||||
cardOnStack,
|
||||
this,
|
||||
"Draw four cards."
|
||||
);
|
||||
}
|
||||
@Override
|
||||
public void executeEvent(
|
||||
final MagicGame game,
|
||||
final MagicEvent event,
|
||||
final Object[] choiceResults) {
|
||||
game.doAction(new MagicDrawAction(event.getPlayer(),4));
|
||||
}
|
||||
}
|
||||
]
|
|
@ -6,4 +6,4 @@ rarity=U
|
|||
type=Sorcery
|
||||
cost={3}{U}{U}
|
||||
timing=draw
|
||||
requires_card_code
|
||||
requires_groovy_code
|
||||
|
|
|
@ -1,27 +0,0 @@
|
|||
package magic.card;
|
||||
|
||||
import magic.model.MagicGame;
|
||||
import magic.model.MagicPayedCost;
|
||||
import magic.model.action.MagicDrawAction;
|
||||
import magic.model.event.MagicEvent;
|
||||
import magic.model.event.MagicSpellCardEvent;
|
||||
import magic.model.stack.MagicCardOnStack;
|
||||
|
||||
public class Tidings {
|
||||
public static final MagicSpellCardEvent S = new MagicSpellCardEvent() {
|
||||
@Override
|
||||
public MagicEvent getEvent(final MagicCardOnStack cardOnStack,final MagicPayedCost payedCost) {
|
||||
return new MagicEvent(
|
||||
cardOnStack,
|
||||
this,
|
||||
"Draw four cards.");
|
||||
}
|
||||
@Override
|
||||
public void executeEvent(
|
||||
final MagicGame game,
|
||||
final MagicEvent event,
|
||||
final Object[] choiceResults) {
|
||||
game.doAction(new MagicDrawAction(event.getPlayer(),4));
|
||||
}
|
||||
};
|
||||
}
|
Loading…
Reference in New Issue