27 lines
1.0 KiB
Groovy
27 lines
1.0 KiB
Groovy
[
|
|
new MagicSpellCardEvent() {
|
|
@Override
|
|
public MagicEvent getEvent(final MagicCardOnStack cardOnStack,final MagicPayedCost payedCost) {
|
|
return new MagicEvent(
|
|
cardOnStack,
|
|
MagicTargetChoice.TARGET_OPPONENT,
|
|
this,
|
|
"Target opponent\$ loses 2 life and PN gains 2 life. " +
|
|
"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) {
|
|
event.processTargetPlayer(game, {
|
|
final MagicPlayer player ->
|
|
game.doAction(new MagicChangeLifeAction(player,-2));
|
|
game.doAction(new MagicChangeLifeAction(event.getPlayer(),2));
|
|
if (event.isBuyback()) {
|
|
game.doAction(new MagicChangeCardDestinationAction(event.getCardOnStack(), MagicLocationType.OwnersHand));
|
|
}
|
|
});
|
|
}
|
|
}
|
|
]
|