48 lines
1.8 KiB
Groovy
48 lines
1.8 KiB
Groovy
[
|
|
new MagicPermanentActivation(
|
|
new MagicActivationHints(MagicTiming.Removal,1),
|
|
"Exile"
|
|
) {
|
|
@Override
|
|
public Iterable<MagicEvent> getCostEvent(final MagicPermanent source) {
|
|
return [
|
|
new MagicPayManaCostEvent(source,"{1}"),
|
|
new MagicPlayAbilityEvent(source),
|
|
new MagicSacrificePermanentEvent(source,MagicTargetChoice.SACRIFICE_CREATURE)
|
|
];
|
|
}
|
|
@Override
|
|
public MagicEvent getPermanentEvent(final MagicPermanent source,final MagicPayedCost payedCost) {
|
|
return new MagicEvent(
|
|
source,
|
|
this,
|
|
"Exile SN. Return it to the battlefield under its owner's control at the beginning of the next end step."
|
|
);
|
|
}
|
|
@Override
|
|
public void executeEvent(final MagicGame game, final MagicEvent event) {
|
|
game.doAction(new MagicExileUntilEndOfTurnAction(event.getPermanent()));
|
|
}
|
|
},
|
|
new MagicWhenComesIntoPlayTrigger() {
|
|
@Override
|
|
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent, final MagicPayedCost payedCost) {
|
|
return new MagicEvent(
|
|
permanent,
|
|
MagicTargetChoice.TARGET_OPPONENT,
|
|
this,
|
|
"Target opponent\$ loses 1 life and PN gains 1 life."
|
|
);
|
|
}
|
|
@Override
|
|
public void executeEvent(final MagicGame game, final MagicEvent event) {
|
|
event.processTargetPlayer(game,new MagicPlayerAction() {
|
|
public void doAction(final MagicPlayer player) {
|
|
game.doAction(new MagicChangeLifeAction(player,-1));
|
|
game.doAction(new MagicChangeLifeAction(event.getPlayer(),1));
|
|
}
|
|
});
|
|
}
|
|
}
|
|
]
|