convert from java code to groovy code
parent
59fe559e0c
commit
2ea31149fb
|
@ -1,21 +1,5 @@
|
|||
package magic.card;
|
||||
|
||||
import magic.model.MagicGame;
|
||||
import magic.model.MagicLocationType;
|
||||
import magic.model.MagicManaCost;
|
||||
import magic.model.MagicPayedCost;
|
||||
import magic.model.MagicPlayer;
|
||||
import magic.model.action.MagicChangeCardDestinationAction;
|
||||
import magic.model.action.MagicPlayerAction;
|
||||
import magic.model.choice.MagicBuybackChoice;
|
||||
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 Mind_Peel {
|
||||
public static final MagicSpellCardEvent E = new MagicSpellCardEvent() {
|
||||
[
|
||||
new MagicSpellCardEvent() {
|
||||
@Override
|
||||
public MagicEvent getEvent(final MagicCardOnStack cardOnStack,final MagicPayedCost payedCost) {
|
||||
return new MagicEvent(
|
||||
|
@ -26,13 +10,12 @@ public class Mind_Peel {
|
|||
),
|
||||
this,
|
||||
"Target player$ discards a card. " +
|
||||
"If the buyback cost was payed$, return SN to its owner's hand as it resolves.");
|
||||
"If the buyback cost was payed$, return SN to its owner's hand as it resolves."
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void executeEvent(
|
||||
final MagicGame game,
|
||||
final MagicEvent event) {
|
||||
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,false));
|
||||
|
@ -42,5 +25,5 @@ public class Mind_Peel {
|
|||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
]
|
|
@ -6,4 +6,4 @@ rarity=U
|
|||
type=Sorcery
|
||||
cost={B}
|
||||
timing=removal
|
||||
requires_card_code
|
||||
requires_groovy_code
|
||||
|
|
Loading…
Reference in New Issue