convert from java code to groovy code
parent
1ccae9386d
commit
40c20693cc
|
@ -0,0 +1,24 @@
|
|||
[
|
||||
new MagicSpellCardEvent() {
|
||||
@Override
|
||||
public MagicEvent getEvent(final MagicCardOnStack cardOnStack,final MagicPayedCost payedCost) {
|
||||
return new MagicEvent(
|
||||
cardOnStack,
|
||||
MagicTargetChoice.TARGET_OPPONENT,
|
||||
this,
|
||||
"Target opponent$ discards a card at random, then discards a card."
|
||||
);
|
||||
}
|
||||
@Override
|
||||
public void executeEvent(
|
||||
final MagicGame game,
|
||||
final MagicEvent event) {
|
||||
event.processTargetPlayer(game,new MagicPlayerAction() {
|
||||
public void doAction(final MagicPlayer player) {
|
||||
game.addEvent(new MagicDiscardEvent(event.getSource(),player,1,true));
|
||||
game.addEvent(new MagicDiscardEvent(event.getSource(),player,1,false));
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
]
|
|
@ -6,4 +6,4 @@ rarity=U
|
|||
type=Sorcery
|
||||
cost={2}{B}
|
||||
timing=removal
|
||||
requires_card_code
|
||||
requires_groovy_code
|
||||
|
|
|
@ -1,35 +0,0 @@
|
|||
package magic.card;
|
||||
|
||||
import magic.model.MagicGame;
|
||||
import magic.model.MagicPayedCost;
|
||||
import magic.model.MagicPlayer;
|
||||
import magic.model.action.MagicPlayerAction;
|
||||
import magic.model.choice.MagicTargetChoice;
|
||||
import magic.model.event.MagicDiscardEvent;
|
||||
import magic.model.event.MagicEvent;
|
||||
import magic.model.event.MagicSpellCardEvent;
|
||||
import magic.model.stack.MagicCardOnStack;
|
||||
|
||||
public class Stupor {
|
||||
public static final MagicSpellCardEvent E = new MagicSpellCardEvent() {
|
||||
@Override
|
||||
public MagicEvent getEvent(final MagicCardOnStack cardOnStack,final MagicPayedCost payedCost) {
|
||||
return new MagicEvent(
|
||||
cardOnStack,
|
||||
MagicTargetChoice.TARGET_OPPONENT,
|
||||
this,
|
||||
"Target opponent$ discards a card at random, then discards a card.");
|
||||
}
|
||||
@Override
|
||||
public void executeEvent(
|
||||
final MagicGame game,
|
||||
final MagicEvent event) {
|
||||
event.processTargetPlayer(game,new MagicPlayerAction() {
|
||||
public void doAction(final MagicPlayer player) {
|
||||
game.addEvent(new MagicDiscardEvent(event.getSource(),player,1,true));
|
||||
game.addEvent(new MagicDiscardEvent(event.getSource(),player,1,false));
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
}
|
Loading…
Reference in New Issue