convert from java code to groovy code
parent
c4f5abbad4
commit
16420c5e38
|
@ -0,0 +1,31 @@
|
|||
[
|
||||
new MagicPermanentActivation(
|
||||
[
|
||||
MagicConditionFactory.ManaCost("{U}"),
|
||||
MagicCondition.METALCRAFT_CONDITION
|
||||
],
|
||||
new MagicActivationHints(MagicTiming.Removal,false,1),
|
||||
"Exile"
|
||||
) {
|
||||
@Override
|
||||
public MagicEvent[] getCostEvent(final MagicPermanent source) {
|
||||
return [
|
||||
new MagicPayManaCostEvent(source,"{U}"),
|
||||
new MagicPlayAbilityEvent(source)
|
||||
];
|
||||
}
|
||||
@Override
|
||||
public MagicEvent getPermanentEvent(final MagicPermanent source,final MagicPayedCost payedCost) {
|
||||
return new MagicEvent(
|
||||
source,
|
||||
this,
|
||||
"Exile SN. Return it to the battlefield " +
|
||||
"under your control at the end of turn."
|
||||
);
|
||||
}
|
||||
@Override
|
||||
public void executeEvent(final MagicGame game, final MagicEvent event) {
|
||||
game.doAction(new MagicExileUntilEndOfTurnAction(event.getPermanent()));
|
||||
}
|
||||
}
|
||||
]
|
|
@ -9,4 +9,4 @@ cost={2}{U}{U}
|
|||
pt=4/3
|
||||
ability=flying
|
||||
timing=main
|
||||
requires_card_code
|
||||
requires_groovy_code
|
||||
|
|
|
@ -1,50 +0,0 @@
|
|||
package magic.card;
|
||||
|
||||
import magic.model.MagicGame;
|
||||
import magic.model.MagicManaCost;
|
||||
import magic.model.MagicPayedCost;
|
||||
import magic.model.MagicPermanent;
|
||||
import magic.model.MagicPlayer;
|
||||
import magic.model.action.MagicExileUntilEndOfTurnAction;
|
||||
import magic.model.condition.MagicCondition;
|
||||
import magic.model.condition.MagicConditionFactory;
|
||||
import magic.model.event.MagicActivationHints;
|
||||
import magic.model.event.MagicEvent;
|
||||
import magic.model.event.MagicPayManaCostEvent;
|
||||
import magic.model.event.MagicPermanentActivation;
|
||||
import magic.model.event.MagicPlayAbilityEvent;
|
||||
import magic.model.event.MagicTiming;
|
||||
|
||||
|
||||
public class Argent_Sphinx {
|
||||
public static final MagicPermanentActivation A =new MagicPermanentActivation(
|
||||
new MagicCondition[]{
|
||||
MagicConditionFactory.ManaCost("{U}"),
|
||||
MagicCondition.METALCRAFT_CONDITION
|
||||
},
|
||||
new MagicActivationHints(MagicTiming.Removal,false,1),
|
||||
"Exile") {
|
||||
@Override
|
||||
public MagicEvent[] getCostEvent(final MagicPermanent source) {
|
||||
return new MagicEvent[]{
|
||||
new MagicPayManaCostEvent(source,"{U}"),
|
||||
new MagicPlayAbilityEvent(source)
|
||||
};
|
||||
}
|
||||
@Override
|
||||
public MagicEvent getPermanentEvent(final MagicPermanent source,final MagicPayedCost payedCost) {
|
||||
return new MagicEvent(
|
||||
source,
|
||||
this,
|
||||
"Exile SN. Return it to the battlefield " +
|
||||
"under your control at the end of turn."
|
||||
);
|
||||
}
|
||||
@Override
|
||||
public void executeEvent(
|
||||
final MagicGame game,
|
||||
final MagicEvent event) {
|
||||
game.doAction(new MagicExileUntilEndOfTurnAction(event.getPermanent()));
|
||||
}
|
||||
};
|
||||
}
|
Loading…
Reference in New Issue