29 lines
1.0 KiB
Groovy
29 lines
1.0 KiB
Groovy
[
|
|
new MagicWhenOtherPutIntoGraveyardFromPlayTrigger() {
|
|
@Override
|
|
public MagicEvent executeTrigger(
|
|
final MagicGame game,
|
|
final MagicPermanent permanent,
|
|
final MagicPermanent otherPermanent) {
|
|
return (otherPermanent.isCreature()) ?
|
|
new MagicEvent(
|
|
permanent,
|
|
MagicTargetChoice.NEG_TARGET_PLAYER,
|
|
this,
|
|
"Target player\$ loses 1 life and PN gains 1 life."
|
|
):
|
|
MagicEvent.NONE;
|
|
}
|
|
|
|
@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));
|
|
}
|
|
});
|
|
}
|
|
}
|
|
]
|